Aug 14, 2013, 2:46 PM
[CLOSED] Nested Grids with checkbox selection model
Hi team,
We are working on nested grids, The reference is taken from
https://examples2.ext.net/#/GridPane...vel_GridPanel/
We have used Checkbox selectionModel in Both parent and child grids,
Now when I select(check) any item of the parent gird then the inner grid data is selected automatically
How can we stop this? Any solution is helpful.
here is the code to reproduce the issue
Thank you
Mohan
We are working on nested grids, The reference is taken from
https://examples2.ext.net/#/GridPane...vel_GridPanel/
We have used Checkbox selectionModel in Both parent and child grids,
Now when I select(check) any item of the parent gird then the inner grid data is selected automatically
How can we stop this? Any solution is helpful.
here is the code to reproduce the issue
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm7.aspx.cs" Inherits="Ext2._2Practice.WebForm7" %>
<%@ 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>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.Store1.DataSource = new object[]
{
new object[] { "3m Co", 71.72, 0.02, 0.03, "9/1 12:00am", "Manufacturing" },
new object[] { "Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am", "Manufacturing" },
new object[] { "Altria Group Inc", 83.81, 0.28, 0.34, "9/1 12:00am", "Manufacturing" },
new object[] { "American Express Company", 52.55, 0.01, 0.02, "9/1 12:00am", "Finance" }
};
this.Store1.DataBind();
this.storeInner.DataSource = new object[]
{
new object[] { 1204, "First"},
new object[] { 1505,"Second" },
new object[] { 2564, "Third"}
};
this.storeInner.DataBind();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:GridPanel ID="GridPanel1" runat="server" Title="RowExpander" Collapsible="true"
AnimCollapse="true" Icon="Table" Width="600" Height="600">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="company" />
<ext:ModelField Name="price" Type="Float" />
<ext:ModelField Name="change" Type="Float" />
<ext:ModelField Name="pctChange" Type="Float" />
<ext:ModelField Name="lastChange" Type="Date" DateFormat="M/d hh:mmtt" />
<ext:ModelField Name="industry" />
<ext:ModelField Name="desc" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Company" DataIndex="company" Flex="1" />
<ext:Column runat="server" Text="Price" DataIndex="price">
<Renderer Format="UsMoney" />
</ext:Column>
<ext:Column runat="server" Text="Change" DataIndex="change">
</ext:Column>
<ext:Column runat="server" Text="Change" DataIndex="pctChange">
</ext:Column>
<ext:DateColumn runat="server" Text="Last Updated" DataIndex="lastChange" />
</Columns>
</ColumnModel>
<View>
<ext:GridView runat="server" TrackOver="true" />
</View>
<SelectionModel>
<ext:CheckboxSelectionModel RowSpan="2" CheckOnly="true" runat="server" Mode="Multi" />
</SelectionModel>
<Plugins>
<ext:RowExpander ID="RowExpander1" SelectRowOnExpand="false" SwallowBodyEvents="true"
SingleExpand="false" runat="server">
<Component>
<ext:GridPanel ID="gpInner" runat="server">
<Store>
<ext:Store ID="storeInner" runat="server">
<Model>
<ext:Model ID="mdlOne" runat="server" IDProperty="rId">
<Fields>
<ext:ModelField Name="rId" />
<ext:ModelField Name="rName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="clrecordName" runat="server" Flex="1" Text="Name" DataIndex="rName">
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel ID="chkInner" ShowHeaderCheckbox="false" runat="server"
CheckOnly="true">
</ext:CheckboxSelectionModel>
</SelectionModel>
</ext:GridPanel>
</Component>
</ext:RowExpander>
</Plugins>
</ext:GridPanel>
</form>
</body>
</html>
Please contact if you need more explanationThank you
Mohan
Last edited by Daniil; Aug 20, 2013 at 9:11 AM.
Reason: [CLOSED]