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

RAD AJAX Tutorial RadGridServerSideAPI example

1 Answer 52 Views
Documentation and Tutorials
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 2
Greg asked on 20 Apr 2009, 06:22 PM

The tutorial has the following C# code to update a row in the database for the RadGridServerSideAPI example:

                //Update Query execution        
                SqlDataSource1.UpdateCommand = "UPDATE Shippers set CompanyName='" + CompanyName + "',Phone='" + Phone + "'";  
                SqlDataSource1.Update(); 

When I execute this all the rows are updated. Clearly a "WHERE ShipperID = @ShipperID" clause is missing. Shouldn't this be included in the UpdateCommand set on SqlDataSource1 or is there a way to get the data source to append this?

The delete command is similar.

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 23 Apr 2009, 03:10 PM
Hello Greg,

Your remark for the missing WHERE clause is right on target! We will update the relevant content from the tutorial for its next versions. I updated your Telerik points for the feedback.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Documentation and Tutorials
Asked by
Greg
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or