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

clientside radgrid event on a checkbox

0 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wmj
Top achievements
Rank 1
wmj asked on 15 May 2017, 08:10 PM

I've got a radgrid with a column containing a checkbox. when i check the checkbox, I want to select a given item in a drop down list. below is what I've figured out thus far but can't quite figure out how to check the checkbox inside the grid.


<telerik:RadGrid ID="rgClientSites" runat="server" AutoGenerateColumns="False"  AllowMultiRowEdit="true" GridLines="None" Skin="Windows7">
        <MasterTableView>
            <Columns>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnUserAction="onClick"/>
        </ClientSettings>
</telerik:RadGrid>


function onClick(sender, eventArgs) {
        var grid = $find("<%= rgClientSites.ClientID %>");
        var masterTable = grid.get_masterTableView();
        var gridCheckItemLCRA = masterTable.get_dataItems()[0].findElement("2"); //contains a checkbox

var dropdownlist = $find("<%= ddlD.ClientID %>");
        var item = dropdownlist.findItemByValue("3");

        if (gridCheckItemLCRA.checked) {
   item.select();
        }
        else {
   item.unselect();
        }
    }

 

Nothing happens when I check the checkbox - how do I attach an event to an item in a cell?

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
wmj
Top achievements
Rank 1
Share this question
or