Hello,
I would like to add column to UltraWebGrid (the first column) which displays a checkbox for multi-selection of rows purpose. The user can select many rows by checking on the checkboxes and then click on a button which applies an action to the selected rows. This requirement seems quite easy but I still don't know how to. Using a table field to bind to the checkbox-column is not a good choice. I have tried a templatedColumn to display a checkbox but the value of the checkbox is always false.
Thanks in advance for your help.
Regards,
Hoc Nguyen
You can add columns in UltraWebGrid with two ways: The first is design time:
Add new attribure (new column):
<igtbl:UltraGridColumn Type="CheckBox"></igtbl:UltraGridColumn>
in tag Colums of Bands tag
And second is run time from code-behind:
protected void Page_Load(object sender, EventArgs e)
{
UltraWebGrid1.Columns.Insert(0, "fromCode");
UltraWebGrid1.Columns[0].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox;
this.UltraWebGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "code-behind:";
}
You can look this link:
Hi,
I have 5 columns in an ultrawebgrid which are bound to a table. For these 5 columns there are 5 checkboxes. If a checkbox is selected then only the column is displayed on the grid. How do I find the number of columns which are displayed on the grid programmatically(in vb). I have tried
Ultrawebgrid1.columns.count but this only displays the actual number of columns bound to the database not the columns which are displayed on the grid.
Thanks,
Junaid
It really depends on how you set your columns to hidden (setting the Hidden property to True?). If ths is the case, something similar may work
int totalVisibleColumns = 0; foreach (UltraGridColumn column in UltraWebGrid1.Columns) { if (column.Hidden == false) { totalVisibleColumns = totalVisibleColumns + 1; } }