Aug 30, 2011, 2:48 PM
how I can get the contents of a cell in a gridpanel, and the row number (or cell number)? (code server)
hi all
I have the following questions (I hope I can help)
1.- how I can get the contents of a cell in a gridpanel? (code server)
for example
I have the following grid
Example (gridpanel is the same as the previous query)
aspx.vb code
thanks for the help you can provideme
I have the following questions (I hope I can help)
1.- how I can get the contents of a cell in a gridpanel? (code server)
for example
I have the following grid
<ext:GridPanel
ID="grdRecursosEmpresa"
runat="server"
StoreID="stRecursos"
TrackMouseOver="true"
DDGroup="GridDDGroup"
EnableDragDrop="true"
Width="390"
Height="630"
StripeRows="true"
Header="True"
Border="True">
<LoadMask ShowMask="false" />
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
<DirectEvents>
<RowSelect OnEvent="Row_Click" />
</DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="Cod_Recurso" Header="Codigo" Width="160" DataIndex="Cod_Recurso" Hidden="true" />
<ext:Column DataIndex="Nom_Recurso" Header="Nombre" Width="120" />
<ext:Column DataIndex="Tip_Recurso" Header="Tipo" Width="40" Hidden="false"/>
<ext:Column DataIndex="Cod_Faena" Header="FaenaID" Hidden="true"/>
<ext:Column DataIndex="Nom_Faena" Header="Faena"/>
<ext:datecolumn DataIndex="Fec_Inicio" Header="Asignacion" Format="dd-MM-yyyy" />
<ext:Column Width="24" DataIndex="cod_recurso" Sortable="false" MenuDisabled="true" Header=" " Fixed="true">
<Renderer Handler="return '';" />
</ext:Column>
</Columns>
</ColumnModel>
<GetDragDropText Fn="getDragDropText" />
<Listeners>
<Render Fn="setDD" />
</Listeners>
<BottomBar>
<ext:PagingToolbar
ID="tbRecursos"
runat="server"
StoreID="stRecursos"
PageSize="25"
DisplayInfo="true"
DisplayMsg="Recursos {0} - {1} de {2}" />
</BottomBar>
</ext:GridPanel>
in the event "Row_Click" I would get the contents of a specific row (selectedrow) <ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
<DirectEvents>
<RowSelect OnEvent="Row_Click" />
</DirectEvents>
</ext:RowSelectionModel>
Server code (aspx.vb)Public Sub Row_Click(ByVal sender As Object, ByVal e DirectEventArgs)
Dim faena As string = txtCodigo_Faena.Value
Dim faenaSel as [??]= grid.selectedrow.cellcontent
if faena <> faenasel then
messaje
end if
End Sub
2.- how I can get the row number of a gridpanel? (or cell number)Example (gridpanel is the same as the previous query)
aspx.vb code
Public Sub IdentificarFila(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs)
Dim iRow As Integer = 0
Dim totalRow As [??]= grid.totalrow
With grdRecursosEmpresa
For ir = 0 To totalRow
if [row of grid].[cell¿?] = "A" then
do something
end if
Next
End With
End Sub
is possible to obtain these parameters?, how I can do?thanks for the help you can provideme