Hi There,
I am working on telerik grid. I am trying to resize my grid according to window size, And i am able to resize my grid according to window size but The problem i am facing is here, that in my grid i am using ten column, but in grid only three column is visible, and also i am unable to get horizontal scroll bar, so i can't scroll and can see the rest column. The coding which i am using for this is given below:
Can any body help me to come out of this problem...
Regards:
Vimal Kumar Srivastava
Madhepura, Bihar
Email Id: vimaltech04@gmail.com
I am working on telerik grid. I am trying to resize my grid according to window size, And i am able to resize my grid according to window size but The problem i am facing is here, that in my grid i am using ten column, but in grid only three column is visible, and also i am unable to get horizontal scroll bar, so i can't scroll and can see the rest column. The coding which i am using for this is given below:
| Masterpage.master |
| ------------------------- |
| <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Masterpage.master.cs" Inherits="Masterpage" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title>Untitled Page</title> |
| <style type="text/css"> |
| html |
| { |
| overflow:auto; |
| } |
| html, |
| body, |
| form |
| { |
| margin:0; |
| height:100%; |
| } |
| </style> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server" /> |
| <table style="height: 90%; width: 100%;" cellpadding="0" cellspacing="0"> |
| <tr> |
| <td style="height:90%;"> |
| <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> |
| </asp:ContentPlaceHolder> |
| </td> |
| </tr> |
| </table> |
| </form> |
| </body> |
| </html> |
| GridResize.aspx |
| ------------------- |
| <%@ Page Language="C#" MasterPageFile="~/Masterpage.master" AutoEventWireup="true" CodeFile="GridResize.aspx.cs" |
| Inherits="GridResize" Title="Untitled Page" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> |
| <table style="height: 90%; width: 90%;"> |
| <tr> |
| <td style="height: 90%; width: 90%;" valign="top"> |
| <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="XmlDataSource1" AllowPaging="true" |
| PageSize="40" Width="90%" Height="100%" Style="border: 0; outline: none"> |
| <MasterTableView TableLayout="Auto" AutoGenerateColumns="false"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="id" HeaderText="Issue" SortExpression="id" |
| UniqueName="id" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname1" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname2" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname3" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname4" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname5" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname6" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname7" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname8" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname9" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname10" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname11" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="firstname" HeaderText="firstname12" SortExpression="firstname" |
| UniqueName="firstname" HeaderStyle-Width="40%" ItemStyle-Width="40%"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnableRowHoverStyle="true"> |
| <Selecting AllowRowSelect="true" /> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| </ClientSettings> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| </telerik:RadGrid> |
| <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/datasource.xml" /> |
| </td> |
| </tr> |
| </table> |
| </asp:Content> |
Regards:
Vimal Kumar Srivastava
Madhepura, Bihar
Email Id: vimaltech04@gmail.com