Hi guy,
Just want to know if it is possible to have a radGrid with his height set to 100% and with a scrollbar, because everytime I tried, it really don't work. By exemple, I took this example and I put the height of the grid to 100% and it start f*** up. Here is the code:
So, anyone have a solution to correct this problem ?
Thank you
David Lefaivre-B.
Just want to know if it is possible to have a radGrid with his height set to 100% and with a scrollbar, because everytime I tried, it really don't work. By exemple, I took this example and I put the height of the grid to 100% and it start f*** up. Here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
</
head
>
<
body
class
=
"BODY"
>
<
form
runat
=
"server"
id
=
"mainForm"
method
=
"post"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
br
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox3"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox4"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"DropDownList1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
DataSourceID
=
"SqlDataSource1"
ShowFooter
=
"True"
GridLines
=
"None"
AllowSorting
=
"True"
Width
=
"750px"
Height
=
"100%"
runat
=
"server"
AutoGenerateColumns
=
"false"
>
<
PagerStyle
Mode
=
"NumericPages"
/>
<
MasterTableView
Width
=
"100%"
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"ProductID"
DataField
=
"ProductID"
HeaderText
=
"ProductID"
SortExpression
=
"ProductID"
Aggregate
=
"Count"
/>
<
telerik:GridBoundColumn
UniqueName
=
"ProductName"
DataField
=
"ProductName"
HeaderText
=
"ProductName"
SortExpression
=
"ProductName"
Aggregate
=
"None"
/>
<
telerik:GridBoundColumn
UniqueName
=
"QuantityPerUnit"
DataField
=
"QuantityPerUnit"
HeaderText
=
"Quantity Per Unit"
SortExpression
=
"QuantityPerUnit"
/>
<
telerik:GridNumericColumn
Aggregate
=
"Avg"
DataField
=
"UnitPrice"
HeaderText
=
"Unit price"
SortExpression
=
"UnitPrice"
UniqueName
=
"UnitPrice"
DataFormatString
=
"{0:C}"
FooterAggregateFormatString
=
"Avg: {0:C}"
/>
<
telerik:GridNumericColumn
Aggregate
=
"Sum"
DataField
=
"UnitsInStock"
HeaderText
=
"In Stock"
SortExpression
=
"UnitsInStock"
UniqueName
=
"UnitsInStock"
/>
<
telerik:GridNumericColumn
Aggregate
=
"Max"
DataField
=
"UnitsOnOrder"
HeaderText
=
"Units On Order"
SortExpression
=
"UnitsOnOrder"
UniqueName
=
"UnitsOnOrder"
/>
</
Columns
>
</
MasterTableView
>
<
HeaderStyle
Width
=
"200px"
/>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"True"
>
</
Scrolling
>
</
ClientSettings
>
</
telerik:RadGrid
>
<
br
/>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT TOP 20 ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder FROM Products"
runat="server"></
asp:SqlDataSource
>
</
form
>
</
body
>
</
html
>
So, anyone have a solution to correct this problem ?
Thank you
David Lefaivre-B.