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

telerik:GridButtonColumn Confirm Callback

3 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manisha Shivjiani
Top achievements
Rank 1
Manisha Shivjiani asked on 29 Oct 2010, 04:06 PM

Hi,
I am using Telerik GridButton column with Confirm Text and Confirm Dialog type as radwindow.
I would like to close the parent window(window having the  grid) once user confirms the changes.
Is there a way to call close function to close parent window of the cofirm radwindow ?

Here is the code

<telerik:RadGrid ID="rgPositionFactorComp" runat="server" 
    AllowPaging="True" PageSize="5" GridLines="Both" AutoGenerateColumns="False"
<Columns>       
     <telerik:GridBoundColumn DataField="WorkflowFactorLevel" UniqueName="WorkflowFactorLevel" HeaderText="Existing Level">      </telerik:GridBoundColumn>
     <telerik:GridBoundColumn DataField="WorkflowLanguage"
UniqueName="WorkflowLanguage" HeaderText="Existing Language">
</telerik:GridBoundColumn>
</telerik:GridTemplateColumn>
  <telerik:GridButtonColumn CommandName="Reject" Text ="Reject"  
    ButtonType ="PushButton"
    UniqueName="btnReject"
    ConfirmText="Are you sure you want to Reject changes?"
   ConfirmTitle="Reject Changes?" ConfirmDialogType="RadWindow"> </telerik:GridButtonColumn>
</Columns>
</telerik:RadGrid>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue">
</telerik:RadWindowManager>

Thanks,
Manisha

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Nov 2010, 12:43 PM
Hello Manisha,

You could handle on RadGrid ItemCommand event where you can delete the row and after that execute the code(server or client) for closing the window.

Give it a try and let me know if it helps.

Greetings,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Manisha Shivjiani
Top achievements
Rank 1
answered on 04 Nov 2010, 08:29 PM
Pavlina,

Thanks for reply.
I actually fixed this issue by adding a label to the control and setting it's text to javascript call to the function that closes the window.
In the Itemcommand event of the grid,

protected void rgPositionFactorComp_ItemCommand(object source, GridCommandEventArgs e)
  
{
  
switch (e.CommandName)
  
{
  
  
case "Reject":
  
  
this.lblClose.Text = "<script type='text/javascript'>PopupCtrlClose()</script>";
  
break;
  
}
  
  
}


0
Pavlina
Telerik team
answered on 09 Nov 2010, 11:14 AM
Hello Manisha,

I am glad to hear that you were able to resolve the problem. In case you face any other problems, please do not hesitate to contact us again.

All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Manisha Shivjiani
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Manisha Shivjiani
Top achievements
Rank 1
Share this question
or