Here is the scenario
I have a RadGrid which contains a GridButtonColumn(I have highlighed in the code below). When the user clicks
then I take them to a separate page for editing. I know I can track this in the ItemCommand Event. But What I
am trying to accomplish is if possible get the cotrol id in the Page_Load so that I can skip all the other page
events and take redirect the user to the edit page.Currenly I am not able to do this since I can't get the
control id which cuased the postback (i this case it was the GridButtoncolumn) So my question is How to get
the Id/Control which caused the postback which is inside the RadGrid. Appreciate your reponse
Here is the code
<telerik:RadGrid
ID=
"rdgAccountView"
runat=
"server"
AllowPaging=
"True"
AllowSorting=
"True"
AutoGenerateColumns=
"False"
OnNeedDataSource=
"rdgAccountView_OnNeedDataSource"
OnItemCreated=
"rdgAccountView_ItemCreated"
OnItemCommand=
"rdgAccountView_ItemCommand"
OnPreRender=
"rdgAccountView_PreRender"
OnLoad=
"rdgAccountView_OnLoad"
OnItemDataBound=
"rdgAccountView_ItemDataBound"
>
<ClientSettings>
<Scrolling AllowScroll=
"True"
UseStaticHeaders=
"True"
ScrollHeight=
"320"
/>
<Selecting AllowRowSelect=
"False"
/>
<Resizing AllowColumnResize=
"true"
ClipCellContentOnResize=
"true"
/>
</ClientSettings>
<ExportSettings>
<Pdf FontType=
"Subset"
PaperSize=
"Letter"
/>
<Excel Format=
"Html"
/>
</ExportSettings>
<MasterTableView
Width=
"100%"
NoDetailRecordsText=
"No Account Records Found"
CurrentResetPageIndexAction=
"SetPageIndexToFirst"
Dir=
"LTR"
Frame=
"Border"
TableLayout=
"Auto"
DataKeyNames=
"ParentIdentifier"
>
<RowIndicatorColumn CurrentFilterFunction=
"NoFilter"
FilterListOptions=
"VaryByDataType"
Visible=
"False"
>
<HeaderStyle Width=
"20px"
/>
</RowIndicatorColumn>
<Columns>
<telerik:GridButtonColumn ButtonType=
"ImageButton"
ImageUrl=
"../../App_Themes/Default/DataEditingImages/Edit.gif"
CommandName=
"EditAccountView"
Text=
"Edit"
UniqueName=
"EditFromAccountView"
>
<HeaderStyle Width=
"20px"
/>
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField=
"FirstName"
Groupable=
"False"
HeaderText=
"First Name"
UniqueName=
"Full Name"
ReadOnly=
"True"
ItemStyle-HorizontalAlign=
"left"
HeaderStyle-Width=
"124px"
HeaderStyle-Wrap=
"true"
AutoPostBackOnFilter=
"true"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"LastName"
Groupable=
"False"
HeaderText=
"Last Name"
UniqueName=
"Full Name"
ReadOnly=
"True"
ItemStyle-HorizontalAlign=
"left"
HeaderStyle-Width=
"124px"
HeaderStyle-Wrap=
"true"
AutoPostBackOnFilter=
"true"
>
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn CurrentFilterFunction=
"NoFilter"
FilterListOptions=
"VaryByDataType"
>
</EditColumn>
<PopUpSettings ScrollBars=
"None"
></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowColumnsReorder=
"True"
>
</ClientSettings>
</telerik:RadGrid>