Scenario
The page has a left navigation panel that can be collapsed / expanded
On toggle, the main content container width is changed using CSS only (no page refresh)
On initial page load or full refresh, the grid renders correctly
On toggle of grid button in the expand mode only, the grid suddenly shows a horizontal scrollbar
Observed Behaviour
This happens only after clicking toggle ( external button written in C# code)
Rebinding the grid (
Rebind()) or callingrepaint()does not fix the issueA full page refresh always fixes it.
How can i prevent the scoll from appearing when the grid has lesser columns. the scrolls appears from _Frozen.
Css used for toggle small -> condensed , and condensed -> small
.small .RadGrid .rgRow td,
.small .RadGrid .rgAltRow td,
.small .RadGrid .rgEditRow td,
.small .gridFillLayoutPanel .RadGrid_Metro .rgHeader th,
.small .gridFillLayoutPanel .RadGrid_Metro .rgGroupHeader th,
.small .RadGrid .rgRow > td,
.small .RadGrid .rgAltRow > td,
.small .RadGrid .rgEditRow > td,
.small .RadGrid .rgFilterRow > td {
padding-left: 8px !important;
padding-right: 8px !important;
line-height: 32px !important;
height: 32px !important;
font-family: @font-tab-title;
font-size: 12px;
padding-top: 7px !important;
padding-bottom: 7px !important;
text-align: left;
}
.condensed .gridFillLayoutPanel .RadGrid_Metro .rgRow td,
.condensed .gridFillLayoutPanel .RadGrid_Metro .rgAltRow td,
.condensed .gridFillLayoutPanel .RadGrid_Metro .rgEditRow td
.condensed .gridFillLayoutPanel .RadGrid_Metro .rgHeader,
.condensed .gridFillLayoutPanel .RadGrid_Metro .rgGroupHeader td,
.condensed .RadGrid .rgRow > td,
.condensed .RadGrid .rgAltRow > td,
.condensed .RadGrid .rgEditRow > td,
.condensed .RadGrid .rgFilterRow > td,
.condensed .RadGrid .rgHeader th,
.condensed .RadGrid .rgGroupHeader th {
padding-left: 7px !important;
padding-right: 7px !important;
line-height: 24px !important;
height: 24px !important;
font-family: @font-tab-title;
font-size: 11px !important;
padding-top: 3px !important;
padding-bottom: 3px !important;
text-align: left;
}
Best Regards,
Sunil Shanakr S R