Telerik Grid Have Extra Space

13 posts, 0 answers
  1. SP
    SP avatar
    3 posts
    Member since:
    Aug 2006

    Posted 04 Jan 2009 Link to this post

    Hi there,

    I am using telerik. In which i have facilitate with virtual loading. I am facing problem when i use to provide scroll for the grid. When the grid having less number of data, the grid height is getting reduce, but the same time when i use to scroll down vertical scroll bar,i am seeing some extra space is there. For example, in my grid i am having 22 data over there, and the page size is 20. Then in first page its coming in actual size and in the second page, the grid height is getting reduce according to data height but with some white space. I am using one javascript coding for this: i.e.
    <script type="text/javascript">
      function GridCreated()   
      {              
         var grid = document.getElementById('<%=rgCustomer.ClientID %>');                 
         var scrollArea = document.getElementById("ctl00_DataNowContantHolder_rgCustomer_GridData");
         var dataHeight =  document.getElementById("ctl00_DataNowContantHolder_rgCustomer_ctl00");    
         var GridArea = document.getElementById("ctl00_DataNowContantHolder_rgCustomer")
         if(dataHeight.clientHeight < 350)
         {        
             scrollArea.style.height = dataHeight.clientHeight + "px"; 
             scrollArea.style.overflow = "auto";    
         }        
      }
      </script>
    But in the same time if i will Change (scrollArea.style.overflow = "hidden"; ) then the grid don't have extra space and also the scroll bar will not be there. But i want the grid should have scroll bar without extra space.
    Can anybody help me to come out of this problem?

    Vimal Kumar Srivastava
    Madhepura(Bihar)
    Email Id: vimaltech04@gmail.com

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 05 Jan 2009 Link to this post

    Hi SP,

    I am afraid I do not understand very well which empty space you are talking about. Can you please post your RadGrid declaration here and some screenshots?

    Best wishes,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 16 Feb 2009 Link to this post

    Hi Dimo,

    Thanks for your reply.
    I am sending you my radgrid declaration, But it seems there is no option is given to post the screen shot, Can you please send me your email id, so that i can send the screen shot on your mail id. Here is my radgrid sample:

    <telerik:RadGrid Width="979px" ID="radgrid1" runat="server" GridLines="Horizontal" Skin="WebBlue" AllowSorting="True" AllowPaging="True" PageSize="15" AutoGenerateColumns="false" OnNeedDataSource="radgrid1_NeedDataSource" OnPreRender="radgrid1_PreRender">

     

     

     

     

    Here i have declare the page size is 15, but when i move to second page, in  which i have only 3 data, then it wil show three data and for rest twelve data place, it's showing white space. The grid created function working properly. The problem is with virtual loading, when i use to scroll down and next page is getting load, it taking the space for all 15 data. And showing white space in the place of rest 12 data.  The grid created function i am using for this is:

    <script type="text/javascript">
    //------ Grid Resize ------ //
    function GridCreated() {
    var scrollArea = document.getElementById("<%= radgrid1.ClientID %>" + "_GridData");

     

    var dataHeight = document.getElementById("ctl00_ContentPlaceHolder1_radgrid1_ctl00");

     

    if(dataHeight.clientHeight < 100) {

     

    scrollArea.style.height = dataHeight.clientHeight + 20 + "px";

     

    scrollArea.style.overflow =

    "auto";

     

     

    }

     

    }

    </script>

    Please help me to come out of this problem.

    Regards:
    Vimal Kumar Srivastava
    Madhepura(Bihar)
    Email Id: vimaltech04@gmail.com


     

     

     

     

     

     

     

     

  5. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 17 Feb 2009 Link to this post

    Hi Dimo ,

    Still i am waiting for your reply. Let me know that, Whether my question is clear for you?

    Reagards,

    Vimal Kumar Srivastava
    Email Id: vimaltech04@gmail.com
  6. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 17 Feb 2009 Link to this post

    Hello Vimal,

    I am afraid the provided information is still not enough. I suppose that some Javascript calculations and size settings are incorrect, but I can't be sure.

    Please send a complete RadGrid declaration, not just the opening tag. It will be best if you open a new support ticket and send me a runnable web page, which demonstrates the problem.

    Users are not allowed to attach files in the forum, but you can attach files in formal support tickets.

    Looking forward to your reply.


    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 17 Feb 2009 Link to this post

    Hi Dimo,
    Thanks for your reply.
    Here i am sending you my full .aspx page.

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
        CodeFile="IssueList.aspx.cs" Inherits="IssueList" Title="Datascan, LP - Issue Tracker" %> 
     
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
        <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"
     
            <script type="text/javascript">   
                 window.onresize = reSize
                 var browser=navigator.appName; 
                 var b_version=navigator.appVersion; 
                 var version=parseFloat(b_version); 
                 var func; 
                 function reSize() 
                 { 
                   grid = document.getElementById('<%=rgIssueList.ClientID %>');                 
                   h = 0
                   w = 0
                   if(!window.innerWidth) 
                   { 
                     //strict mode 
                       if(!(document.documentElement.clientWidth == 0)) 
                       { 
                       w = document.documentElement.clientWidth; 
                        h = document.documentElement.clientHeight; 
                      } 
                     //quirks mode 
                      else 
                      { 
                        w = document.body.clientWidth; 
                        h = document.body.clientHeight; 
                      } 
                   } 
                   //w3c 
                   else 
                   { 
                     w = window.innerWidth-20; 
                     h = window.innerHeight-50; 
                   } 
                   if((browser=="Netscape") && (version>=3)) 
                   { 
                      
                     if(func!="test"){ 
                     if(h-205 > 20) 
                     { 
                       grid.style.height = (h - 105) + "px"; 
                     } 
                     else 
                     { 
                       grid.style.height = 100
                     } 
                   } 
                   if(w-590 > 100) 
                   { 
                     grid.style.width = (w - 25) + "px"; 
                   }     
                   else 
                   { 
                     grid.style.width = "650px"
                   }         
                 } 
                 else if((browser=="Microsoft Internet Explorer") && (version>=3)) 
                 { 
                   if(func!="test") 
                   { 
                     if(h-335 > 20) 
                     { 
                       grid.style.height = (h - 200) + "px"; 
                     } 
                     else 
                     { 
                       grid.style.height = 150
                     } 
                   } 
                   else 
                   { 
                     if(h-185 > 20) 
                     { 
                       grid.style.height = 75
                     } 
                     else 
                     { 
                     } 
                   } 
                   if(w-590 > 100) 
                   { 
                     grid.style.width = (w - 5) + "px"; 
                   }     
                   else 
                   { 
                     grid.style.width = "600px"
                   }         
                 } 
                 else 
                 { 
                   if(h-305 > 20) 
                   { 
                     grid.style.height = (h - 180) + "px"; 
                   } 
                   else 
                   { 
                     grid.style.height = 100
                   } 
                   if(w-590 > 100) 
                   { 
                     grid.style.width = (w - 25) + "px"; 
                   }     
                   else 
                   { 
                     grid.style.width = "600px"
                   }         
                 }     
               };             
            </script> 
     
            <script type="text/javascript"
            //------ Grid Resize ------ //                   
            var browser=navigator.appName; 
            var b_version=navigator.appVersion; 
            var version=parseFloat(b_version); 
            function GridCreated()    
            { 
              var scrollArea = document.getElementById("<%= rgIssueList.ClientID %>" + "_GridData");                              
              var dataHeight =  document.getElementById("ctl00_ContentPlaceHolder1_rgIssueList_ctl00");     
                   
              if((browser=="Microsoft Internet Explorer") && (version>=3)) 
              { 
              if(dataHeight.clientHeight < 100
                { 
                  func ="test"
                  scrollArea.style.height = dataHeight.clientHeight + 10 + "px"; 
                  scrollArea.style.overflow = "auto"
                } 
                else 
                { 
                } 
              } 
              else 
              { 
                if(dataHeight.clientHeight < 350
                {     
                  func ="test"
                  scrollArea.style.height = dataHeight.clientHeight + 20 + "px"; 
                  alert(scrollArea.style.width); 
                  scrollArea.style.overflow = "auto"
                } 
                else 
                  { 
                  } 
                } 
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Row Double Click ------ // 
            function RowDblClick(sender, eventArgs) 
            { 
              var index = eventArgs.get_itemIndexHierarchical();                
              document.getElementById("radGridClickedRowIndex").value = index;       
              $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RowDblClicked");             
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Row Right Click ------ // 
            function RowContextMenu(sender, eventArgs) 
            {               
              var menu = $find("<%=RadMenu1.ClientID %>"); 
              var evt = eventArgs.get_domEvent(); 
              if(evt.target.tagName == "INPUT" || evt.target.tagName == "A") 
              { 
                return; 
              } 
                    
              var index = eventArgs.get_itemIndexHierarchical(); 
              document.getElementById("radGridClickedRowIndex").value = index
                    
              sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true); 
              menu.show(evt); 
               
              evt.cancelBubble = true
              evt.returnValue = false
              if (evt.stopPropagation) 
              { 
                evt.stopPropagation(); 
                evt.preventDefault(); 
              } 
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Enter key for search button ------ // 
            function clickButton(e) 
            {                
              var eevt = e ? e : window.event; 
              var bt = document.getElementById('btnSrch');       
              if (bt) 
              { 
                if (evt.keyCode == 13) 
                { 
                  bt.click(); 
                  return false; 
                } 
              } 
            } 
            </script> 
     
        </telerik:RadScriptBlock> 
        <h2> 
            Issues</h2> 
        <table bgcolor="LightSteelBlue" cellpadding="0" cellspacing="0"
            <tr> 
                <td> 
                    <table cellpadding="3" cellspacing="0"
                        <tr> 
                            <td style="height: 29px"
                                <asp:Button ID="btnAdd" runat="server" Text="Add" CssClass="styButton" OnClick="btnAdd_Click" /></td
                            <td style="height: 29px"
                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="styButton" OnClick="btnCancel_Click"
                                </asp:Button></td
                            <td class="styLabel" style="height: 29px"
                                Search Text:</td> 
                            <td style="height: 29px"
                                <asp:TextBox ID="txtSearch" runat="server" CssClass="styDefault" onkeypress="javascript:return clickButton(event)"></asp:TextBox></td
                            <td class="styLabel" style="height: 29px"
                                View:</td> 
                            <td style="height: 29px"
                                <asp:DropDownList ID="ddlView" AutoPostBack="true" runat="server" EnableViewState="False" 
                                    OnChange="Search()"
                                    <asp:ListItem>Unapproved</asp:ListItem> 
                                    <asp:ListItem>Unassigned</asp:ListItem> 
                                    <asp:ListItem Selected="True">Open issues by priority</asp:ListItem> 
                                    <asp:ListItem>Open issues by customer</asp:ListItem> 
                                    <asp:ListItem>Open test issues</asp:ListItem> 
                                    <asp:ListItem>Recently changed</asp:ListItem> 
                                    <asp:ListItem>Scanner group</asp:ListItem> 
                                    <asp:ListItem>Server group</asp:ListItem> 
                                    <asp:ListItem>Test group</asp:ListItem> 
                                    <asp:ListItem>All</asp:ListItem> 
                                </asp:DropDownList></td
                            <td style="height: 29px"
                                <input id="btnSrch" class="styButton" type="button" value="Search" onclick="Search()" /> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                    <table cellspacing="0" cellpadding="0"
                        <tr> 
                            <td> 
                                <telerik:RadGrid Width="979px" ID="rgIssueList" runat="server" GridLines="Horizontal" 
                                    Skin="WebBlue" AllowSorting="True" AllowPaging="True" PageSize="15" AutoGenerateColumns="false" 
                                    OnNeedDataSource="rgIssueList_NeedDataSource" OnPreRender="rgIssueList_PreRender"
                                    <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" EnableRowHoverStyle="true"
                          <ClientEvents OnGridCreated="GridCreated" OnRowDblClick="RowDblClick" OnRowContextMenu="RowContextMenu"
                                        </ClientEvents> 
                                        <DataBinding EnableCaching="True" /> 
                                        <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"
                                        </Resizing> 
                                        <Selecting AllowRowSelect="True"></Selecting> 
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" EnableVirtualScrollPaging="True" /> 
                                    </ClientSettings> 
                                    <MasterTableView TableLayout="Auto" Width="100%" DataKeyNames="issue_id,assigned_to"
                                        <Columns> 
                                            <telerik:GridBoundColumn DataField="issue_id" HeaderText="Issue" SortExpression="issue_id" 
                                                UniqueName="issue_id" HeaderStyle-Width="35px"
                                            </telerik:GridBoundColumn> 
                                          <telerik:GridBoundColumn DataField="customer_desc" HeaderText="Customer" SortExpression="customer_desc" 
                                                UniqueName="customer_desc" HeaderStyle-Width="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="job_number" HeaderText="Job" SortExpression="job_number" 
                                                UniqueName="job_number" HeaderStyle-Width="25px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="job_desc" HeaderText="Job Desc" SortExpression="job_desc" 
                                                UniqueName="job_desc" HeaderStyle-Width="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="system" HeaderText="System" SortExpression="system" 
                                                UniqueName="system" HeaderStyle-Width="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="subsystem" HeaderText="Sub System" SortExpression="subsystem" 
                                                UniqueName="subsystem" HeaderStyle-Width="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="title" HeaderText="Title" SortExpression="title" 
                                                UniqueName="title" HeaderStyle-Width="120px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="due_date" HeaderText="Due" SortExpression="due_date" 
                                                DataFormatString="{0:MM/dd/yyyy}" UniqueName="due_date" HeaderStyle-Width="50px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="priority" HeaderText="Priority" SortExpression="priority" 
                                                UniqueName="priority" HeaderStyle-Width="50px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="status" HeaderText="Status" SortExpression="status" 
                                                UniqueName="status" HeaderStyle-Width="80px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="assigned_to" HeaderText="Assigned" SortExpression="assigned_to" 
                                                UniqueName="assigned_to" HeaderStyle-Width="80px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="tester" HeaderText="Tester" SortExpression="tester" 
                                                UniqueName="tester" HeaderStyle-Width="80px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="last_modified" HeaderText="Modified" SortExpression="last_modified" 
                                                DataFormatString="{0:MM/dd/yyyy}" UniqueName="last_modified" HeaderStyle-Width="60px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="last_modified_by" HeaderText="Modified By" SortExpression="last_modified_by" 
                                                UniqueName="last_modified_by" HeaderStyle-Width="80px"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="created_by" HeaderText="Created by" SortExpression="created_by" 
                                                UniqueName="created_by" HeaderStyle-Width="80px"
                                            </telerik:GridBoundColumn> 
                                        </Columns> 
                                    </MasterTableView> 
                                    <ItemStyle Font-Size="9pt" HorizontalAlign="left" /> 
                                    <AlternatingItemStyle Font-Size="9pt" HorizontalAlign="left" /> 
                                    <HeaderStyle Font-Bold="true" Font-Size="9pt" /> 
                                    <PagerStyle Visible="false" /> 
                                </telerik:RadGrid> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                               <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
                                    <AjaxSettings> 
                                        <telerik:AjaxSetting AjaxControlID="ddlView"
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="rgIssueList" LoadingPanelID="AjaxLoadingPanel1" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                        <telerik:AjaxSetting AjaxControlID="rgIssueList"
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="rgIssueList" LoadingPanelID="AjaxLoadingPanel1" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="rgIssueList" LoadingPanelID="AjaxLoadingPanel1" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                    </AjaxSettings> 
                                </telerik:RadAjaxManager> 
                                <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="100%" 
                                    BackColor="#E0E0E0" Width="100%" Transparency="50"
                                    <img alt="Loading..." src="Images/ajax-loader.gif" style="border: 0;" /> 
                                </telerik:RadAjaxLoadingPanel> 
                                <input type="hidden" id="radGridClickedRowIndex" name="radGridClickedRowIndex" /> 
                                <telerik:RadContextMenu ID="RadMenu1" runat="server" Skin="Gray" OnItemClick="RadMenu1_ItemClick"
                                    <Items> 
                                        <telerik:RadMenuItem Text="View" runat="server" /> 
                                    </Items> 
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </telerik:RadContextMenu> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="9" align="left" bgcolor="lightcyan" style="height: 18px"
                    <span class="styLabel">Status:</span> 
                    <asp:Label ID="lblStatus" runat="server" ForeColor="Green" CssClass="styDefault"></asp:Label> 
                </td> 
            </tr> 
        </table> 
        <asp:ObjectDataSource ID="odsIssueList" runat="server" OldValuesParameterFormatString="original_{0}" 
            SelectMethod="GetData" TypeName="IssueDALTableAdapters.IssueListTableAdapter"
            <SelectParameters> 
                <asp:ControlParameter ControlID="txtSearch" Name="search_string" PropertyName="Text" 
                    Type="String" /> 
                <asp:ControlParameter ControlID="ddlView" Name="view_name" PropertyName="SelectedValue" 
                    Type="String" /> 
            </SelectParameters> 
        </asp:ObjectDataSource> 
    </asp:Content> 


    Regards,
    Vimal Kumar Srivastava
    Madhepura, Bihar
    Email Id: vimaltech04@gmail.com
  8. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 17 Feb 2009 Link to this post

    Hi Dimo ,

    I have sent you the full page. And also tried to send you the screen shot. But it seems there is no option available to post the screen shot. So, if you will send me your mail id or if you can tell me the way how to post the screen shot, then that will be much better.
    Also i have sent you my full aspx Coding page. I think now it will be easy for you to go through that, and also to get what all the facilitate is provided to the grid. Waiting for your reply.

    Regards:
    Vimal Kumar Srivastava
    Email Id: vimaltech04@gmail.com

  9. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 18 Feb 2009 Link to this post

    Hi Dimo ,

    I am using same telerik grid for my all pages. And due to this issues my all pages are still pending. So can you reply soon.

    Regards:
    Vimal Kumar Srivastava
    Email Id: vimaltech04@gmail.com
  10. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 18 Feb 2009 Link to this post

    Hi Vimal,

    Thanks for the sample page.

    There is an easier and less troublesome way to resize RadGrid on the client. Generally, you should not set any heights to RadGrid inner elements such as the scrollable data area or the mastertableview - the control has a mechanism to adjust its dimensions automatically if you call the repaint() method to the RadGrid client object (this is not the HTML element).

    Here is an example:

    <%@ Page Language="C#" %> 
    <%@ Import Namespace="System.Data" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <!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"
    <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    <title>RadControls for ASP.NET AJAX</title> 
    </head> 
    <body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
     
       <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"
     
            <script type="text/javascript">   
                 window.onresize = reSize
                 var browser=navigator.appName; 
                 var b_version=navigator.appVersion; 
                 var version=parseFloat(b_version); 
                 var func; 
                 function reSize() 
                 { 
                    GridCreated(); 
                 }            
            </script> 
     
            <script type="text/javascript"
            //------ Grid Resize ------ //                   
            var browser=navigator.appName; 
            var b_version=navigator.appVersion; 
            var version=parseFloat(b_version); 
            function GridCreated()    
            { 
                $get("<%= rgIssueList.ClientID %>").style.height = document.documentElement.clientHeight - 140 + "px"; 
                $find("<%= rgIssueList.ClientID %>").repaint(); 
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Row Double Click ------ // 
            function RowDblClick(sender, eventArgs) 
            { 
     
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Row Right Click ------ // 
            function RowContextMenu(sender, eventArgs) 
            {               
     
            } 
            </script> 
     
            <script type="text/javascript"
            //------ Enter key for search button ------ // 
            function clickButton(e) 
            { 
     
            } 
            </script> 
     
        </telerik:RadScriptBlock> 
        <h2> 
            Issues</h2> 
        <table bgcolor="LightSteelBlue" cellpadding="0" cellspacing="0"
            <tr> 
                <td> 
                    <table cellpadding="3" cellspacing="0"
                        <tr> 
                            <td style="height: 29px"
                                <asp:Button ID="btnAdd" runat="server" Text="Add" CssClass="styButton" /></td
                            <td style="height: 29px"
                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="styButton"
                                </asp:Button></td
                            <td class="styLabel" style="height: 29px"
                                Search Text:</td> 
                            <td style="height: 29px"
                                <asp:TextBox ID="txtSearch" runat="server" CssClass="styDefault" onkeypress="javascript:return clickButton(event)"></asp:TextBox></td
                            <td class="styLabel" style="height: 29px"
                                View:</td> 
                            <td style="height: 29px"
                                <asp:DropDownList ID="ddlView" AutoPostBack="true" runat="server" EnableViewState="False" 
                                    OnChange="Search()"
                                    <asp:ListItem>Unapproved</asp:ListItem> 
                                    <asp:ListItem>Unassigned</asp:ListItem> 
                                    <asp:ListItem Selected="True">Open issues by priority</asp:ListItem> 
                                    <asp:ListItem>Open issues by customer</asp:ListItem> 
                                    <asp:ListItem>Open test issues</asp:ListItem> 
                                    <asp:ListItem>Recently changed</asp:ListItem> 
                                    <asp:ListItem>Scanner group</asp:ListItem> 
                                    <asp:ListItem>Server group</asp:ListItem> 
                                    <asp:ListItem>Test group</asp:ListItem> 
                                    <asp:ListItem>All</asp:ListItem> 
                                </asp:DropDownList></td
                            <td style="height: 29px"
                                <input id="btnSrch" class="styButton" type="button" value="Search" onclick="Search()" /> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                    <table cellspacing="0" cellpadding="0"
                        <tr> 
                            <td id="GridTableCell"
                                <telerik:RadGrid Width="979px" ID="rgIssueList" runat="server" GridLines="Horizontal" 
                                    Skin="WebBlue" AllowSorting="True" AllowPaging="True" PageSize="40" 
                                    OnNeedDataSource="rgIssueList_NeedDataSource"
                                    <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" EnableRowHoverStyle="true"
                          <ClientEvents OnGridCreated="GridCreated" OnRowDblClick="RowDblClick" OnRowContextMenu="RowContextMenu"
                                        </ClientEvents> 
                                        <DataBinding EnableCaching="True" /> 
                                        <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"
                                        </Resizing> 
                                        <Selecting AllowRowSelect="True"></Selecting> 
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" EnableVirtualScrollPaging="True" /> 
                                    </ClientSettings> 
                                    <MasterTableView TableLayout="Fixed"
                                    </MasterTableView> 
                                    <ItemStyle Font-Size="9pt" HorizontalAlign="left" /> 
                                    <AlternatingItemStyle Font-Size="9pt" HorizontalAlign="left" /> 
                                    <HeaderStyle Font-Bold="true" Font-Size="9pt" /> 
                                    <PagerStyle Visible="false" /> 
                                </telerik:RadGrid> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                               <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                                    <AjaxSettings> 
                                        <telerik:AjaxSetting AjaxControlID="rgIssueList"
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="rgIssueList" LoadingPanelID="AjaxLoadingPanel1" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                    </AjaxSettings> 
                                </telerik:RadAjaxManager> 
                                <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="100%" 
                                    BackColor="#E0E0E0" Width="100%" Transparency="50"
                                    <img alt="Loading..." src="Images/ajax-loader.gif" style="border: 0;" /> 
                                </telerik:RadAjaxLoadingPanel> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="9" align="left" bgcolor="lightcyan" style="height: 18px"
                    <span class="styLabel">Status:</span> 
                    <asp:Label ID="lblStatus" runat="server" ForeColor="Green" CssClass="styDefault"></asp:Label> 
                </td> 
            </tr> 
        </table> 
     
    </form> 
    </body> 
    </html> 
     


    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 24 Feb 2009 Link to this post

    Hi Dimo,

    Thanks for review my code, And also thanks for sending sample code. But here i would like to tell some thing:
    First thing that inside Window.onresize function you called grid created function. So directly its  affecting my resizing problem, now when ever i will resize my window the grid will not get resize according to window size, Because you have removed the resizing function itself, so that grid stopped resizing according to window height and width. And the second thing is that my problem is same, because this code came from my sample code, which i have used in all way. So once again its not working for me and still the grid is having extra white space.

    Regards:
    Vimal Kumar Srivastava
    Email Id: vimaltech04@gmail.com

  12. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 24 Feb 2009 Link to this post

    Hello Vimal,

    I stripped your page and removed all the unnecessary Javascript calculations in order to show you how you can resize RadGrid together with the browser window resize.

    If you can't understand any part from my sample page, let me know.

    Surely, you will have to rework your code in order to apply my suggestion and I hope you will manage to do that. Still, if you have any specific difficulties, let us know, but please, provide specific information what exactly the problem is.

    Best wishes,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  13. senthil
    senthil avatar
    23 posts
    Member since:
    Dec 2008

    Posted 06 Apr 2009 Link to this post

    Hi Dimo,

    This Repaint () working fine for height resize. Now I need it work for width also, Please help me Dimo.
  14. Vimal Kumar
    Vimal Kumar avatar
    43 posts
    Member since:
    Dec 2008

    Posted 07 Sep 2009 Link to this post

    Thanks for help. I got the solution. I am using javascript, And it's work fine.

    Regards:
    Vimal Kumar Srivastava
    Madhepura(Bihar)
    Email Id: vimaltech04@gmail.com

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017