Hi,
I have one rad grid with 20 more columns, While i frozen the first column, the last three columns will be in out of the grid..
and i used to show full columns in grid with "UseStaticHeaders=True",
Bcoz am getting different count of columns from DB when i show a grid.
Can you anyone help me..?
Thanks
-Rk.Moorthy
I have one rad grid with 20 more columns, While i frozen the first column, the last three columns will be in out of the grid..
and i used to show full columns in grid with "UseStaticHeaders=True",
Bcoz am getting different count of columns from DB when i show a grid.
This
is
my grid:
------------------
<telerik:RadGrid ID=
"RadGrid2"
runat=
"server"
Skin=
"Vista"
AutoGenerateColumns=
"false"
OnItemDataBound=
"RadGrid2_ItemDataBound"
OnNeedDataSource=
"RadGrid2_NeedDataSource"
OnPreRender=
"RadGrid2_PreRender"
Height=
"400px"
Width=
"970px"
>
<MasterTableView HeaderStyle-CssClass=
"disable-highlight"
Width=
"98%"
HeaderStyle-HorizontalAlign=
"Center"
HeaderStyle-Wrap=
"true"
HeaderStyle-Height=
"52px"
>
<Columns>
</Columns>
</MasterTableView>
<ClientSettings Scrolling-AllowScroll=
"true"
Resizing-AllowColumnResize=
"true"
Scrolling-SaveScrollPosition=
"true"
Scrolling-FrozenColumnsCount=
"2"
Scrolling-UseStaticHeaders=
"true"
>
<Selecting AllowRowSelect=
"true"
/>
<ClientEvents OnColumnDblClick=
"myDblClickEvent"
OnRowDblClick=
"RowSelectCheck"
/>
<Scrolling AllowScroll=
"true"
UseStaticHeaders=
"true"
/>
</ClientSettings>
</telerik:RadGrid>
In Code Behind:
------------------
I have added the dynamic columns from DB like following.
GridBoundColumn objBound =
new
GridBoundColumn();
RadGrid2.MasterTableView.Columns.Add(objBound);
objBound.HeaderText = dtnewd.Columns[1].ToString().ToString();
objBound.UniqueName = dtnewd.Columns[1].ToString().ToString();
objBound.DataType =
typeof
(
string
);
objBound.DataField = dtnewd.Columns[1].ToString();
objBound.HeaderStyle.Width = 100;
objBound.HeaderStyle.Wrap =
true
;
objBound.ItemStyle.Width = 100;
objBound.ItemStyle.Wrap =
true
;
Can you anyone help me..?
Thanks
-Rk.Moorthy