Skip to content

Infragistics Community Forum / Web / Ultimate UI for ASP.NET Web Forms / Label text not updating during OnRowSelectionChanged event

Label text not updating during OnRowSelectionChanged event

New Discussion
Adrian
Adrian asked on Apr 24, 2017 9:25 PM

I have a WebDataGrid with the OnRowSelctionChanged event configured.  In that event, I use server-side code to update the text on a label outside the grid.  I can see the lbl.Text value getting set on the server side, but it is not getting updated on the client side.

I have tried these approaches:

  • Put the grid and label inside an ASP Update Panel
  • Don’t use an UpdatePanel, but set EnableAjax and EnableAjaxViewState to True on the WebDataGrid.
  • Use a standard postback without the two above bullet points (no AJAX).

Is there anything I need to do to allow this event to update controls outside of the WebDataGrid?  If I run the same code using a standard ASP Button click (outside the grid), the label gets update appropriately.  So I must be misunderstanding something about the WebDataGrid event handling.

Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Apr 24, 2017 9:25 PM

    Hello Adrian, 

    In the WebDataGrid during OnRowSelectionChanged event to set the label, you have to set ‘EnableAjax’ property to false to cause a full page postback in the page. 

    To call the server method on the client side event ,you can handle the client side rowselectionchanged event and trigger a postback in this event like this: 

    function WebDataGrid1_Selection_RowSelectionChanged(sender, eventArgs) {             if (eventArgs.getSelectedRows().get_length() > 0) {                 __doPostBack(‘<%= WebDataGrid1.ClientID %>’, ”);             }         } 

    You can also refer the below post for more information: 

    https://ko.infragistics.com/community/forums/p/91681/453216.aspx#453216 

     

    Please let me know if you need further assistance.

     

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Adrian
Favorites
0
Replies
2
Created On
Apr 24, 2017
Last Post
8 years, 10 months ago

Suggested Discussions

Created by

Created on

Apr 24, 2017 9:25 PM

Last activity on

Feb 20, 2026 11:35 AM