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,
i have a webgrid with allow grouping columns, when I group by a column how to get the cell (value, text, attributes...) related to a column grouped, because I get the selected row but when I try to get the cell related to a column grouped I got null, instead i need to get that cell.
Thanks,
Vince
No, you could not do that in that way because HiddenDataMember property or hidden fields only available in WebGridColumn level. When you used group mode, the structure of field changed into GroupColumn. GroupColumn does not have that propery. If you still want to access HiddenDataMember, you will need to set HideColumnsWhenGrouped to no. With this properties, when in group mode, the column which is used for grouping will still remain. Hope this helps.
Regards,Handy
You can get the cell (value,text, attributes) by using these codes:
var grid= ISGetObject("WebGrid1"); var selObj= grid.GetSelectedObject(); var rowObj= selObj.ToRowObject(); var celObj= rowObj.GetCells();
then, fill celObj with index number such as celObj[0]; You can get each cells value by filling the index number.Or
You can get the information OnRowSelect event by got the row object first.
var celObj= wgGetRowByElement(rowEl).GetCells();
Also, here is the code to get the first group's row element via button click. Hope this helps.
function doButtonClick() { //get the grid object var grid = ISGetObject("WebGrid1"); //make sure the grid is grouped if (grid.RootTable.GroupedColumns.length > 0) { //get the first group row element var firstGroupRow = wgGetRowByGroup(grid.RootTable.GetElement(WG40.BODY,WG40.HTMLTABLE),0,0); alert(firstGroupRow.innerText); } }
I get the cells with
var celObj= rowObj.GetCells();
anyway in that collection I do not find the cell related to column related to the group.
For example I have a webgrid with four column:
name, age, city, job
when I select a row i can get all cells for the row.
If I group by the city when I select a row i find only the cells for name, age, job.
How to get the information about the grouping column cell city?
If the city has been used as group column and you wanted to get the information of the city, you can do with my previous code i gave your.
(0,0)>> the first index 0>> please fill it with 0 if it only has 1 grouping columns... >> the second index 0>>group position
Hope this helps.
ok, in that mode i can get the cell.Text anyway i need to get also any hidden fields (custom attributes) related to that cell, how to retrieve those?
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