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
140
In row template (user control), how do the template control get the data from clicked row?
posted

Now I have a problem, I wanna add a UltraWebGrid in the row template control the sql will according to different row selected to change.

How can I retrieve the data from the selected row data in "code behind" file(.ascx.vb) for further sql selection?

Parents
No Data
Reply
  • 45049
    posted

    Unless you want to implement some custom AJAX, you'll need to have your data already available on the client.  The simplest way to do this is to have the data you want in columns of your WebGrid, whether you show those columns to the user or not.  You'll also want to copy the data back to the corresponding WebGrid cells when you're done editing the template, and use the grid's events to process updates to your underlying data.

    If you're using controls that don't take a "value" attribute to store their value (which includes all NetAdvantage for ASP.NET controls), you'll need to use some JavaScript to copy the values into the row edit template's controls and back to the grid.  An example of how to do this is provided in the following article from our online Knowledge Base:
    HOWTO: Placing complex controls into the RowEditTemplate

Children
No Data