Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
WebDataGrid with BoundDataField
posted

Dears

I have DataTable with tow columns (id,fname) and a WebDataGrid, the code for filling the datatable and the datagrid is:

 Dim dd As New test
        Dim dt4 As DataTable = dd.DataTable1
        dt4.Rows.Add("1", "TestName")
        dt4.Rows.Add("2", "TestName2")
        WebDataGrid1.DataSource = dt4
        WebDataGrid1.DataBind()

everything is working fine, but when I add a BoundDataField with a key named (fname) same as the column's name in the datatable to set some behaviors to the column, so the Asp.net code is:

<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px" >
<Columns>
<ig:BoundDataField DataFieldName="fname" Key="fname">
<Header Text="fname">
</Header>
</ig:BoundDataField>
</Columns>
</ig:WebDataGrid>

so, the DataGrid suppose to bound the BoundDataField into the DataTableColumn which is (fname), but why now I'm getting 2 columns in datagrid? the results I get is: