This is a migrated thread and some comments may be shown as answers.

Need scrolling enabled while radgrid is diabled

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peeyush
Top achievements
Rank 1
Peeyush asked on 24 Apr 2014, 09:03 AM
Hi All,

I have a radgrid in my web application in which I disable the grid due to some conditions in code, but when the items(rows) exceed the height of grid I am not able to see the content as scrolling is also disabled due to grid being disabled.

I have tried the below code so far in order to enable the RadGrid but set the columns to readonly.

RGSellingEntity.Enabled = true;
                bool ReadOnly = true;
                foreach (GridColumn col in RGSellingEntity.MasterTableView.Columns)
                {
                    if (col.ColumnType == "GridBoundColumn")
                    {
                        col
                        GridBoundColumn boundCol = (GridBoundColumn)col;
                        boundCol.ReadOnly = ReadOnly;
                    }
                    if (col.ColumnType == "GridTemplateColumn")
                    {
                        GridTemplateColumn tempCol = (GridTemplateColumn)col;
                        tempCol.ReadOnly = ReadOnly;
                    }
                }

but it did not work, the thing I want is that the radgrid should be in disabled except :the scrollbars(vertical) so that user can scroll through the items/rows in radgrid.
I need to do this code behind based on some conditions.

Can someone please help ASAP?

Thanks in advance!

regards,
Peeyush Pandey

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Apr 2014, 09:54 AM
Hi Peeyush,

When you disable the grid all its functionalities will be disabled. One solution is that during the disabling of RadGrid you can add a RadSlider to the Grid for allowing it to scroll when grid is disabled.
Check this code library to know how to add RadGrid scrolling through RadSlider.

Thanks,
Princy
Tags
Grid
Asked by
Peeyush
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or