Link to home
Start Free TrialLog in
Avatar of purplesoup
purplesoupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Web Page/Dialog/Add to Table/Submit

I've got what seems a fairly simple problem but I'm not getting it working as quick as I would like.

I've a dialog from a webpage that runs a callback into a JavaScript function on the calling page. The return value from this dialog needs to be added to some sort of table or grid on the page.

I then need to be able to access the data from the table/grid in the code behind the page when the page is finally submitted.

First I tried using a Telerik RadGrid - I triggered a postback when the dialog closed to access the values to add to the grid.

However I have validation controls on the main page, so trying to perform a postback after the dialog triggers validations on controls not filled in.

I began to write some JSON calls to send the data to the server but it seemed like overkill so I took a different route.

Now I've used JavaScript (jQuery) to add rows to a table marked with runat="Server" - so each selection from the dialog adds a new row to the table.

This looks fine in the browser but when I submit the page there are no rows showing in the table control submitted.

So can I have some suggestions - ideally some sample code - on how to get this working?
ASKER CERTIFIED SOLUTION
Avatar of Sar1973
Sar1973
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of purplesoup

ASKER

That's brilliant - love it - thanks! I'll leave the question open in case any other suggestions are available out posting the data back to the server.

At the moment I'm simultaneously keeping the data inserted into the table in a hidden field, I'll need to add a "delete" feature at some point and keep the two in sync as well.
Thanks for your help.