[CLOSED] RowSelectionModel REV 3986

  1. #1

    [CLOSED] RowSelectionModel REV 3986

    HI, i have update at the versione 3986, but i have a problem the load the store, the store il load but not show the data:
     protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
    
                    StoreContinenti.DataSource = QueryGeografia.CaricaContinenti();//Linq Query
                    StoreContinenti.DataBind();
                   
                    Session["EditModeContinente"] = "Read";
                }
            }
      <ext:Panel ID="PanelContinenti" runat="server" Region="West" Width="300" BodyPadding="3"
                    Layout="FitLayout" Split="true">
                    <Items>
                        <ext:GridPanel ID="GridPanelContinenti" runat="server" Title="Continenti"
                            StoreID="StoreContinenti">
                            <ColumnModel>
                                <Columns>
                                    <ext:Column runat="server" ID="ConCod" DataIndex="ConCod" Align="Left" Text="Codice" Width="100" />
                                    <ext:Column runat="server" ID="GruAziDes" DataIndex="ConDes" Align="Left" Flex="1" Text="Continente" />
                                </Columns>
                            </ColumnModel>
                            <SelectionModel>
                                <ext:RowSelectionModel ID="RowSelectionModelContinente" Mode="Single" runat="server">
                                    <Listeners>
                                        <Select Handler="enableButtonRowSelect(record);" />
                                    </Listeners>
                                </ext:RowSelectionModel>
                            </SelectionModel>
                        </ext:GridPanel>
                    </Items>
                </ext:Panel>
    If leave the section RowSelectionModel, it's work ok. The data in show in the gridpanel.
    the problem seems to be the RowSelectionModel and appear only then the page is not a postback. If call a directmethod that execute a postback then the page is load the data appear.
    In all prevoius versione it's work.


    Thanks
    Aurelio.
    Last edited by Daniil; May 05, 2012 at 9:29 PM. Reason: [CLOSED]
  2. #2
    Can you post test sample which we can test on our side?
  3. #3
    Hi, Vladimir...where is the sample:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="ARWebRevolution.WebForm3" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="">
        </ext:ResourceManager>
        <ext:Store ID="StoreContinenti" runat="server">
            <Model>
                <ext:Model ID="ModelContinenti" runat="server" >
                    <Fields>
                        <ext:ModelField Name="ConId" />
                        <ext:ModelField Name="ConCod" />
                        <ext:ModelField Name="ConDes" />
                    </Fields>
                </ext:Model>            
            </Model>            
        </ext:Store>
        <div>
            <ext:Panel ID="PanelContinenti" runat="server" Region="West" Width="300" BodyPadding="3"
                    Layout="AutoLayout" Split="true">
                    <Items>
                        <ext:GridPanel ID="GridPanelContinenti" runat="server" Title="Continenti"
                            StoreID="StoreContinenti">
                            <ColumnModel>
                                <Columns>
                                    <ext:Column runat="server" ID="ConCod" DataIndex="ConCod" Align="Left" Text="Codice" Width="100" />
                                    <ext:Column runat="server" ID="GruAziDes" DataIndex="ConDes" Align="Left" Flex="1" Text="Continente" />
                                </Columns>
                            </ColumnModel>
                            <SelectionModel>
                               <ext:RowSelectionModel ID="RowSelectionModelContinente" Mode="Single" runat="server">
                               
                              </ext:RowSelectionModel>
                            </SelectionModel>
                        </ext:GridPanel>
                        <ext:Button ID="Button1" runat="server" Text="Click to Show data at first load of the page">
                            <DirectEvents>
                                <Click OnEvent="clickHere" />
                            </DirectEvents>
                        </ext:Button>
                        <ext:TextField ID="TextField1" runat="server">
                        </ext:TextField>
                    </Items>
                </ext:Panel>
        </div>
        </form>    
    </body>
    </html>
    using System;
    using System.Collections.Generic;
    using Ext.Net;
    
    namespace ARWebRevolution
    {
        public partial class WebForm3 : System.Web.UI.Page
        {
            private IList<Continenti> lstContinenti;
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    loadData();
                    StoreContinenti.DataSource = lstContinenti;
                    StoreContinenti.DataBind();
    
                }
            }
    
            private void loadData()
            {
                lstContinenti = new List<Continenti>();
                lstContinenti.Add(new Continenti{ConId = 1, ConCod = "E", ConDes = "Europa"});
                lstContinenti.Add(new Continenti { ConId = 2, ConCod = "A", ConDes = "Asia" });
                lstContinenti.Add(new Continenti { ConId = 3, ConCod = "O", ConDes = "Oceania" });
            }
           
           public class Continenti
           {
               public int ConId { get; set; }
               public string ConCod { get; set; }
               public string ConDes { get; set; }
           }
    
           protected void clickHere(object sender, DirectEventArgs e)
           {
               //Refresh the UI and the show the data then first load of the page
               TextField1.Hidden = true;
    
           }
    
        }
    }
    Then load the page at first time, the data not show in thw grid, but if click the button the textField cause a refresh and the data now appear.

    Thanks
    Aurelio
  4. #4
    Thank you for the sample, please update from SVN and retest
  5. #5
    HI, Vladimir....okkkk work fine.

    Thanks
    Aurelio

Similar Threads

  1. [CLOSED] Store and SqlDataSource Rev >= 3986
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2012, 12:18 PM
  2. how to clear RowSelectionModel
    By wonderful_ecode in forum 1.x Help
    Replies: 1
    Last Post: Feb 26, 2010, 9:45 AM
  3. [CLOSED] [1.0] GridPanel and RowSelectionModel
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 11, 2010, 2:30 PM
  4. [CLOSED] GridPanel RowSelectionModel
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 09, 2009, 9:48 AM
  5. RowSelectionModel Help
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 0
    Last Post: Oct 24, 2008, 5:06 PM

Posting Permissions