[英]Infragistics webdatagrid
如何將以下代碼寫入服務器端。即aspx.cs頁面。 我只是初學者。 我將所有網格定義都寫到了服務器端。我試圖將復選框列插入基礎設施webdatagrid。
<ig:WebDataGrid
ID="wdg"
runat="server"
DataKeyFields="Id" <-- change with your primary key
Width="400">
<Columns>
<ig:UnboundCheckBoxField Key="Checked" Header-Text="Select" Width="50" headerCheckBoxMode="BiState">
<Header Text="Select"></Header>
</ig:UnboundCheckBoxField>
</Columns>
您可以像這樣在服務器端的網格上定義UnboundCheckBoxField並將其添加到網格中:
UnboundCheckBoxField field = new UnboundCheckBoxField();
field.Key = "Checked";
field.HeaderCheckBoxMode = Infragistics.Web.UI.CheckBoxMode.BiState;
field.Width = new Unit(50);
field.Header.Text = "Select";
wdg.Columns.Add(field);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.