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...
