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

Header Context Menu for Column max count selected colum set 4

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Մուշեղ
Top achievements
Rank 1
Մուշեղ asked on 27 Feb 2014, 11:54 AM
how i can set max selected column count , when i select example 4 checkbox other checkbox is disabled and enabled when selected checkbox count less then 4

or


 <telerik:RadGrid 
.....


  <ClientSettings EnableRowHoverStyle="true">
                <ClientEvents OnFilterMenuShowing="filterMenuShowing" />
               <ClientEvents OnColumnHidden="onColumnHidden" OnColumnShown="onColumnShow" />
                <Selecting AllowRowSelect="True" />
            </ClientSettings>

.........................


 function onColumnShow(sender, args) {
                                     
                                        //calculate selected checkbox count
                                    }


how calculate selected checkbox count
           

1 Answer, 1 is accepted

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

In order to achieve this functionality you could use a global variable to hold the number of displayed columns. Using the OnColumnShowing and OnColumnHiding events you could modify the variable accordingly. These events could be canceled so you could check the number of the visible columns and cancel the event if a condition is met.

Give this approach a try and you should be able to achieve the needed functionality.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Մուշեղ
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or