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

Can't save updates?

1 Answer 12 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 13 Mar 2019, 10:00 PM

So I'm trying to do what should be simple... I'm databinding to a grid and want to make simple edits and save.  But I can't get it to work :(  I've tried every combination I can think of and none work.  When I click edit, the edit form opens but no changes save back.  I'm sure it's something simple that I've overlooking but... 

I've tried it a few ways, this is an example:

<telerik:RadGrid ID="DailyHoursGrid" runat="server"
                        AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="LinqDataSource3"
                        GridLines="None">                      
                        <ClientSettings>
                            <Selecting CellSelectionMode="None" />
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource3">
                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                                Visible="True">
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                                Visible="True">
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Employee" DataType="System.Int32"
                                    FilterControlAltText="Filter Employee column" HeaderText="Employee"
                                    ReadOnly="True" SortExpression="Employee" UniqueName="Employee">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="EventType"
                                    FilterControlAltText="Filter EventType column" HeaderText="EventType"
                                    ReadOnly="True" SortExpression="EventType" UniqueName="EventType">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Time" DataType="System.DateTime"
                                    FilterControlAltText="Filter Time column" HeaderText="Time" ReadOnly="False"
                                    SortExpression="Time" UniqueName="Time">
                                </telerik:GridBoundColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                        </MasterTableView>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                        
                    </telerik:RadGrid>

 And my data is as follows:

<asp:LinqDataSource ID="LinqDataSource3" runat="server"
                      ContextTypeName="TimeClock.TimeClockEntities2" EntityTypeName="" OrderBy="Time"
                      Select="new (Employee, EventType, Time)" TableName="Events"
                       
                       
                      Where="Time >= @Time && Time <= @Time1 && Employee == @Employee"
                      EnableUpdate="True" EnableInsert="True">
                      <WhereParameters>
                          <asp:ControlParameter ControlID="StartDatePicker" DefaultValue="0:00" Name="Time"
                              PropertyName="SelectedDate" Type="DateTime" />
                          <asp:ControlParameter ControlID="EndDatePicker" DefaultValue="0:00" Name="Time1"
                              PropertyName="SelectedDate" Type="DateTime" />
                          <asp:ControlParameter ControlID="HourlyReportEmployeeCombo" DefaultValue="0"
                              Name="Employee" PropertyName="SelectedValue" Type="Int32" />
                      </WhereParameters>
                  </asp:LinqDataSource>


When in edit mode, the only thing that works is cancel, neither delete or edit do anything...

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Mar 2019, 08:12 AM
Hi Paul,

As mentioned in the following post, I believe this issue is now resolved:
https://stackoverflow.com/questions/55149188/updating-telerik-rad-grid/55183817#55183817

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or