[CLOSED] GridPanel RowSelectionModel

  1. #1

    [CLOSED] GridPanel RowSelectionModel

    Hello,

    I'm having a problem with the row selection model and postback events, please see the simplified example which demonstrates the issue and the replication steps below.

    Example.aspx:
    <%@ Page Language="C#" %>
    <%@ 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">
        protected void Page_Load(object sender, EventArgs e)
        {
            Store1.DataSource = new object[] {
                new object[] { 0, "Timothy" },
                new object[] { 1, "Geoffrey" },
                new object[] { 2, "Vladsch" }
            };
            Store1.DataBind();
        }
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            lblResult.Text = String.Concat("You selected: ", SearchResultSelection.SelectedRecordID);
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ScriptManager runat="server" AjaxViewStateMode="Include" StateProvider="Cookie" Theme="Gray" />
            <asp:ScriptManager runat="server" EnablePartialRendering="True" />
            <asp:UpdatePanel runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <ext:Store ID="Store1"
                        runat="server"
                        AutoLoad="True">
                        <Reader>
                            <ext:ArrayReader ReaderID="CustomerId">
                                <Fields>
                                    <ext:RecordField Name="CustomerId" />
                                    <ext:RecordField Name="Customer" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                    <ext:GridPanel ID="GridPanel1"
                        runat="server"
                        StoreID="Store1"
                        AutoHeight="True"
                        AutoExpandColumn="Customer"
                        ButtonAlign="Right"
                        FireSelect&#111;nload="True"
                        Stateful="True"
                        StripeRows="True"
                        Width="400">
                        <TopBar>
                            <ext:Toolbar runat="server">
                                <Items>
                                    <ext:ToolbarButton ID="btnEdit" runat="server" AutoPostBack="true" &#111;nclick="btnEdit_Click" Icon="UserEdit" Text="Edit" />
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <ColumnModel>
                            <Columns>
                                <ext:Column ColumnID="Customer" Header="Customer" DataIndex="Customer" Hideable="False" Sortable="True" />
                            </Columns>
                        </ColumnModel>
                        <SelectionModel>
                            <ext:RowSelectionModel ID="SearchResultSelection" runat="server" SingleSelect="True" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolBar runat="server" StoreID="Store1" DisplayInfo="True" DisplayMsg="Displaying Customers {0} - {1} of {2}" PageSize="1" Width="800" />
                        </BottomBar>
                    </ext:GridPanel>
                    <ext:Label ID="lblResult" runat="server" Text="Waiting ..." />
                </ContentTemplate>
            </asp:UpdatePanel>
        </form>
    </body>
    </html>
    Replication steps:

    1. Load page
    2. Select Timothy
    3. Click the Edit button; notice the label returns "You selected: 0"
    4. Use the next page arrow on gridpanel
    5. Select Geoffrey
    6. Click the Edit button; notice the label returns "You selected: 0" [wrong]
    7. Use the next page arrow on gridpanel
    8. Select Vladsch
    9. Click the Edit button; notice the label still returns "You selected: 0" [wrong]

    Cheers,
    Timothy
  2. #2

    RE: [CLOSED] GridPanel RowSelectionModel

    Correction, I was using revision 1060 and this appears to have been fixed in 1082.

    Cheers,
    Timothy

Similar Threads

  1. Replies: 13
    Last Post: Mar 29, 2012, 2:39 PM
  2. [CLOSED] GridPanel RowSelectionModel DirectEvents Select
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 15, 2012, 12:15 PM
  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. GridPanel RowSelectionModel firing
    By moth1 in forum 1.x Help
    Replies: 0
    Last Post: Jun 19, 2009, 12:19 AM
  5. Replies: 0
    Last Post: Dec 29, 2008, 8:19 AM

Posting Permissions