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

Radgrid issue

2 Answers 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Venkateswarlu
Top achievements
Rank 1
Venkateswarlu asked on 04 Mar 2014, 01:32 PM
Hi Telerik,



I am getting issue on Radgrid Batch Edit, using button in
EditItemTemplate column when i click on that button i want get other
column values for condition, so based on that condition need to show
radwindow with radgrid,

please find once attachment and give me reply ASAP.                 

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 07 Mar 2014, 10:04 AM
Hello,

In order to achieve this behavior you could use the client-side click handler of the button and get the value for a column that you need. For example the following sample handler could be used to get the value from a column with name "ID" on the row where the button was clicked. If the value is equal to 123 a RadWindow will be shown.

function clientClick(sender, args) {
    var grid = $find("<%= RadGrid1.ClientID %>");
    var masterTableView = grid.get_masterTableView();
    var batchEditManager = grid.get_batchEditingManager();
    var editedRowIndex = batchEditManager.get_currentlyEditedCell().parentElement.id.split("__")[1];
    var editedID = masterTableView.get_dataItems()[editedRowIndex].get_cell("ID").textContent.trim()
     
    if (editedID == 123) {
        var window = $find("<%= RadWindow1.ClientID %>");
        window.show();
    }
}




Regards,
Viktor Tachev
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
Venkateswarlu
Top achievements
Rank 1
answered on 08 Mar 2014, 05:27 AM
Thanks for your response sir.
Tags
General Discussions
Asked by
Venkateswarlu
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Venkateswarlu
Top achievements
Rank 1
Share this question
or