I was using ultrawebgrid earlier, now its not supporting for IE11, so changing it to webhierarchicaldatagrid .My issue is, i want to bind checkbox for a column from codebehind.W.r.t ultrawebgrid
uwgDisplay.DisplayLayout.Bands[0].Columns.FromKey("UsedInContainer").Type = ColumnType.CheckBox;
but how to do it using webhierarchicaldatagrid.
Hello Ali,
did you manage to resolve this issue?Please feel free to let me know if you have any other questions.
thank you for contacting us.
Since the WebDataGrid has different architecture than the UltraWebGrid, the type of the column is not set via a specific property. Instead it's determined by the actual column type that you've declared. You can refer to the different column types available and how to add them here:
http://help.infragistics.com/Doc/ASPNET/2011.1/CLR4.0/page=WebDataGrid_Columns.html
To create a column that contains a checkbox you would need to use a BoundCheckBoxField column type.
You can declare it in your aspx page for example:
And you can dynamically set the DataKeyField it will use to get its data from in the code behind, for example:
((BoundCheckBoxField)this.whdg.Columns["checkbox"]).DataFieldName = "CheckBox"; ((BoundCheckBoxField)this.whdg.Bands[0].Columns["checkbox"]).DataFieldName = "CheckBox";