I am playing around with C# and the jQuery UI Dialog box tonight. I have added a dialog div to a user management page that will enable Administrators to edit user information (such as address, phone, aspnetdb stuff). When the admin clicks on a row in a grid view, the dialog is activated, but the controls (text boxes and drop downs) take a few seconds to populate with the information. I would like the dialog to present the user’s information, allow changes to the controls, allow the administrator to save the data, and then update the grid view which is inside of an update panel.
Is there a way through Code Behind and jQuery to only show the dialog box after all of the fields have been filled in by the Datatable (dataset xsd)?
Thanks in advance for your help. This has stumped me for hours.
I’d go with the following scenario:
jQuery.ajaxthat gets the appropriate data based on the user’s selection.jquery.ajaxfunction has anonSuccesscallback function which activates the jqueryUI dialog.Something like:
UPDATE: Here’s how you can populate data in you dialog’s controls. I’ll try to explain it with an example.
Server-Side (Method has to be static and has a
[WebMethod()]attribute).Client-Side:
For populating dropdown lists, check out http://www.isolutionteam.co.uk/how-to-populate-aspnet-dropdown-list-from-database-by-passing-radio-button-lists-selected-value-as-parameter-with-jquery/