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
(just incorrectly posted this as a discussion. it's a question.)
i've implemented a self referencing hierarchical webgrid with editable child/parent rows.
after editing a parent row, the row itself as well as all child rows auto-expand. the rows still keep the '+' icon causing the user to need to click on it twice to collapse again.
(attached photo)
is there a solution that prevents the expanding of the rows?
Deeply apologize for the delay in sending this.
Or have you found any other solutions? I need to deliver this to a customer shortly.
Yes, I have another solutions. The idea is: simply have the self-reference row to collapsed again. I found that this idea can be implemented in OnAfterResponseProcess client-side event.
Add following JavaScript function and register WebGrid1_OnAfterResponseProcess function to the grid's OnAfterResponseProcess client-side event.
<script type="text/javascript"> function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) { var grid = ISGetObject("WebGrid1"); if (actionName=="UpdateRow") grid.GetSelectedObject().ToRowObject().CollapseSelfRefRow(); return true; } </script> <ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...> <LayoutSettings ...> <ClientSideEvents OnAfterResponseProcess="WebGrid1_OnAfterResponseProcess" /> </LayoutSettings> ... </ISWebGrid:WebGrid>
Hope this helps.
Thank you :) That seems to work. Collapsing all the children on update definitely seems to be the best of all the options provided.
I modified SelfReferencingGrid.aspx sample file of WebGrid by enabling AllowAddNew, AllowDelete, and AllowEdit feature. Next, modify Steven Buchanan's city from London to Manchester.And yes, the reported problem is reproducible. After update, it auto-expands the edited row & all children. and it leave the '+' icon on the newly expanded rows so that the user needs to click the icon twice to actually collapse each row.
I found that after enabling LoadOnDemand property of SelfReferencingSettings, the problem is no longer persist. Could you please try this solution and let me know how it works in your end?
Thanks for the quick response.
I tried seting LoadOnDemand to true and the child nodes no longer auto-expand.. however, there are 2 other issues that are raised. The grid is much slower to expand *and* the lowest level child nodes have a '+' icon until I try to expand them (at which point the remove themselves).
Do you have any further suggestions?
The grid is much slower to expand
This is due to the LoadOnDemand behavior where the child rows will be retrieved and loaded when user click the expand button.
the lowest level child nodes have a '+' icon until I try to expand them (at which point the remove themselves).
This how-to article shows how to remove the (+) sign for self reference LoadOnDemand rows that contain no child row. In InitializeRow event at the server side, use e.Row.SelfRefChildNotExpandable = true to remove the + button.
Performance is a definitely a concern, so if at all possible, I would like to avoid using the LoadOnDemand. Is there a fix without using LoadOnDemand? Some kind of javascript fix or something?
Also, probably related to the same original issue, if I edit a parent row and then start editing a child row to that parent the whole page freezes, not just the grid. There is no recover except refreshing the page.
Yudi, is there a support number I can call to discuss further options for this issue? Or have you found any other solutions? I need to deliver this to a customer shortly.
Glad to hear the good news.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
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