i Have a radgrid (rad1) inside a FormTemplate of another RadGrid (rad2).
If i update a row in (rad1) while (rad2) is in editmode, the (rad1) UpdateCommand get only empty values. ,
how i can do it????
UPDATE: i found that this happen because NeedDataSource of (rad1) is beign called before UpdateCommand,
this doesnt happens if the radgrid is not inside of another RadGrid.
If i update a row in (rad1) while (rad2) is in editmode, the (rad1) UpdateCommand get only empty values. ,
how i can do it????
UPDATE: i found that this happen because NeedDataSource of (rad1) is beign called before UpdateCommand,
this doesnt happens if the radgrid is not inside of another RadGrid.
| <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AutoGenerateColumns="False" |
| Skin="WebBlue" OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound"> |
| <MasterTableView CommandItemDisplay="Top" EditMode="PopUp" CommandItemSettings-AddNewRecordText="Agregar Estándar" |
| CommandItemSettings-RefreshText=""> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Display="false" /> |
| <telerik:GridBoundColumn DataField="Ciudad" UniqueName="Ciudad" HeaderText="Ciudad" /> |
| <telerik:GridBoundColumn DataField="Aeropuerto" UniqueName="Aeropuerto" HeaderText="Aeropuerto" /> |
| <telerik:GridBoundColumn DataField="Proceso" UniqueName="Proceso" HeaderText="Proceso" /> |
| </Columns> |
| <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" PopUpSettings-Width="500px" |
| CaptionFormatString="Insertar nueva propiedad"> |
| <FormTemplate> |
| <center> |
| <table style="text-align: left"> |
| <tr> |
| <td> |
| <br /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Literal ID="Literal4" runat="server" Text="Aerolinea" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxAeronave" runat="server" DataTextField="Aeronave" |
| DataValueField="ID" Skin="WebBlue" DataSourceID="ObjectDataSourceAeronave" OnClientSelectedIndexChanged="LoadValores" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Literal ID="Literal3" runat="server" Text="Modelo Avión" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxTipoAvion" runat="server" Skin="WebBlue" DataTextField="DE_NAVE" |
| DataValueField="ID_NAVE" OnItemsRequested="RadComboBoxTipoAvion_ItemsRequested" |
| OnClientItemsRequested="ItemsLoaded" EmptyMessage="Seleccione Aerolinea..." /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Literal ID="Literal2" runat="server" Text="Aeropuerto" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxAeropuerto" runat="server" DataTextField="Aeropuerto" |
| DataValueField="ID" Skin="WebBlue" DataSourceID="ObjectDataSourceAeropuerto" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Literal ID="Literal1" runat="server" Text="Proceso" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxProcesos" runat="server" DataSourceID="EntityDataSourceProcesos" |
| DataTextField="DE_PROC" DataValueField="ID_PROC" Skin="WebBlue" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| <asp:CheckBox Text="Activo" ID="CheckBox1" runat="server" Checked="true" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <br /> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <telerik:RadGrid ID="RadGridStandards" AutoGenerateColumns="false" Skin="WebBlue" |
| OnNeedDataSource="RadGridStandards_NeedDataSource" GridLines="None" runat="server" |
| AllowMultiRowSelection="True" AllowMultiRowEdit="True" |
| OnUpdateCommand="RadGridStandards_UpdateCommand" OnItemDataBound="RadGridStandards_ItemDataBound" |
| AllowAutomaticUpdates="false"> |
| <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="false" EditFormSettings-EditFormType="AutoGenerated" |
| EditMode="InPlace" DataKeyNames="ID"> |
| <CommandItemTemplate> |
| <div style="padding: 5px 5px;"> |
| <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGridStandards.EditIndexes.Count == 0 %>'>Editar</asp:LinkButton> |
| <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGridStandards.EditIndexes.Count > 0 %>'>Actualizar</asp:LinkButton> |
| <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGridStandards.EditIndexes.Count > 0 || RadGridStandards.MasterTableView.IsItemInserted %>'>Cancelar</asp:LinkButton> |
| </div> |
| </CommandItemTemplate> |
| <Columns> |
| <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Display="false" ReadOnly="true" /> |
| <telerik:GridBoundColumn DataField="TipoActividad" UniqueName="TipoActividad" HeaderText="Tipo" |
| ReadOnly="true" /> |
| <telerik:GridBoundColumn DataField="Actividad" UniqueName="Actividad" HeaderText="Actividad" |
| ReadOnly="true" /> |
| <telerik:GridTemplateColumn UniqueName="Drop" HeaderText="Base" DataField="Drop"> |
| <ItemTemplate> |
| <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("Drop") %>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="WebBlue" DataSourceID="EntityDataSourceProcesosActividad" |
| DataValueField="ID_ACTI" DataTextField="DE_ACTI" Width="50px" SelectedValue='<%#Bind("Drop") %>' /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="Numeric" HeaderText="Tiempos" DataField="Numeric"> |
| <ItemTemplate> |
| <asp:Literal ID="Literal2" runat="server" Text='<%#Eval("Numeric") %>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Skin="WebBlue" |
| Type="Number" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" |
| NumberFormat-DecimalDigits="0" IncrementSettings-InterceptMouseWheel="true" Width="50px" |
| DbValue='<%# Bind("Numeric") %>' /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="Check" HeaderText="Activo" DataField="Check"> |
| <ItemTemplate> |
| <asp:Literal ID="Literal3" runat="server" Text='<%#Eval("Check") %>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("Check") %>' /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <br /> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" align="right"> |
| <asp:LinkButton ID="LinkButton1" runat="server" Text="Aceptar" CommandName="PerformInsert" /><asp:Literal |
| ID="LiteralSpace" runat="server" Text=" " /><asp:LinkButton ID="LinkButton2" runat="server" |
| Text="Cancelar" CommandName="Cancel" CausesValidation="False" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <br /> |
| </td> |
| </tr> |
| </table> |
| </center> |
| </FormTemplate> |
| <PopUpSettings Modal="True"></PopUpSettings> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |