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

Client side allow XOR row select

2 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lukrs
Top achievements
Rank 2
Lukrs asked on 04 Mar 2009, 10:42 AM
Hi,

I'm trying to write a client side script, that would disable the user from selecting masterTableView elements and DetailTable elements simultaneously.

The multiple or single selected rows should be all from master or from detail table view (XOR)

is this possible?

Thanx in advance,
Lp, Luka

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Mar 2009, 05:01 AM
Hi Luka,

I have found the following help article which explains how to achieve conditional row selection in a hierarchical Grid. Go through the link and see if it helps.
Conditional row select in hierarchy

Shinu
0
Lukrs
Top achievements
Rank 2
answered on 05 Mar 2009, 12:58 PM
Hi Shinu,

Thanks for the reply...it helped a little, but at the end I studied the Client-side API Reference for RadGrid.

I came up with the following solution:

 <script type="text/javascript">
        function RowSelecting(sender, eventArgs) {
            var skupineGrid = $find("<%= skupineGrid.ClientID %>");

            if (eventArgs.get_tableView().get_name() == "Skupine")
                for(i = 0; i < skupineGrid.get_detailTables().length; i++)
                    skupineGrid.get_detailTables()[i].clearSelectedItems();
            
            else
                skupineGrid.get_masterTableView().clearSelectedItems();
        }
</script>


Maybe it will help someone.

LP, Luka




Tags
Grid
Asked by
Lukrs
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Lukrs
Top achievements
Rank 2
Share this question
or