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

How do I get the selected row orderid

1 Answer 29 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
mathieu cupryk
Top achievements
Rank 1
mathieu cupryk asked on 10 Aug 2012, 03:46 AM
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("SelectedIndexChanged"); 

 

How do I get the selected row orderid

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        { 
            //string[] args = e.Argument.Split('?')[1].Split('!'); 
            GridViewRow row = RadGrid1.Rows[e]; 
            if (e.Argument == "SelectedIndexChanged") 
            { 
                 //Label1.Text = (e.Item as GridDataItem)["OrderID"].Text; 
                if (RadGrid1.Items.Count == 0) return;

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Aug 2012, 04:40 AM
HI,

Try the following code to get the selected row value.
C#:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
 if (e.Argument == "SelectedIndexChanged")
 {
  foreach (GridDataItem item in RadGrid1.SelectedItems)
  {
    Label1.Text = item["OrderID"].Text;
  }
 }
}

Thanks,
Shinu.
Tags
Ajax
Asked by
mathieu cupryk
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or