Oct 30, 2008, 5:29 AM
How can I get content of everycells of selectedrow in gridpanel
I have used AjaxEvents Component to delete o row, but I don't know how to use method selModel.getSelected(), i only get selModel.getSelected().id.
Can I using
<ext:Store ID="DocumentsStore" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="ID" Type="Int" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="FileName" />
<ext:RecordField Name="FileCapacity" Type="Int" />
<ext:RecordField Name="FileType" />
</Fields>
</ext:JsonReader>
</Reader>
<UpdateProxy>
</UpdateProxy>
</ext:Store>
<ext:GridPanel runat="server" ID="DocumentsCtn" Frame="true" AutoWidth="true" TrackMouseOver="true"
Height="200">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column DataIndex="ID" Width="60" />
<ext:Column Header="TN" DataIndex="Name" Width="200">
<Editor>
<ext:TextField ID="NameEditCtn" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column Header="TN FILE" DataIndex="FileName" Width="200">
</ext:Column>
<ext:Column DataIndex="FileCapacity" Header="DUNG LNG (KB)" Width="120" />
<ext:Column DataIndex="FileType" Header="NH DNG" Width="120" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" SingleSelect="false" runat="server">
<Listeners>
<RowSelect Handler="#{DelBtn}.enable();" />
<RowDeselect Handler="if (!#{DocumentsCtn}.hasSelection()) {#{DelBtn}.disable();}" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
<Buttons>
<ext:Button ID="SaveBtn" runat="server" Text=" Lu " Icon="Disk">
<Listeners>
<Click Handler="#{DocumentsCtn}.save();" />
</Listeners>
</ext:Button>
<ext:Button ID="DelBtn" runat="server" Text="Xa" AutoPostBack="false" Icon="Delete">
<AjaxEvents>
<Click OnEvent="DelBtn_Click" Success="#{DocumentsCtn}.deleteSelected();" Before="return #{DocumentsCtn}.hasSelection();">
<UserParams>
<ext:Parameter Name="SelectedDocument" Value="#{DocumentsCtn}.selModel.getSelected().id"
Mode="Raw" />
</UserParams>
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{DocumentsCtn}.body" />
</Click>
</AjaxEvents>
</ext:Button>
</Buttons>
<SaveMask ShowMask="true" Msg="Saving" />
<LoadMask ShowMask="true" />
</ext:GridPanel>
Can I using
<ext:Parameter Name="SelectedDocument" Value="#{DocumentsCtn}.selModel.getSelected().ID"
Mode="Raw" />
OR<ext:Parameter Name="SelectedDocument" Value="#{DocumentsCtn}.selModel.getSelected().Name"
Mode="Raw" />
Thank you.