Click here to Skip to main content
15,668,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In UltraWinGrid, the grouped rows are expanded using expand symbol (+). On grid refresh, again the rows are getting collapsed. How to retain the expanded state? (Note: Grouping is done based on multiple columns). While refreshing the grid (to reflected the newly added rows or any updates), i tried to use "Grid.Rows.Refresh(RefreshRow.ReloadData)". But it is not reflecting the newly added rows. How to overcome this problem?
Posted

Hi,

I never used and not familiar with UltraWinGrid, but i have an idea to do the overcome above problem.

Problem and Solution:
1. Refresh the grid.
Rebind grid again

2. Maintain expand state during refresh the grid.
you need to assign a javascript function to each row during row data bound.
something like:
C#
image img = (image)e.row.findcontrol("expandcollapseiconID");
img.Attributes.Add("onclick","maintainState(this);");



Thanks,
Imdadhusen
 
Share this answer
 
C#
this.ultraGrid.Rows.ExpandAll(true);
 
Share this answer
 
Comments
Richard C Bishop 30-Apr-13 12:18pm    
You have been a member for 5 years and your first post is a one-liner solution to a post that is 3 years old with no explanation. Why?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900