Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
470
Set a text box value..
posted

It always takes me a while to get back into ASP from VB...

The problem is I want to display a cell value from selected row when the row is changed...

   Private Sub dgCurrent_RowSelectionChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.SelectedRowEventArgs) Handles dgCurrent.RowSelectionChanged
        Dim o As New clsJob
        o = CType(e.CurrentSelectedRows(0).DataItem, clsJob)
        s = o.JobRef
        txtSelectedJob.Text = s
    End Sub

This event fires and stepping through the code show the text box IS getting the value but it doesn't display...

Do I need to do something on Postback rather than this event??

 

Thanks

  • 2783
    Verified Answer
    posted

    Hi,

    Unless you have disabled AJAX on WDG by setting EnbaleAjax=false, the grid will raise the RowSelectionChanged event through AJAX, because the callback is coming from the WDG that will be the only control that gets updated on the return of the ajax call, therefore even though you are changing the textbox value in the event handler you won’t see that reflected on the client.  You can turn AJAX off on WDG if you don't need it, and see the textbox updated.  Or if all you really want to do is update the textbox text on row selection change, I would suggest doing this on the client in javascript by handling the SelectionClient Event of RowSelectionChanged

    Thanks,
    Olga