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 Ivan,
That code worked perfect.But how can we raise an event for that check box .i am not able to access an event for it.please help me.
Thanks
Having followed Ivan's comment above, I am able to add a new checkbox column into the UltraWebGrid, and set its Update property to true (to allow me to check/unckeck it). I realize however that it only allows one row to be checked, as every time I check a second row, after a split second the previous checked row is unchecked.
The idea is to be able to select a number of rows (without having to hold down the Ctrl key and click) by checking their checkboxes and then process all the selected rows by clicking on another button.
Any ideas on this?
Chris
protected void UltraWebGrid1_UpdateCell(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
Note:
Using this event i need to load the ultrawebgrid to dataset and
I need after changing values in grid and those values to be loaded to dataset plz help me
You can use the server side event UpdateCell:
Also you can use client side event AfterCellUpdateHandler:
<ClientSideEvents AfterCellUpdateHandler="Fire" />
Hope this helps
Ivan Baev