Jul 25, 2014, 7:23 PM
[CLOSED] GridPanel - Check rows in server side
Hi,
I had a panelgrid with CheckboxSelectionModel.
I need a help to check a rows from my gridpanel in server side.
I tried this code, but didn?t work.
<--this works
thank you in advance.
I had a panelgrid with CheckboxSelectionModel.
I need a help to check a rows from my gridpanel in server side.
I tried this code, but didn?t work.
foreach (Class.Type objtype in existTypes)
{
int idType = objtype.IdType;
//this doesn?t work
GridPanelType.Listeners.ViewReady.Handler = "this.getSelectionModel().selectRow(" + idType + ");";
}
My code:<--this works
protected void LoadGridTypes()
{
Store store = this.GridPanelType.GetStore();
store.DataSource = new object[]
{
new object[] { "0", "finance" },
new object[] { "1", "hr" },
new object[] { "2", "it" },
new object[] { "3", "account" },
};
store.DataBind();
}
<--this works<ext:GridPanel
ID="GridPanelType"
runat="server"
MultiSelect="true"
Flex="1"
Margins="0 0 0 3"
>
<Store>
<ext:Store ID="Store4" runat="server">
<Model>
<ext:Model ID="Model4" runat="server">
<Fields>
<ext:ModelField Name="Id" />
<ext:ModelField Name="Type" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column ID="Type" runat="server" Width="115" DataIndex="Type" Text="Type"/>
<ext:Column ID="Id" runat="server" Width="60" DataIndex="Id" Visible="false"/>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" Mode="Multi" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
thank you in advance.
Last edited by Daniil; Jul 31, 2014 at 5:31 AM.
Reason: [CLOSED]