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
Hello,
We have used WebGrid7 in sharepoint webpart. the grid is created dynamically from serverside. We have implementd self hirechical grid. We have few columns which we want to use for manipulations on client side, but at the same time we dont want to display the same to the end users.
We have tried to access the same using following code, but as the column is hidden we are not able to access the value.
var grid = ISGetObject( [Grid ID] ); var selObj = grid.GetSelectedObject(); var row = selObj.GetRowObject(); // get the WebGridRow object if (row.Type == "Record") { // obtain WebGridCellCollection of the specified row. var cells = row.GetCells(); // get the WebGridCell object by name. alert( cells.GetNamedItem( [Hidden Coulmn Name] ) ); }
The above example displayed Null value
Please anyone can resolve this or let me know what is otherway to achive the same thing ?
Thanks,
G.S
Hi Gaurav Desai,
Sorry for the attachment, I have re-attached a downloadable sample. Glad to hear that you can get the value from client side now. However, we do not support your scenario at this moment.
If we set the column to be invisible, that particular column is not being render actually. So, in this case, the data will not be existed and our column can only holds one hidden data member.
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
If you are trying to access a hidden column member, I will recommend you to use HiddenDataMember feature. With this, you can set a hidden column in your WebGrid and access the value by getting its attribute. Here is the snippet to get the value of hidden data member:
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var selectedObject = grid.GetSelectedObject(); var getRowObject = selectedObject.GetRowObject(); var getCells = getRowObject.GetCells().GetNamedItem("Phone") var getHiddenValue = getCells.GetElement().attributes["Fax"].value; }
In here, I set a hidden value under a Phone column. So, I just go to Phone column and get the value of its attribute, which already been set to be a Fax column data member.
To be clarify, I also attached you a sample of mine on how to create a hidden data member (please select a row first before click on the button). I hope it helps. Thank you and have a nice day.
Thanks for the solutions. By the way the zip file attachment is for some reason not downloadable, can you please check ?
I tried adding (rather associating) a hidden column with one of visible columns and i am now able to get its value from client side as described in your answer.
But the serious limitation with this approach is that i can have only one hidden data member per visible column. What if i am displaying only 5 columns but for other computation purpose need to access more than 5 other columns ( which is really the case in my scenario) ?
Is there a way i can access these hidden members from the columns for which i have set its 'visible' property to false ???
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