Hi
Thanks for quick response. I tried what is give you advice. The code is working fine in Q3 2009. but now i am using in my project Q2 2008. The same coding is not working in Q2 2008. and also Q2 2008 is not supported for UseClientSelectColumnOnly="true". But it is supported for q3 2009 only . I want to need for solution for this problem in q2 2008.
Requirement is:
1. We need to check and unchecked rad grid check box through row click event in client side scripts(note: I can able to do check box checked. but i am not able do unchecked in Q2 2008 Telerik
2. I need to select multiple check box in rad grid through row click in Client side scripts(note: I can able to select multiple check box through row click in Q3 2009(use: args.set_cancel(true)). But i am not able same process in Q2 2008.
3. If i did above functionality through args.set_cancel(true); event. I am not able to check the check box through directly click . and also i am not able to select the multiple check box through row header check box.
Please provide the solution for above problem in Q2 2008 Telerik DLL
Note: Please see the image. And attachment for sample coding and please all the q2 Telerik DLL
.
source code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<telerik:RadCodeBlock ID="dsafdsa" runat="server">
<script language="javascript" type="text/javascript">
function RowClick(rowIndex)
{
// alert("Click on row with index: " + rowIndex);
return false; //cancel the postback request set with ClientSettings -> EnablePostBackOnRowClick = true
}
function RowSelecting(sender, args) {
var id = args.get_id();
var inputCheckBox = $get(id).getElementsByTagName("input")[0];
if (!inputCheckBox || inputCheckBox.disabled) {
//cancel selection for disabled rows
args.set_cancel(true);
}
if (inputCheckBox.checked == true) {
inputCheckBox.checked = false;
}
else
{
inputCheckBox.checked =true;
}
}
function RowDeselecting(sender, args) {
alert("Deselect");
var id = args.get_id();
var inputCheckBox = $get(id).getElementsByTagName("input")[2];
if (!inputCheckBox || inputCheckBox.disabled) {
//cancel selection for disabled rows
args.set_cancel(true);
}
inputCheckBox.checked = false;
}
</script>
</telerik:RadCodeBlock>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<div>
<telerik:RadComboBox ID="RadComboBox1" Runat="server">
</telerik:RadComboBox>
<asp:HiddenField ID="HiddenField2" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid1" runat="server"
AllowPaging="True" PageSize="10" Width="97%" AllowMultiRowSelection="True"
GridLines="None">
<PagerStyle Mode="NumericPages" />
<ClientSettings EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true"/>
<ClientEvents OnRowClick="RowSelecting" />
</ClientSettings>
<MasterTableView>
<Columns>
<telerik:GridClientSelectColumn>
</telerik:GridClientSelectColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</form>
</body>
</html>
Thanks
G. Manikandan
Thanks for quick response. I tried what is give you advice. The code is working fine in Q3 2009. but now i am using in my project Q2 2008. The same coding is not working in Q2 2008. and also Q2 2008 is not supported for UseClientSelectColumnOnly="true". But it is supported for q3 2009 only . I want to need for solution for this problem in q2 2008.
Requirement is:
1. We need to check and unchecked rad grid check box through row click event in client side scripts(note: I can able to do check box checked. but i am not able do unchecked in Q2 2008 Telerik
2. I need to select multiple check box in rad grid through row click in Client side scripts(note: I can able to select multiple check box through row click in Q3 2009(use: args.set_cancel(true)). But i am not able same process in Q2 2008.
3. If i did above functionality through args.set_cancel(true); event. I am not able to check the check box through directly click . and also i am not able to select the multiple check box through row header check box.
Please provide the solution for above problem in Q2 2008 Telerik DLL
Note: Please see the image. And attachment for sample coding and please all the q2 Telerik DLL
.
source code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<telerik:RadCodeBlock ID="dsafdsa" runat="server">
<script language="javascript" type="text/javascript">
function RowClick(rowIndex)
{
// alert("Click on row with index: " + rowIndex);
return false; //cancel the postback request set with ClientSettings -> EnablePostBackOnRowClick = true
}
function RowSelecting(sender, args) {
var id = args.get_id();
var inputCheckBox = $get(id).getElementsByTagName("input")[0];
if (!inputCheckBox || inputCheckBox.disabled) {
//cancel selection for disabled rows
args.set_cancel(true);
}
if (inputCheckBox.checked == true) {
inputCheckBox.checked = false;
}
else
{
inputCheckBox.checked =true;
}
}
function RowDeselecting(sender, args) {
alert("Deselect");
var id = args.get_id();
var inputCheckBox = $get(id).getElementsByTagName("input")[2];
if (!inputCheckBox || inputCheckBox.disabled) {
//cancel selection for disabled rows
args.set_cancel(true);
}
inputCheckBox.checked = false;
}
</script>
</telerik:RadCodeBlock>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<div>
<telerik:RadComboBox ID="RadComboBox1" Runat="server">
</telerik:RadComboBox>
<asp:HiddenField ID="HiddenField2" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid1" runat="server"
AllowPaging="True" PageSize="10" Width="97%" AllowMultiRowSelection="True"
GridLines="None">
<PagerStyle Mode="NumericPages" />
<ClientSettings EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true"/>
<ClientEvents OnRowClick="RowSelecting" />
</ClientSettings>
<MasterTableView>
<Columns>
<telerik:GridClientSelectColumn>
</telerik:GridClientSelectColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</form>
</body>
</html>
Thanks
G. Manikandan