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
305
How to disable buttonCell in Groupby Mode
posted

to disable buttoncells on ultragrid in normal mode

I am using this   row.Cells["Include"].Activation = Activation.ActivateOnly;

what should i use to disable button cells in GroupBy mode row.Cells is null in GroupBy mode

i tried

  row.ParentCollection.ColumnFilters["Include"].Column.CellActivation = Activation.ActivateOnly;

but did not work. Can any one help me please?

 

Sample:

private void enableDisableBtnCellOnGrid(bool enabled)
        {
                foreach (UltraGridRow row in myUltraGrid.Rows)
                {
                    if (enabled)
                    {
                        if (!row.IsGroupByRow)
                            row.Cells["Include"].Activation = Activation.ActivateOnly;
                        //else
                        //    row.ParentCollection.ColumnFilters["Include"].Column.CellActivation = Activation.ActivateOnly;
                    }
                    else
                    {
                        if (!row.IsGroupByRow)
                            row.Cells["Include"].Activation = Activation.Disabled;
                        //else
                        //    row.ParentCollection.ColumnFilters["Include"].Column.CellActivation = Activation.Disabled;
                    }
                }
       }

 

Thanks