I have used radgrid .I have added columns dynamically to the grid at runtime.
Radgrid width is 500 px so after added 8 column horizontal scrollbar should be appear but it is not appearing.
please suggest me nice solution or example.
5 Answers, 1 is accepted
In order to display horizontal scroll for navigation, you need to make sure that the total width of the columns (either auto-generated or declaratively set) exceeds the width of the grid. Also check the following demo which implements the same.
Grid / Scrolling
Try using only HeaderStyle.Width property to set column width as shown below an see if this helps to show the horizontal scroll of the grid.
the Telerik team
There are two points to keep in mind when modifying the grid columns on postback:
- You must ensure that the grid is modified on Page_Init so that the control ViewState remains consistent.
- You should also set the EnableColumnViewState property to False, so that the grid knows that the columns may vary at some stage of the page lifecycle.
Try following these instructions and see if they help to resolve the problem with background color of newly added columns.
the Telerik team
You just need to make sure that the total width of the columns exceeds the width of the grid if you want horizontal scroll to appear in grid with autogenerated columns. Note that you should set column widths through HeaderStyle-Width property only. It is not recommended to use ItemStyle-Width.
In order to set the Radgrid Scroll please set ClientSettings->Scrolling->AllowScroll="true".In order to display horizontal scroll for navigation, you need to make sure that the total width of the columns(either auto-generated or declaratively set) exceeds the width of the grid. To avoid the appearance of the vertical scroll, make sure that the height of the records in the grid does not exceed the ClientSettings -> Scrolling -> ScrollHeight scroll setting.