Serenity
Serenity

Reputation: 5098

Editing a row in DB

In my RAdGrid that I am using there's this edit button to edit a Question in the list. When I click on edit, it is ALWAYS the first row data that is fetched from Ques table..like it is always the first ques that gets filled when Edit button is clicked no matter what question's edit button I click. I am using Telerik's RADgrid so cannot pass CommandArgument to Edit button..what's wrong ??

            if (e.CommandName == "Edit")
            {
                Common com = new Common();
                Int32 ID = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["QuesID"].ToString());

                Response.Redirect(http://localhost/myweb/ + "editques/" + "QuesID/" + QuesID + "/" + PID);
            }

   ALTER PROC [Admin].[sp_Ques]    
(
 @QuesID bigint =null 
 )
AS
BEGIN
........
END

Upvotes: 1

Views: 181

Answers (1)

Cine
Cine

Reputation: 4402

You are not sending any parameters to your [Admin].[sp_Ques] and since it has a default null value, you dont get any error message about it either

Upvotes: 1

Related Questions