5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 26 Sep 2013, 02:33 PM
Hi Carlos,
Please have a look into this thread on RadGrid Columns Overlapping. 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 as demonstrated in this online demo.
Thanks,
Shinu.
Please have a look into this thread on RadGrid Columns Overlapping. 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 as demonstrated in this online demo.
Thanks,
Shinu.
0
Carlos
Top achievements
Rank 1
answered on 26 Sep 2013, 02:53 PM
Tanks the problem its taht it is already off the page even with the overlap columns.
this is what happens to my columns.
this is what happens to my columns.
0
Shinu
Top achievements
Rank 2
answered on 27 Sep 2013, 10:59 AM
Hi Carlos,
You can set the HeaderStyle, width for the columns that are not displayed fully.Please try the following sample code snippet.If this doesn't help,Please provide your full code snippet.
ASPX:
Thanks,
Shinu
You can set the HeaderStyle, width for the columns that are not displayed fully.Please try the following sample code snippet.If this doesn't help,Please provide your full code snippet.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"false"
DataSourceID
=
"SqlDataSource1"
GridLines
=
"None"
AllowPaging
=
"true"
AllowFilteringByColumn
=
"true"
>
<
MasterTableView
DataKeyNames
=
"OrderID"
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"OrderID"
DataField
=
"OrderID"
HeaderText
=
"OrderID"
>
<
HeaderStyle
Width
=
"100px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"CustomerID"
DataField
=
"CustomerID"
HeaderText
=
"CustomerID"
>
<
HeaderStyle
Width
=
"100px"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"EmployeeID"
DataField
=
"EmployeeID"
HeaderText
=
"EmployeeID"
/>
<
telerik:GridBoundColumn
UniqueName
=
"ShipVia"
DataField
=
"ShipVia"
HeaderText
=
"ShipVia"
/>
<
telerik:GridBoundColumn
UniqueName
=
"OrderDate"
DataField
=
"OrderDate"
HeaderText
=
"OrderDate"
/>
<
telerik:GridBoundColumn
UniqueName
=
"RequiredDate"
DataField
=
"RequiredDate"
HeaderText
=
"RequiredDate"
/>
<
telerik:GridBoundColumn
UniqueName
=
"ShipName"
DataField
=
"ShipName"
HeaderText
=
"ShipName"
/>
<
telerik:GridBoundColumn
UniqueName
=
"ShipCountry"
DataField
=
"ShipCountry"
HeaderText
=
"ShipCountry"
/>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
Scrolling-AllowScroll
=
"true"
>
</
ClientSettings
>
</
telerik:RadGrid
>
Thanks,
Shinu
0
Carlos
Top achievements
Rank 1
answered on 27 Sep 2013, 01:53 PM
Thanks,
That would work if i didnt had autogenerated columns. Is it a way to do it with autogenerated columns, and the horizontal scrollbar.
Best regards
That would work if i didnt had autogenerated columns. Is it a way to do it with autogenerated columns, and the horizontal scrollbar.
Best regards
0
Shinu
Top achievements
Rank 2
answered on 01 Oct 2013, 03:44 AM
Hi Carlos,
You can try the following code snippet to set width for the Autogenerated columns.
C#:
Thanks,
Shinu
You can try the following code snippet to set width for the Autogenerated columns.
C#:
protected
void
RadGrid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
foreach
(GridColumn col
in
RadGrid1.MasterTableView.AutoGeneratedColumns)
{
if
(col.DataType ==
typeof
(
int
))
{
col.HeaderStyle.Width = Unit.Pixel(100);
col.ItemStyle.Width = Unit.Pixel(100);
}
}
}
Thanks,
Shinu