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
93
Synchronizing webgrids
posted

I would like to present two webgrids on a page, such that on a row change in GridA. GridB is requeried to show records that are based on a column in the active row from GridA.  For instance, GridA could be a display of U.S. States, and when a row becomes active, it will display in GridB all the parks in that state.

 I would like to avoid a full page postback, and so I think that I would place GridB in a WebAsynchRefreshPanel, and have the underlying query for GridB referencing a hidden textbox by means of a ControlParameter.  So what I need is a means to update that hidden textbox from a column in GridA when it changes rows.  But I am not sure how to do this.

I know that this could be done as a heirarchical webgrid, but I would like GridB to always be visible so that the user does not have to expand the children rows.

So can anyone show me how in a client-side script to respond to a row change in a webgrid, and then update a control (the hidden textbox) from a column in the newly active row. 

Thanks for your help.

Parents
No Data
Reply
  • 93
    posted

    Rumen,

     Thank you for your reply.  You proposed an alternate and perhaps more direct solution for my need.  So this is almost the answer that I am looking for.  But I also asked how to perform a client-side action:  "So can anyone show me how in a client-side script to respond to a row change in a webgrid, and then update a control (the hidden textbox) from a column in the newly active row." 

    Your solution looks as if it will solve the scenario I described, but am also looking for how to implement a clientside script on rowchange to read a cell value in the active row and update a second control with that value.  Any thoughts?

Children
No Data