5 Answers, 1 is accepted
0
Accepted
Hi Ashraf,
Please try the following approach:
JavaScript:
I hope this will prove helpful. Please give it a try and let me know about the result.
Regards,
Eyup
the Telerik team
Please try the following approach:
<
ClientEvents
OnRowSelecting
=
"preventSelection"
OnRowDeselecting
=
"preventSelection"
OnRowMouseOver
=
"preventSelection"
/>
function
preventSelection(sender, args) {
var
clickedCell = args.get_domEvent().target;
if
(clickedCell) {
var
columnName = sender.get_masterTableView().get_columns()[clickedCell.cellIndex].get_uniqueName();
if
(columnName ==
"ShipName"
) {
if
(args.set_cancel) {
args.set_cancel(
true
);
}
sender.ClientSettings.Selecting.EnableDragToSelectRows =
false
;
}
else
{
sender.ClientSettings.Selecting.EnableDragToSelectRows =
true
;
}
}
}
I hope this will prove helpful. Please give it a try and let me know about the result.
Regards,
Eyup
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ashraf
Top achievements
Rank 2
answered on 26 Nov 2012, 09:43 AM
thanks Eyup , great your code works fine ,thank you very much .
0
Ashraf
Top achievements
Rank 2
answered on 26 Nov 2012, 01:29 PM
i want something else why the check box in header that select all rows become unchecked even i select all rows
0
Hello Ashraf,
The provided approach works as expected on my side and the header checkbox gets selected correctly when all of the items are selected.
I suggest you to add this condition to the function if you are using select column:
Please provide us the exact steps to reproduce the problematic behavior.
Kind regards,
Eyup
the Telerik team
The provided approach works as expected on my side and the header checkbox gets selected correctly when all of the items are selected.
I suggest you to add this condition to the function if you are using select column:
if
(clickedCell) {
if
(clickedCell.tagName ==
"TD"
) {
Please provide us the exact steps to reproduce the problematic behavior.
Kind regards,
Eyup
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ashraf
Top achievements
Rank 2
answered on 28 Nov 2012, 09:27 AM
thanks Eyup ,i handled it by the following code function preventSelection(sender, args) { var clickedCell = args.get_domEvent().target; if (clickedCell) { if (clickedCell.cellIndex != undefined) { var columnName = sender.get_masterTableView().get_columns()[clickedCell.cellIndex].get_uniqueName(); if (columnName == "SetDetails") { if (args.set_cancel) { args.set_cancel(true); var selectedItemsCount = sender.get_selectedItems().length; var ItemsCount = sender.get_masterTableView().get_dataItems().length; if (selectedItemsCount == ItemsCount) { $(':checkbox:first').attr('checked', true); } } } } } }