[英]How to add a hyperlink column in the devexpress ASPxGridView control?
I want to add to my GridView from Devexpress ( c# asp.net ) a hyperlink column where i want to set the name of each row to the value of the data. 我想从Devexpress(c#asp.net)向我的GridView添加一个超链接列,在这里我想将每一行的名称设置为数据值。
Is this possible? 这可能吗? How? 怎么样?
From the ASPxGridView documentation regarding How to create and configure a HyperLink column at runtime : 从ASPxGridView文档中获得有关如何在运行时创建和配置HyperLink列的信息 :
public void PopulateColumns() {
GridViewDataTextColumn colID = new GridViewDataTextColumn();
colID.FieldName = "ID";
ASPxGridView1.Columns.Add(colID);
GridViewDataHyperLinkColumn colItemName = new GridViewDataHyperLinkColumn();
colItemName.FieldName = "ItemName";
colItemName.PropertiesHyperLinkEdit.NavigateUrlFormatString ="~/details.aspx?Device={0}";
colItemName.PropertiesHyperLinkEdit.TextFormatString = "Device {0}";
colItemName.PropertiesHyperLinkEdit.TextField = "ItemName";
ASPxGridView1.Columns.Add(colItemName);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.