Hi,
I am using radgrid with rowcontextmenu. when i right click on a radgrid row and select edit option it will open a popup window. What i need is when i rightclick on a radgrid row, i just want to get the values of 3 columns for that particular selected row. For example, when i right click on a selected radgrid row i want to get customer name, headend name, site name values of that selected row.
Here is my code....
if you see the above code, I am able to get the orderId
Thanks In Advance
I am using radgrid with rowcontextmenu. when i right click on a radgrid row and select edit option it will open a popup window. What i need is when i rightclick on a radgrid row, i just want to get the values of 3 columns for that particular selected row. For example, when i right click on a selected radgrid row i want to get customer name, headend name, site name values of that selected row.
Here is my code....
<
MasterTableView
GridLines
=
"None"
DataKeyNames
=
"orderId"
CommandItemDisplay
=
"Top"
>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"ClientSelectColumn"
HeaderStyle-Width
=
"3%"
ItemStyle-Width
=
"3%"
>
<
HeaderStyle
Width
=
"3%"
></
HeaderStyle
>
<
ItemStyle
Width
=
"3%"
></
ItemStyle
>
</
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"sId"
HeaderText
=
"sId"
DataField
=
"sId"
ReadOnly
=
"true"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"orderId"
HeaderText
=
"orderId"
Visible
=
"false"
ReadOnly
=
"true"
DataField
=
"orderId"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Customer Name"
HeaderText
=
"Customer Name"
DataField
=
"Customer Name"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Market Name"
HeaderText
=
"Market Name"
DataField
=
"Market Name"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"LOB"
HeaderText
=
"LOB"
DataField
=
"LOB"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Headend Name"
HeaderText
=
"Headend Name"
DataField
=
"Headend Name"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Project Name"
HeaderText
=
"Project Name"
DataField
=
"Project Name"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Site Name"
HeaderText
=
"Site Name"
DataField
=
"SiteName"
ReadOnly
=
"true"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lnkSiteName"
runat
=
"server"
Text='<%# Eval( "Site Name" ) %>'
ForeColor="Blue" CommandName="sitename"></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Task Status"
HeaderText
=
"Task Status"
DataField
=
"Task Status"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Clarify Account Nbr"
HeaderText
=
"Clarify Account Nbr"
DataField
=
"Clarify Account Nbr"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Site ID"
HeaderText
=
"Site ID"
DataField
=
"Site ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"Quote ID"
HeaderText
=
"Quote ID"
DataField
=
"Quote ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
UniqueName
=
"EDP Created?"
HeaderText
=
"EDP Created?"
DataField
=
"EDP Created?"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCommandColumn"
Display
=
"false"
>
</
telerik:GridEditCommandColumn
>
</
Columns
>
</
MasterTableView
>
protected
void
RadMenu1_ItemClick(
object
sender, RadMenuEventArgs e)
{
int
radGridClickedRowIndex;
radGridClickedRowIndex = Convert.ToInt32(Request.Form[
"radGridClickedRowIndex"
]);
switch
(e.Item.Text)
{
case
"Edit Task"
:
string
OrdID = rg200.MasterTableView.DataKeyValues[radGridClickedRowIndex][
"orderId"
].ToString();
lblOrdHeadName.Text = rg200.MasterTableView.NamingContainer.FindControl(
"Headend Name"
).ToString();
Session[
"orderId"
] = OrdID;
}
}
if you see the above code, I am able to get the orderId
value for that selected column. But when I am trying to get Headend Name value I am getting error. How to get headend Name value for selected row.Thanks In Advance