Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
450
Customized GroupByRow Description Does Not Update When Data Changes
posted

Hi,

I have certain columns in my grid where I customize the GroupByRow description property in the OnIntializeGroupByRow handler.  Lets say the default format of that description is "ColumnName : ColumnValue (# items)".  I am customizing the ColumnValue part of the description string and leaving the rest alone as it is.  

When I am grouped by this column and I delete rows from this group, the # items count does not update in real time.  When I group by other columns where I am not customizing the GroupByRow description, the # items count will update right away.  I see that OnInitializeGroupByRow does not fire when rows are deleted.  How can I refresh my custom GroupByRow descriptions when data changes in the grid?

 

Thanks,

~Corey

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Corey,

    That seems like it might be a bug. The event should fire any time the description might change. But even so, it's probably not something we can change, since changing event firing is a very dangerous and potentially breaking change.

    Are you deleting the row through the grid or directly on the data source?

    If it's through the grid, then you should be able to work around this pretty easily:


            private void ultraGrid1_AfterRowsDeleted(object sender, EventArgs e)
            {
                UltraGrid grid = (UltraGrid)sender;
                grid.Rows.Refresh(RefreshRow.FireInitializeRow, true);
            }

    If you are deleting the rows through the data source, then you can basically do the same thing, but you will have to find a way to trap when the rows are deleted. Since you are doing it in code, it should not be too difficult, but you might have to use a BeginInvoke to avoid any timing issue.

     

     

Children