Hi guys,
Am in a bit of rut here :)
I create a gridview through server-side C#, then bind it to data from a SL Enabled WCF WebServie (List<customers), add it to a stackpanel, add the stackpanel to the page and so on.
I have also attached a double click handler to the grid and I now do the edit in a modal window.
Next thing to do of course is to reflect the change in the data on the grid when the modal window is closed. Here lies my problem, how do I rebind to that grid if I can't reference it since it was created runtime?
For those who understand better with code, here are some snippets:
1. Create the grid
newGrid = new RadGridView();
newGrid.Width = 800;
newGrid.Height = 400;
2. Bind it with wcfWebService
void ws_CustomerListCompleted(object sender, CustomerListCompletedEventArgs e)
{
newGrid.ItemsSource = e.Result.ToList();
}
3. Create the modal
modalPopup myModal = new modalPopup(cc); <-- cc is a customer object based on which row was doubleclicked
4. Modal pops up, populates the textboxes, then saves the record
What I would happen is, when the modal closes, the grid is rebound.
Thanks in advancE!
Am in a bit of rut here :)
I create a gridview through server-side C#, then bind it to data from a SL Enabled WCF WebServie (List<customers), add it to a stackpanel, add the stackpanel to the page and so on.
I have also attached a double click handler to the grid and I now do the edit in a modal window.
Next thing to do of course is to reflect the change in the data on the grid when the modal window is closed. Here lies my problem, how do I rebind to that grid if I can't reference it since it was created runtime?
For those who understand better with code, here are some snippets:
1. Create the grid
newGrid = new RadGridView();
newGrid.Width = 800;
newGrid.Height = 400;
2. Bind it with wcfWebService
void ws_CustomerListCompleted(object sender, CustomerListCompletedEventArgs e)
{
newGrid.ItemsSource = e.Result.ToList();
}
3. Create the modal
modalPopup myModal = new modalPopup(cc); <-- cc is a customer object based on which row was doubleclicked
4. Modal pops up, populates the textboxes, then saves the record
What I would happen is, when the modal closes, the grid is rebound.
Thanks in advancE!