
Mustaque Bhuiyan
Top achievements
Rank 1
Mustaque Bhuiyan
asked on 14 Nov 2010, 11:28 AM
Hi Guys,
I have been fighting with this for weeks. Please help.
I am using a RadGrid which has a GridClientSelectColumn column, but ClientEvents does not fire the OnRowSelected.
The Grid gets updated using the SelectedValue of dropdown. If I poplulate the RadGrid without using the dropdown, it works just fine. If I populate the RadGrid , it populates the RadGrid properly but ClientEvent does not fire.
Here is my code snippet:
RadGrid gets refreshed properly by selected value of a DroDown.
<radG:RadGrid
ID="rgClient_Mgt"
runat="server"
EnableAJAX="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="odsClient_List"
GridLines="None"
PagerStyle-Mode="NextPrevNumericAndAdvanced"
OnItemCreated="rgClient_Manage_ItemCreated"
OnItemCommand="rgClient_Manage_ItemCommand">
<MasterTableView EnableViewState="true" DataKeyNames="ClientID,LName,FName" AutoGenerateColumns="False" DataSourceID="odsClient_Manage" >
<Columns>
<radG:GridClientSelectColumn UniqueName="ClientID" HeaderText="Select" />
<radG:GridBoundColumn DataField="ClientID" HeaderText="ClientID" SortExpression="ClientID"
UniqueName="ClientID">
</radG:GridBoundColumn>
</MasterTableView>
<ClientSettings>
<ClientEvents
OnRowSelected ="Client_to_Add" >
</ClientEvents>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</radG:RadGrid>
java script code:
function Client_to_Add(row)
{
alert("Hi");
}
I have been fighting with this for weeks. Please help.
I am using a RadGrid which has a GridClientSelectColumn column, but ClientEvents does not fire the OnRowSelected.
The Grid gets updated using the SelectedValue of dropdown. If I poplulate the RadGrid without using the dropdown, it works just fine. If I populate the RadGrid , it populates the RadGrid properly but ClientEvent does not fire.
Here is my code snippet:
RadGrid gets refreshed properly by selected value of a DroDown.
<radG:RadGrid
ID="rgClient_Mgt"
runat="server"
EnableAJAX="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="odsClient_List"
GridLines="None"
PagerStyle-Mode="NextPrevNumericAndAdvanced"
OnItemCreated="rgClient_Manage_ItemCreated"
OnItemCommand="rgClient_Manage_ItemCommand">
<MasterTableView EnableViewState="true" DataKeyNames="ClientID,LName,FName" AutoGenerateColumns="False" DataSourceID="odsClient_Manage" >
<Columns>
<radG:GridClientSelectColumn UniqueName="ClientID" HeaderText="Select" />
<radG:GridBoundColumn DataField="ClientID" HeaderText="ClientID" SortExpression="ClientID"
UniqueName="ClientID">
</radG:GridBoundColumn>
</MasterTableView>
<ClientSettings>
<ClientEvents
OnRowSelected ="Client_to_Add" >
</ClientEvents>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</radG:RadGrid>
java script code:
function Client_to_Add(row)
{
alert("Hi");
}
9 Answers, 1 is accepted
0
Hi Mustaque,
Could you please try using the following signature for the Client_to_Add function and let me know if the issue still persists:
Looking forward for your reply.
Sincerely yours,
Radoslav
the Telerik team
Could you please try using the following signature for the Client_to_Add function and let me know if the issue still persists:
function
Client_to_Add(sender, eventArgs)
{
}
Looking forward for your reply.
Sincerely yours,
Radoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 18 Nov 2010, 03:51 AM
Hi,
Thank you very much for your reply. I tried it before, it did work. I tried it again exactly the way said, it did not work either. Like I said, I get the error, if I populate the grid through another dropdown. I have used <telerik:AjaxSetting> to populate the grid based on the selectdvalue of the dropdown, but the ClientEvents does not get fired.
Please help. I am very frustrated with this issue. I need to fix it soon. Thanks..
Mustaque
Thank you very much for your reply. I tried it before, it did work. I tried it again exactly the way said, it did not work either. Like I said, I get the error, if I populate the grid through another dropdown. I have used <telerik:AjaxSetting> to populate the grid based on the selectdvalue of the dropdown, but the ClientEvents does not get fired.
Please help. I am very frustrated with this issue. I need to fix it soon. Thanks..
Mustaque
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 19 Nov 2010, 05:24 AM
Do you any other suggestion? I am not seeing why I can not do it. Please help.
Mustaque
Mustaque
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 19 Nov 2010, 06:22 AM
Thank you very much for your reply. I tried it before, it did NOT work. I
tried it again exactly the way said, it did not work either. Like I
said, I get the error, if I populate the grid through another dropdown. I
have used <telerik:AjaxSetting> to populate the grid based on
the selectdvalue of the dropdown, but the ClientEvents does not get
fired.
Please help. I am very frustrated with this issue. I need to fix it soon. Thanks..
Mustaque
NB: I meant to say "it did NOT work". I am still having the same issue. Please me fixing this issue.
Please help. I am very frustrated with this issue. I need to fix it soon. Thanks..
Mustaque
NB: I meant to say "it did NOT work". I am still having the same issue. Please me fixing this issue.
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 23 Nov 2010, 08:41 AM
Hi,
I have been waiting for your response. I have not heard anything from you yet. Please help fixing this issue. I am stuck with the TelerikGrid
Please help....
Mustaque
I have been waiting for your response. I have not heard anything from you yet. Please help fixing this issue. I am stuck with the TelerikGrid
Please help....
Mustaque
0
Hello Mustaque,
I still could not reproduce the described issue. I am sending you a simple example based on your code, however everything works as expected. Could you please check it out and let me know what differs in your case. Also it will be helpful if you could post the aspx page with the related code behind code.
Looking forward for your reply.
Sincerely yours,
Radoslav
the Telerik team
I still could not reproduce the described issue. I am sending you a simple example based on your code, however everything works as expected. Could you please check it out and let me know what differs in your case. Also it will be helpful if you could post the aspx page with the related code behind code.
Looking forward for your reply.
Sincerely yours,
Radoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 24 Nov 2010, 06:58 AM
Hi,
Thank you very much for your response. I really appreciate your time. Your example have no issue; I have used it in other places, and they work just fine. I am having the problem when I try to populate the grid through a Dropdown. I have used <telerik:AjaxSetting> to populate the grid based on the selectdvalue of the dropdown, but the ClientEvents does not get fired.If I populate the grid without using the value of DropwDown, it works just fine.
Here is what I am doing:
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="radI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>
<asp:Content ID="cTaskHeading" ContentPlaceHolderID="cphTaskHeading" Runat="Server">
<script type="text/javascript">
function Client_to_Add(sender, eventArgs)
{
alert("Hi");
}
</script>
</asp:Content>
<asp:Content ID="cTaskWorking" ContentPlaceHolderID="cphTaskWorking" Runat="Server">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ctl00$cphTaskWorking$FormView1$ddlProgramOutput">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ctl00$cphTaskWorking$rgClient_Mgt" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ctl00$cphTaskWorking$rgClient_Mgt">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ctl00$cphTaskWorking$rgClient_Mgt" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<table>
<tr>
<td>
<radG:RadGrid
ID="rgClient_Mgt"
runat="server"
EnableAJAX="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="odsClient_List"
GridLines="None"
PagerStyle-Mode="NextPrevNumericAndAdvanced"
OnItemCreated="rgClient_Manage_ItemCreated"
OnItemCommand="rgClient_Manage_ItemCommand">
<MasterTableView EnableViewState="true" DataKeyNames="ClientID,LName,FName" AutoGenerateColumns="False" DataSourceID="odsClient_Manage" >
<Columns>
<radG:GridClientSelectColumn UniqueName="ClientID" HeaderText="Select" />
<radG:GridBoundColumn DataField="ClientID" HeaderText="ClientID" SortExpression="ClientID"
UniqueName="ClientID">
</radG:GridBoundColumn>
</MasterTableView>
<ClientSettings>
<ClientEvents
OnRowSelected ="Client_to_Add" >
</ClientEvents>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</radG:RadGrid>
</td>
</tr>
</table
Like I said, I have other grid which works fine. It is giving me an error, only when I tried use Ajax and Dropdown. It populates the data peoperly, but ClientEven does get fired.
Please let me know what I am doing wrong. I am stuck here. Please help.
Regard!
Mustaque
Thank you very much for your response. I really appreciate your time. Your example have no issue; I have used it in other places, and they work just fine. I am having the problem when I try to populate the grid through a Dropdown. I have used <telerik:AjaxSetting> to populate the grid based on the selectdvalue of the dropdown, but the ClientEvents does not get fired.If I populate the grid without using the value of DropwDown, it works just fine.
Here is what I am doing:
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="radI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>
<asp:Content ID="cTaskHeading" ContentPlaceHolderID="cphTaskHeading" Runat="Server">
<script type="text/javascript">
function Client_to_Add(sender, eventArgs)
{
alert("Hi");
}
</script>
</asp:Content>
<asp:Content ID="cTaskWorking" ContentPlaceHolderID="cphTaskWorking" Runat="Server">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ctl00$cphTaskWorking$FormView1$ddlProgramOutput">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ctl00$cphTaskWorking$rgClient_Mgt" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ctl00$cphTaskWorking$rgClient_Mgt">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ctl00$cphTaskWorking$rgClient_Mgt" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<table>
<tr>
<td>
<radG:RadGrid
ID="rgClient_Mgt"
runat="server"
EnableAJAX="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataSourceID="odsClient_List"
GridLines="None"
PagerStyle-Mode="NextPrevNumericAndAdvanced"
OnItemCreated="rgClient_Manage_ItemCreated"
OnItemCommand="rgClient_Manage_ItemCommand">
<MasterTableView EnableViewState="true" DataKeyNames="ClientID,LName,FName" AutoGenerateColumns="False" DataSourceID="odsClient_Manage" >
<Columns>
<radG:GridClientSelectColumn UniqueName="ClientID" HeaderText="Select" />
<radG:GridBoundColumn DataField="ClientID" HeaderText="ClientID" SortExpression="ClientID"
UniqueName="ClientID">
</radG:GridBoundColumn>
</MasterTableView>
<ClientSettings>
<ClientEvents
OnRowSelected ="Client_to_Add" >
</ClientEvents>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</radG:RadGrid>
</td>
</tr>
</table
Like I said, I have other grid which works fine. It is giving me an error, only when I tried use Ajax and Dropdown. It populates the data peoperly, but ClientEven does get fired.
Please let me know what I am doing wrong. I am stuck here. Please help.
Regard!
Mustaque
0
Hello Mustaque,
The AjaxControlID holds the control id of the control that can initiate an AJAX request. However this ID is a server side control's ID. For example if you ajaxify the RadGrid, which has ID = "rgClient_Mgt" , then the AjaxSetting will be:
Also into the WebUserControl I suggest you to use the RadAjaxMangerProxy instead of RadAjaxManager.
For more information you could check out the following online documentation:
http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html
Additionally could you please try disabling the ajax and let me know if the issue still exists.
Looking forward for your reply.
Kind regards,
Radoslav
the Telerik team
The AjaxControlID holds the control id of the control that can initiate an AJAX request. However this ID is a server side control's ID. For example if you ajaxify the RadGrid, which has ID = "rgClient_Mgt" , then the AjaxSetting will be:
<
telerik:AjaxSetting
AjaxControlID
=
"rgClient_Mgt"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgClient_Mgt"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
Also into the WebUserControl I suggest you to use the RadAjaxMangerProxy instead of RadAjaxManager.
For more information you could check out the following online documentation:
http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html
Additionally could you please try disabling the ajax and let me know if the issue still exists.
Looking forward for your reply.
Kind regards,
Radoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Mustaque Bhuiyan
Top achievements
Rank 1
answered on 01 Dec 2010, 08:41 AM
Hi,
Good news !! Problem has been solved. Thanks for your help. Actually, the issue was not with the RadAjaxManager. I was also setting RadAjaxManager properly. I was using ctl00$cphTaskWorking$rgClient_Mgt because the RadGrid was under a asp:Content called cphTaskWorking.
Like I said before, the Selected Value of the Dropdown drives the value of RadGrid. RadGrid populates the value without any error but I was missing the ClientEvent. The DropwDown was inside a asp:FormView and I was wrapping around the FormView with a RadAjaxPanel.
I donot know why but my problem was with the RadAjaxPanel.
Mustaque
Good news !! Problem has been solved. Thanks for your help. Actually, the issue was not with the RadAjaxManager. I was also setting RadAjaxManager properly. I was using ctl00$cphTaskWorking$rgClient_Mgt because the RadGrid was under a asp:Content called cphTaskWorking.
<
asp:Content ID="cTaskWorking" ContentPlaceHolderID="cphTaskWorking" Runat="Server">
Like I said before, the Selected Value of the Dropdown drives the value of RadGrid. RadGrid populates the value without any error but I was missing the ClientEvent. The DropwDown was inside a asp:FormView and I was wrapping around the FormView with a RadAjaxPanel.
I donot know why but my problem was with the RadAjaxPanel.
<
telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">.
I kept the DropDown inside the FormView, but I took the RadAjaxPanel , all at sudden it is wokring jsut fine.
thanks again for your help.
Mustaque