iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
Is it possible to add a checkbox to a webgrid's groupping row so it would be possible to
check/uncheck all rows (RowChecker) in the groupped section?
<ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" DataMember="COL" ColumnType="CheckBox" IsRowChecker="True" Name="RowChecker" ShowInSelectColumns="No" Width="30px"></ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="GROUP_COL" Name="GROUP_COL" DataMember="GROUP_COL"></ISWebGrid:WebGridColumn>
PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
WebGridGroup wg_column = new WebGridGroup();
wg_column.Column = columns.GetNamedItem("GROUP_COL");
grid.RootTable.GroupedColumns.Add(wg_column);
Thanks
Hi Roi,
Regarding to your scenario, I can make this scenario as feature request. Right now, we don't have any row checker column in its header. Perhaps, you could add this on client side by adding 1 Checkbox before the Group name. But you need to maintain this state everytime you do grouping in WebGrid. In each header checkbox, you should add a function so WebGrid could check/uncheck all item in that group. By using this method, you can achieve this scenario but there was too much effort to maintain this state. Maybe I can add this scenario as feature request so our developer team should consider this and maybe they would add this feature in our WebGrid so those checkbox will be handled by our WebGrid API. Look forward to hear any feedback from you so can help you further.
Regards,Bernard
Bernard Hi,
Thanks, that would be fantastic.
Till then, is it possible to add an html input tag (<input type="checkbox"... />) to the GroupHeader header row HTML from SERVER SIDE?
InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { if (e.Row.Type.ToString() == "GroupHeader"){ e.Row.Cells[0].Column... ??? } }
I think you can't add this in server side because we are using FlyPostBack when Grouping in WebGrid. But to add checkbox in each group row, you could add script in client side like this
function AddGroupCheckBox(controlId) { var grid = ISGetObject(controlId); var groupRows = grid.RootTable.GetGroupRows(); for (var i = 0; i < groupRows.length; i++) { groupRows[i].RowElement.children[1].innerHTML = "<input type='checkbox'>" + groupRows[i].RowElement.children[1].innerHTML } }
I will add this scenario as feature request and I will let you know if I heard any news regarding this feature request from our developer team. Hope this helps.
Bernard Thanks.
How do I get the KeyValue of the groupped row (or the 'groupped by value', to be exact)?
I was able to create the groupped header checkbox as you described.
I'm also able to Check() and Uncheck() it's GroupChildRows.
BUT:
I would like the ChildRows Checkboxes to be read-only by default. So that the only way to be able to Check()/Unchek() a row is by checking it's parent groupped checkedbox.
If I set either ForceNoEdit (e.Row.Cells.GetNamedItem("RowChecker").ForceNoEdit = true;) or
grid_grouppedRows[i].RowElement.cells[2].childNodes[0].disabled = "disabled";
the row is not checked and .GetCheckedRows() contains nothing.
Please help me find a way to be able to Check()/Uncheck() a row, even though it's checkbox is disabled.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname