I am using a radgrid and some GridDropDownColumns for displaying possible values when the user selects the edit command button. The problem is that the grid is displaying some values as it is supposed and others not, I am binding the grid programmatically at the code behind and sending a dataset with the values for the Master Table and for the drop down columns. The problem is only in the display, in edit mode the grid is working fine, I'm able to show the possible values in the columns as wondered.
here is the code...
aspx:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
GridLines="None" MasterTableView-NoMasterRecordsText="No hay registros que mostrar">
<MasterTableView DataKeyNames="ProductoId" Name="Productos" EditMode="InPlace">
<Columns>
<telerik:GridNumericColumn UniqueName="columnProductoId" HeaderText="ProductoId" DataField="ProductoId" Visible="false"></telerik:GridNumericColumn>
<telerik:GridDropDownColumn UniqueName="columnTipoProducto"></telerik:GridDropDownColumn>
<telerik:GridDropDownColumn UniqueName="columnPaisMoneda"></telerik:GridDropDownColumn>
<telerik:GridDropDownColumn UniqueName="columnEstado"></telerik:GridDropDownColumn>
<telerik:GridDropDownColumn UniqueName="columnOperador"></telerik:GridDropDownColumn>
<telerik:GridBoundColumn UniqueName="columnDescripcion" HeaderText="Descripcion" DataField="Descripcion">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn UniqueName="columnValor" HeaderText="Valor" DataField="Valor">
</telerik:GridNumericColumn>
<telerik:GridDateTimeColumn UniqueName="columnFechaRegistro" HeaderText="Fecha de Registro" DataField="FechaRegistro">
</telerik:GridDateTimeColumn>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Editar">
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Está seguro de que desea eliminar este producto?" Text="Eliminar" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
</Columns>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</MasterTableView>
</telerik:RadGrid>
vb code behind:
Private Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
Try
Me.RadGrid1.DataSource = Me.FuenteDatosGrillaPinesProducto
'here is where i send the dataset with all the DataTable needed
Me.RadGrid1.DataMember = "Tabla Pines Producto"
Dim columna As GridDropDownColumn
columna = Me.RadGrid1.Columns(1)
With columna
.DataSourceID = Me.RadGrid1.DataSourceID
.HeaderText = "Tipo de producto"
.DataField = "TipoProductoId"
.ListTextField = "Descripcion"
.ListValueField = "TipoProductoId"
.DataSourceID = "Pines Productos"
.ListDataMember = "Tabla Tipos Producto"
End With
columna = Me.RadGrid1.Columns(2)
With columna
.DataSourceID = Me.RadGrid1.DataSourceID
.HeaderText = "Pais"
.DataField = "PaisMonedaId"
.ListTextField = "Descripcion"
.ListValueField = "PaisId"
.DataSourceID = "Pines Productos"
.ListDataMember = "Tabla Paises"
End With
columna = Me.RadGrid1.Columns(3)
With columna
.DataSourceID = Me.RadGrid1.DataSourceID
.HeaderText = "Estado"
.DataField = "EstadoId"
.ListTextField = "Descripcion"
.ListValueField = "EstadoId"
.DataSourceID = "Pines Productos"
.ListDataMember = "Estados"
End With
columna = Me.RadGrid1.Columns(4)
With columna
.DataSourceID = Me.RadGrid1.DataSourceID
.HeaderText = "Operador"
.DataField = "OperadorId"
.ListTextField = "Descripcion"
.ListValueField = "OperadorID"
.DataSourceID = "Pines Productos"
.ListDataMember = "Tabla Operadores"
End With
Catch ex As Exception
End Try
End Sub
the result is something like this:
Tipo de producto Pais Estado Operador Descripcion Valor Fecha Registro
PINEs Colombia Producto Activo Operador1 Pin de 500 500 13/03/2009
Pin de 1000 1000 13/03/2009
PINEs Venezuela Producto Activo Operador1 Pin de 500 500 13/03/2009
as you can see the second row doesn't show anything on the columns that are grid drop down columns.
I don't know if you got the idea of my problem so far, thanks for your time