Hi'
I have the following situation:
1. Lets say a test.aspx page with a button titled "Select"
2. ANother page Selectuser.aspx that has a webdatagrid and OK and Cancel button.
3. I want when the user clicks on the select button on the test.aspx page, Selectuser.aspx is displayed in a dialog window and then once the user selects a row and hits OK or hits cancel, test.aspx client javascript to handle this event -- do nothing in case no row is selected and cause a postback with the selected row data in case user has selected the row.
Best ways to achieve above ?
Thanks
Abhishek
Hello,If you have any other questions do not hesitate to ask us.
Hello Abhishek,I am attaching the sample how the situation should look like implemented. Two pages, you press the button and the second page is loaded inside the WDW and when one of the buttons is pressed if it is cancel the selection is cleaned and if not just change the state of the parent. In state changing event of the WDW you are checking the grid inside. If has selection you do what is needed otherwise do nothing. Please take a note that you can keep the selected row inside a global variable wich is available on the client and on the server.
Hello AbhishekI am working on a sample which implements your scenario. I will attach the sample as soon as it is ready.
Hi Nikifor
Thanks for the reply.
I didnt find the link you mentioned in your post - but I know how to set the content URL.
I have also looked at http://community.infragistics.com/forums/t/62665.aspx to close the dialog window from the parent page.
However, regarding the use of session variables, issue is that button will be clicked inside the child (dialog) window and will cause postback in child window -- but my requirement is that once the user presses OK button on child window, the child window should close and then cause postback in the parent window with the data of the row selected by the user.
Hello Abhishek,My suggestion is to look into this forum thread how to set ContentURL of the dialog window. To set your page as a content url. When a button OK/Cancel is pressed to keep all the necessary information about the selected on the grid user into a session variable like session["userDetails"] = "userID= 2011" and to make a check if there is any selected row (in that case clear the varriable).