My scenario:
I have a main page with a combo box in it that displays a list of customer names. Under that are 2 buttons to "add" a new customer or "edit" the currently selected customer. Now when the "add" button is clicked the server side Click event opens a RadWindow with a DetailsView in it that then allows me to specify the new customer's details. Similarly, the edit button opens the same RadWindow/DetailsView but in edit mode. In addition to the DetailsView are 2 buttons "OK" and "Cancel". Since i am using buttons outside the DetailsView i am actually calling the DetailsView to Update/Insert from the server side event of the buttons in the RadWindow.
What i am having an issue with is updating the combo box when the RadWindow closes. When i edit a customer, potentially the name changes so i need to update the combo box. Also when i add a new customer i need to add the new name to the combo box. In addition, i need the newly added customer to be selected. Of course this will be ajaxified as i dont want the entire main page to update.
Now i have been doing a lot of searching and found related posts, such as opening an add/edit window from a grid, etc but after a lot of playing i have not found a solution that meets all the above criteria. Rather than 'taint' the answer i am given with what i have tried, can you please tell me the most efficient and recommended approach to solving this scenario, specifically:
1) The best way to close the RadWindow and return
2) The best way to update the ComboBox (Rebind and Refresh)
3) The best way to select the entry in the ComboBox that was edited/added
thank you very much in advance for any assistance you can give. Example code is always welcome :oI
I have a main page with a combo box in it that displays a list of customer names. Under that are 2 buttons to "add" a new customer or "edit" the currently selected customer. Now when the "add" button is clicked the server side Click event opens a RadWindow with a DetailsView in it that then allows me to specify the new customer's details. Similarly, the edit button opens the same RadWindow/DetailsView but in edit mode. In addition to the DetailsView are 2 buttons "OK" and "Cancel". Since i am using buttons outside the DetailsView i am actually calling the DetailsView to Update/Insert from the server side event of the buttons in the RadWindow.
What i am having an issue with is updating the combo box when the RadWindow closes. When i edit a customer, potentially the name changes so i need to update the combo box. Also when i add a new customer i need to add the new name to the combo box. In addition, i need the newly added customer to be selected. Of course this will be ajaxified as i dont want the entire main page to update.
Now i have been doing a lot of searching and found related posts, such as opening an add/edit window from a grid, etc but after a lot of playing i have not found a solution that meets all the above criteria. Rather than 'taint' the answer i am given with what i have tried, can you please tell me the most efficient and recommended approach to solving this scenario, specifically:
1) The best way to close the RadWindow and return
2) The best way to update the ComboBox (Rebind and Refresh)
3) The best way to select the entry in the ComboBox that was edited/added
thank you very much in advance for any assistance you can give. Example code is always welcome :oI