Click here to Skip to main content
16,013,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a RadGrid which perform insert,edit and delete operations and i create a form in usercontrols and now i want to implement the preview option for the grid that means if we click on preview button the form will be opened but not editable.i create the onitemcommad event for it.

C#
protected void gvComplaints_OnItemCommand(object sender, GridCommandEventArgs e)
       {
           if (e.CommandArgument == "Preview")
           {
               Edit = false;
               Session["Edit"] = Edit;
               int gvComplaintId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ComplaintId"]);
               Session["ComplaintId"] = gvComplaintId;
           }
           else if (e.CommandArgument == "Edit")
           {
               Edit = true;
               Session["Edit"] = Edit;
               int gvComplaintId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ComplaintId"]);
               Session["ComplaintId"] = gvComplaintId;

           }
       }


But it didnt work can anyone help me?
Posted
Comments
[no name] 12-Feb-15 6:44am    
Can you please attach here .aspx code ?
[no name] 17-Feb-15 7:39am    
In gridview property there have an option for adding next and previous button.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900