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
235
Row expansion bug when grouping?
posted

I have a webgrid with 10 columns and 20 rows of data.  The grouping style is set to outlook.

It seems that, if I group by a column, I am unable to expand the rows in the same method/event handler call.

For example, if I place a button on the page with the following event handler:

        protected void Button1_Click(object sender, EventArgs e)
        {
            UltraWebGrid1.Columns[3].IsGroupByColumn = true;

            foreach (UltraGridRow r in UltraWebGrid1.Rows)
            {
                r.Expand(true);
            }
        }
 

I need to click the button twice in order that the rows are expanded.

Is this supposed to be happening??

 

Regards

AM

 

Parents
No Data
Reply
  • 28464
    posted

     This could be something that is expected, since setting IsGroupByColumn just sets a property, while the actual grouping take place much later in the page life-cycle. So any expanded rows will be collapsed again for the group.

    Is it possible to move the row exansion code at a later point in your page life cycle (say, OnPreRender) and see how it goes? You can also play with the InitializeLayout event of the grid and see if it is executed at a later point than the Button_Click event handler.

Children