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

RADGrid update issue

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 27 Oct 2010, 04:38 PM
HI
Im using Radgrid that connects to  a Sql server 2000 table. I have automatic updates/deletes enabled.. My problem is that I am able to delete the rows through the radgrid, I am not able to update them...


Here's the Code
       
    <telerik:RadGrid ID="RGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SQLDS"
        GridLines="None" DataMember="DefaultView" AutoGenerateDeleteColumn="True"
        AutoGenerateEditColumn="True" AllowAutomaticDeletes="True"
        AllowAutomaticUpdates="True">
        <MasterTableView DataSourceID="SQLDS" DataKeyNames="ID">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID"
                    Visible="false" AllowFiltering="False" AllowSorting="False" Display="False" ReadOnly="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="NAME" HeaderText="NAME" SortExpression="NAME"
                    UniqueName="NAME">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ADDRESS" HeaderText="ADDRESS" SortExpression="ADDRESS"
                    UniqueName="ADDRESS">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
<br />
<br />
<asp:SqlDataSource ID="SQLDS" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringSQL %>"
    ProviderName="<%$ ConnectionStrings:ConnectionStringSQL.ProviderName %>" SelectCommand="SELECT [ID], [NAME], [ADDRESS] FROM [Info]"
    UpdateCommand="UPDATE [Info] set [NAME]=?,[ADDRESS]=? where [ID]=?"
    DeleteCommand="delete from Info where [ID]=?">
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="String" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="NAME" Type="String" />
        <asp:Parameter Name="ADDRESS" Type="String" />
        <asp:Parameter Name="ID" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>


I'm not sure what the issue is since I'm able to delete rows...

Any help is appreciated..


Thanks,


 

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Oct 2010, 01:15 PM
Hi Ron,

The provided code looks ok to me and it is not clear what exactly is the root cause of the problem. What do you mean by "I'm not able to update". Does the edit form not open correctly or the update command does not fire? Could you please prepare a simple, fully runnable reproduction demo, open a new support ticket and send it to us along with very detailed reproduction steps and explanations and we will debug it locally and we will do our best to help.

Sincerely yours,
Maria Ilieva
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
Tags
Grid
Asked by
Ron
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or