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

[Solved] Update not working?!?

3 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 21 Apr 2008, 07:49 PM
I've got my insert/deletes working fine, but the update command is being fired with my original values, not the updated ones.

(That is, Field 1 has value of 5. I edit it and change to 55. The update stored procedure is called and is called with a value of 5 rather than 55).

Any ideas? This has had me stumped for days and I feel sure its something simple. I've made sure my parameter names are all the same, but I'm still missing something.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True"  
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True"  
    AutoGenerateColumns="False" DataSourceID="CodingView" GridLines="None"  
    ShowFooter="True" Skin="Vista" Width="770px" ENABLEAajax ="true"  
    DataKeyNames="Counter" GroupingEnabled="False" > 
<ExportSettings> 
<Pdf PaperSize="Letter" FontType="Subset"></Pdf> 
 
<Excel Format="Html"></Excel> 
</ExportSettings> 
 
<MasterTableView CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" Frame="Border"  
TableLayout="Auto" CommandItemDisplay="Bottom"  datakeynames="Counter"  AutoGenerateColumns="False" 
datasourceid="CodingView" editmode="InPlace"
<RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False"
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False" Resizable="False"
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
 
    <Columns> 
    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                        <ItemStyle CssClass="MyImageButton" /> 
                    </telerik:GridEditCommandColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ClientNum"  
            FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Client"  
            SortExpression="ClientNum" UniqueName="ClientNum"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Inpatient"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="Inpatient" SortExpression="Inpatient"  
            UniqueName="Inpatient"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Obs"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="Obs" SortExpression="Obs" UniqueName="Obs"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="AmbSurg"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="ASC" SortExpression="AmbSurg"  
            UniqueName="AmbSurg"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ED"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="ED" SortExpression="ED" UniqueName="ED"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="EDwithEM"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="ED/EM" SortExpression="EDwithEM"  
            UniqueName="EDwithEM"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="IR"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="IR" SortExpression="IR" UniqueName="IR"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="IRwithSI"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="IR w/SI" SortExpression="IRwithSI"  
            UniqueName="IRwithSI"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="PM"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="PM" SortExpression="PM" UniqueName="PM"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="WC"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="WC" SortExpression="WC" UniqueName="WC"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ANcillary"  
            DataType="System.Int16" FilterListOptions="VaryByDataType"  
            ForceExtractValue="None" HeaderText="Ancillary" SortExpression="ANcillary"  
            UniqueName="ANcillary"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter"  
            DataField="Abstracting" DataType="System.Int16"  
            FilterListOptions="VaryByDataType" ForceExtractValue="None"  
            HeaderText="Abstracting" SortExpression="Abstracting" UniqueName="Abstracting"
        </telerik:GridBoundColumn> 
         <telerik:GridButtonColumn ConfirmText="Delete this entry?" ButtonType="ImageButton" 
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn> 
    </Columns> 
 
<EditFormSettings editformtype="Template"
 
 
        <EditColumn ButtonType="ImageButton" 
            UpdateImageUrl="Images\Save.gif" EditImageUrl="Images\Save.gif" InsertImageUrl="Images\Save.gif" CancelImageUrl="Images\Cancel.gif" 
            InsertText="Insert Order" UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit"
        </EditColumn> 
 
</EditFormSettings> 
</MasterTableView> 
                </telerik:RadGrid> 



3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Apr 2008, 02:43 PM
Hi Daniel,

I notice that you have ForceExtractValue="None"  for all grid columns - can you please remove this and let us know how it goes.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Daniel
Top achievements
Rank 1
answered on 23 Apr 2008, 03:30 PM
I have removed this and its still occurring.
0
Rosen
Telerik team
answered on 29 Apr 2008, 12:22 PM
Hi Daniel,

Unfortunately I was unable to reproduce this unwanted behavior. Can you please send us some more details about your scenario? What kind of datasource control is used to bind the RadGrid control and how the controls are setup.
It will be better if you can send us (attached to a formal ticket) a small working project that demonstrate this erratic behavior. This way we can investigate the problem locally and give you straight-to-the-point answer.

All the best,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Daniel
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or