This is a migrated thread and some comments may be shown as answers.

Data Grid Update EditMode="InPlace" does not work

3 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jhon Jairo Zapata Montealegre
Top achievements
Rank 1
Jhon Jairo Zapata Montealegre asked on 25 Jun 2010, 04:58 PM
Hello, I have a problem with datagrid and EditMode="InPlace", I'm using code behind for update, so when the data pass to the method, the row to update is the correct, but, the new data don't, the data is old. I attached the code.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"     EnablePageHeadUpdate="false"
                                                <AjaxSettings> 
                                                    <telerik:AjaxSetting AjaxControlID="rgSocios"
                                                        <UpdatedControls> 
                                                            <telerik:AjaxUpdatedControl ControlID="rgSocios" /> 
                                                            <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                                                        </UpdatedControls> 
                                                    </telerik:AjaxSetting> 
                                                </AjaxSettings> 
                                            </telerik:RadAjaxManager> 
 
                                            <telerik:RadGrid ID="rgSocios" runat="server" ShowStatusBar="True" 
                                                Skin="Windows7" Visible="False" AllowAutomaticUpdates="True" AutoGenerateEditColumn="False" 
                                                GridLines="None" PageSize="7" AllowPaging="true" EnableViewState="true" 
                                                OnDataBound="rgSocios_DataBound" OnLoad="rgSocios_OnLoad" OnUpdateCommand="rgSocios_UpdatedCommand"
                                                <MasterTableView NoMasterRecordsText="No se encontraron socios para este agente" 
                                                    CommandItemDisplay="Top" AutoGenerateColumns="False" AllowSorting="True" EditMode="InPlace" DataKeyNames="numIdSocio"
 
                                                    <AlternatingItemStyle BackColor="#E0E0E0" /> 
 
                                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                                                        <CommandItemSettings 
                                                            ShowExportToWordButton="true" 
                                                            ShowExportToExcelButton="true" 
                                                            ShowExportToCsvButton="true" 
                                                            ShowExportToPdfButton="true" 
                                                            ShowAddNewRecordButton="false" 
                                                            ExportToCsvText="Exportar a CSV" 
                                                            ExportToExcelText="Exportar a Excel" ExportToPdfText="Exportar a PDF" 
                                                            ExportToWordText="Exportar a Word" RefreshText="Refrescar" 
                                                        /> 
 
                                                    <Columns> 
                                                        <telerik:GridBoundColumn DataField="codigoCompania" UniqueName="idCompania" HeaderText="Compañía" HeaderStyle-HorizontalAlign="Center" > 
                                                        <HeaderStyle HorizontalAlign="Center" /> 
                                                        </telerik:GridBoundColumn> 
 
                                                        <telerik:GridBoundColumn DataField="fechaActualizacion" UniqueName="fechaActualizacion" HeaderText="Fecha Actualizaci&oacute;n" HeaderStyle-HorizontalAlign="Center" > 
                                                        <HeaderStyle HorizontalAlign="Center" /> 
                                                        </telerik:GridBoundColumn> 
 
                                                        <telerik:GridBoundColumn DataField="numIdIntermediario" UniqueName="numIdIntermediario" HeaderText="N&uacute;mero Identificaci&oacute;n Intermediario" HeaderStyle-HorizontalAlign="Center" > 
                                                        <HeaderStyle HorizontalAlign="Center" /> 
                                                        </telerik:GridBoundColumn> 
 
                                                        <telerik:GridBoundColumn DataField="nombreSocio" UniqueName="nombreSocio" HeaderText="Nombre Socio" HeaderStyle-HorizontalAlign="Center" > 
                                                        <HeaderStyle HorizontalAlign="Center" /> 
                                                        </telerik:GridBoundColumn> 
 
                                                        <telerik:GridBoundColumn DataField="numIdSocio" UniqueName="numIdSocio" HeaderText="Numero Identificaci&oacute;n Socio" HeaderStyle-HorizontalAlign="Center" > 
                                                        <HeaderStyle HorizontalAlign="Center" /> 
                                                        </telerik:GridBoundColumn> 
                                                    </Columns> 
 
                                                    <RowIndicatorColumn><HeaderStyle Width="20px" /></RowIndicatorColumn> 
                                                    <ExpandCollapseColumn><HeaderStyle Width="20px" /></ExpandCollapseColumn> 
                                                </MasterTableView> 
 
                                                <ClientSettings> 
                                                    <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" OnCommand="GridCommand" /> 
                                                </ClientSettings> 
                                            </telerik:RadGrid> 

3 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 28 Jun 2010, 11:54 AM
Hi Jhon,

You can examine the help topic below and let me know if it helps to achieve the desired functionality::
Insert/Update/Delete at database level with queries

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jhon Jairo Zapata Montealegre
Top achievements
Rank 1
answered on 01 Jul 2010, 10:23 PM
Thanks a lot, your recommendation was very usefully
0
Babu Puchakayala
Top achievements
Rank 1
answered on 02 Jul 2010, 08:52 PM
Hi Jhon Jairo Zapata Montealegre,

Can you post your solution please coz i am also facing the same problem. Can you please post your onupdatecommand code. when i am trying to update the data grid is not getting the new values. It is getting older values. Please find my post here. if you know the answer Please help me.

http://www.telerik.com/community/forums/aspnet-ajax/grid/edit-and-updating-columns-in-radgrid.aspx

Thanks
Tags
Grid
Asked by
Jhon Jairo Zapata Montealegre
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Jhon Jairo Zapata Montealegre
Top achievements
Rank 1
Babu Puchakayala
Top achievements
Rank 1
Share this question
or