We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Record Double Click, Session, Response Redirect

Hello
I looking for solution in my problem, I want Double Click Record in ej.Grid (ASP.NET), using C# method  redirect to Edit page, Where will i edit this record.
Info about record i want save in Session. Some like bellow. This code is from asp:grid
Session["PageUrl"] = HttpContext.Current.Request.Url;
Session["RiD"] = GridView1.SelectedDataKey.Value.ToString();
Response.Redirect("~/Reservas/Edit.aspx");

I find many "years ago :)" some like this, with litle modification i want retrive "ID" of the record and send with session to edit page

Dictionary<string, object> data = e.Arguments["data"] as Dictionary<string, object>;
var RIndx = data.Where(d => d.Key == "Rid").Select(d => d.Value).FirstOrDefault();
Session["RiD"] = e.Arguments["Rid"].ToString();

L9.Text = RIndx.ToString();

//Response.Redirect("~/Reservas/Edit.aspx");

Thanks a lot
Tomasz


2 Replies

TO Tomasz June 23, 2017 12:40 PM UTC

Ok finaly i find solution :)

Dictionary<string, object> data = e.Arguments["data"] as Dictionary<string, object>;
var RIndx = data.Where(d => d.Key == "Rid").FirstOrDefault();
int ri = Convert.ToInt32(RIndx.Value.ToString());
Session["PageUrl"] = HttpContext.Current.Request.Url;
Session["RiD"] = ri.ToString();    

Response.Redirect("~/Reservas/Edit.aspx");




JK Jayaprakash Kamaraj Syncfusion Team June 26, 2017 08:43 AM UTC

Hi Tomasz, 
 
We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.   
 
Regards, 
 
Jayaprakash K. 
 


Loader.
Up arrow icon