[CLOSED] Row Selection in grid panel

  1. #1

    [CLOSED] Row Selection in grid panel

    Hi,
    I am using paging concept in grid panel, this method "GrdPnl1.getRowsValues(true)" is worked fine in previous version to get the selected rows, after i updated Svn. this method returns empty value. then i used "GrdPnl1.getRowsValues(true, false, false, true)" to get the selected row, its working but it is very slow, it takes 10 to 15 seconds to select a row. in my grid there is 20 pages and page size is 20
  2. #2

    RE: [CLOSED] Row Selection in grid panel

    Hi,

    Can you create simple example which demonstrates the problem (both issues)?
  3. #3

    RE: [CLOSED] Row Selection in grid panel

    Hi,
    it is working fine in local machine, this is an issue which i faced in live. i am having two sites in live. one site is running with old dll. version 0.8, one site with latest coolite version. the row selection is very slow in new compare to other site
  4. #4

    RE: [CLOSED] Row Selection in grid panel

    Hi,

    Here is my test case, I don't see any problems. Can you modify this example to reproduce the problems which you described?

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Xml"%>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
        private object[] TestData
        {
            get
            {
                DateTime now = DateTime.Now;
                
                object[] data = new object[400];
    
                for (int i = 0; i < 400; i++)
                {
                    data[i] = new object[] {i+1, now};
                }
    
                return data;
            }
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!Ext.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
                this.Store1.DataBind(); 
            }
        }
    
        protected void MyData_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            this.Store1.DataSource = this.TestData;
            this.Store1.DataBind(); 
        }
       
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" />
           
            <ext:Store 
                ID="Store1"
                runat="server" 
                OnRefreshData="MyData_Refresh" >
                <Reader>
                    <ext:ArrayReader ReaderID="index">
                        <Fields>
                            <ext:RecordField Name="index" />
                            <ext:RecordField Name="lastChange" Type="Date" DateFormat="Y-m-dTh:i:s" />
                        </Fields>
                    </ext:ArrayReader>
                </Reader>
            </ext:Store>
            
            <ext:GridPanel ID="GridPanel1"
                runat="server" 
                StoreID="Store1" 
                StripeRows="true"
                Title="Array Grid" 
                Width="600" 
                Height="300"
                AutoExpandColumn="LastChange">
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="Index" Header="Index" Width="50" Sortable="true" DataIndex="index"/>
                       
                        <ext:Column ColumnID="LastChange" Header="Last Updated" Width="85" Sortable="true" DataIndex="lastChange">
                            <Renderer Fn="Ext.util.Format.dateRenderer('G:i:s')" />
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                
                <SelectionModel>
                    <ext:RowSelectionModel runat="server" />
                </SelectionModel>
                
                <LoadMask ShowMask="true" />
                
                <BottomBar>
                    <ext:PagingToolBar runat="server" PageSize="20" />
                </BottomBar>
                
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>                        
                            <ext:Button ID="Button1" runat="server" Text="Get Selection From Current Page">
                                <Listeners>
                                    <Click Handler="alert(Ext.encode(#{GridPanel1}.getRowsValues(true, false, false, true)))" />
                                </Listeners>
                            </ext:Button>
                            <ext:Button ID="Button2" runat="server" Text="Get Selection From All Pages">
                                <Listeners>
                                    <Click Handler="alert(Ext.encode(#{GridPanel1}.getRowsValues(true)))" />
                                </Listeners>
                            </ext:Button>           
                            
                        </Items>
                    </ext:Toolbar>
                </TopBar>
            </ext:GridPanel>  
        </form>
    </body>
    </html>
    If you don't need restore selection after grid's pages navigation and don't need 'Get Selection From All Pages' then set SelectionMemory="Disabled" for GridPanel

Similar Threads

  1. Grid Panel Selection Model
    By a_elsayed2010 in forum 1.x Help
    Replies: 7
    Last Post: Dec 26, 2013, 6:01 AM
  2. [CLOSED] Input Grid Panel Row selection in V1.0
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 03, 2011, 9:04 AM
  3. [CLOSED] Grid Panel - Disable Selection
    By GavinR in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 03, 2011, 4:02 PM
  4. [CLOSED] Row Selection in Grid panel
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 13, 2009, 7:48 AM
  5. Replies: 1
    Last Post: Jan 23, 2009, 6:43 AM

Posting Permissions