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

Fire js rowselect() after change selected row via server

2 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wojciech
Top achievements
Rank 1
Wojciech asked on 14 Sep 2011, 12:54 PM
Hi,

in my application user got two options to select row:
1. click on row
2. clickt button that deselect current and selects next row server side
 
int indeks = 0;
           foreach (GridDataItem item in RadGNaglowek.MasterTableView.Items)
           {
               if (item.Selected)
               {
                   indeks = item.ItemIndex + 1;
                   if (item.ItemIndex != RadGNaglowek.MasterTableView.Items.Count - 1)
                       item.Selected = false;
               }
           }
           if (indeks == RadGNaglowek.PageSize)
           {
               indeks = 0;
               RadGNaglowek.CurrentPageIndex = RadGNaglowek.CurrentPageIndex + 1; 
               RadGNaglowek.MasterTableView.Rebind();
           }

After RadGrid is updated by RadAjaxManager, I need to run javascript code same as i run on user row click(select) :
<ClientEvents  OnRowSelected="RowClick"  />

How can I do it?

2 Answers, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 17 Sep 2011, 11:30 AM
Hi Wojciech,

You could run your JavaScript on OnResponseEnd client side event. Check this help topic for more information: http://www.telerik.com/help/aspnet-ajax/ajax-onresponseend.html

Kind regards,
Vasil
the Telerik team
Browse the vast support resources we have to jump start 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
Wojciech
Top achievements
Rank 1
answered on 20 Sep 2011, 02:15 PM
Thank you Vasil for this solution, it helped a lot.

Regards,
Wojciech
Tags
Grid
Asked by
Wojciech
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Wojciech
Top achievements
Rank 1
Share this question
or