4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 19 May 2014, 04:08 AM
Hi,
Please try the following C# code snippet to access the Object of RadRating in "btnPostComment_Click" event.
C#:
Thanks,
Shinu.
Please try the following C# code snippet to access the Object of RadRating in "btnPostComment_Click" event.
C#:
RadRating ratingControl = this.FindControl("RadRating1") as RadRating;Thanks,
Shinu.
0
ITA
Top achievements
Rank 1
answered on 19 May 2014, 06:19 AM
Hi,
i tried your example, but ratingControl is null!
thanks
Rene
i tried your example, but ratingControl is null!
thanks
Rene
0
ITA
Top achievements
Rank 1
answered on 19 May 2014, 08:11 AM
Hi,
I think I have to explain a little more. I use MasterPpage with ContentPlaceHolder. On my Page I use a RadGrid and a coloumn with a RadRating Control. After rating I open the tooltip and after "btnPostComment_Click" I want get the actual rating to write back in my database.
But I can't access the right Row in RadGrid.
Thanks
Rene
I think I have to explain a little more. I use MasterPpage with ContentPlaceHolder. On my Page I use a RadGrid and a coloumn with a RadRating Control. After rating I open the tooltip and after "btnPostComment_Click" I want get the actual rating to write back in my database.
But I can't access the right Row in RadGrid.
Thanks
Rene
0
Accepted
Shinu
Top achievements
Rank 2
answered on 20 May 2014, 03:19 AM
Hi,
I guess your RadRating is inside the ItemTemplate of RadGrid. Please have a look into the following code snippet to access the ItemTemplate control of RadGrid and also take a look into this help documentation which discuss about Accessing Cells and Rows of RadGrid.
C#:
Let me know if you have any concern.
Thanks,
Shinu.
I guess your RadRating is inside the ItemTemplate of RadGrid. Please have a look into the following code snippet to access the ItemTemplate control of RadGrid and also take a look into this help documentation which discuss about Accessing Cells and Rows of RadGrid.
C#:
protected void btnPostComment_Click(object sender, EventArgs e){ foreach (GridDataItem item in RadGrid1.Items) { RadRating ratingControl = item.FindControl("RadRating1") as RadRating; }}Let me know if you have any concern.
Thanks,
Shinu.