Hi,
I want to display a message when i click on a row in radgrid.
With the code, i have, i can display the message. Now, if the user clicks on OK, I want to perform one method and if he cancels, i want to perform another method.
How do i know what the user clicked on?
<telerik:RadGrid runat="server" ID="rg_OnlineDownloads" AutoGenerateColumns="false" OnNeedDataSource="rg_OnlineDownloads_NeedDataSource" onitemcommand="rg_OnlineDownloads_ItemCommand" > <MasterTableView DataKeyNames="HouseholdID"> <Columns> <telerik:GridBoundColumn DataField="ApplicationDate" HeaderText="ApplicationDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="HouseholdID" HeaderText="HouseholdID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ClientName" HeaderText="ClientName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="FamilyMembers" HeaderText="#nbrs"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ClientAddress" HeaderText="ClientAddress"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CellPhone" HeaderText="CellPhone"> </telerik:GridBoundColumn> <telerik:GridButtonColumn UniqueName="Transfer" CommandName="Transfer" ConfirmText="" ConfirmDialogType="RadWindow" ConfirmTitle="Transfer to Intake" ButtonType="PushButton" > </telerik:GridButtonColumn> </Columns> </MasterTableView> </telerik:RadGrid>
Code Behind:
protected void rg_OnlineDownloads_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "Transfer")// CommandName of LinkButton { GridDataItem dataItem = e.Item as GridDataItem; string hHoldID = dataItem["HouseholdID"].Text; string clntNm = dataItem["ClientName"].Text; (rg_OnlineDownloads.MasterTableView.GetColumn("Transfer") as GridButtonColumn).ConfirmText = "Do you want to transfer " + clntNm + " ? "; } }
Thanks in Advance
