Hi there,
I've been using your product in trial extensively and we're just about to purchase it, and it's been a great pleasure to use, with excellent forums covering 90% of what I've wanted to try and do so far.
I'm currently stuck on something that I just can't get to work.
I'm trying to provide certain database bound historical information in a right-click context menu (/panel).
The consist of another datagrid of information, and depends on the row being right-clicked.
I have implemented a RadGridView with a custom context menu event handler
rgvRatings_ContextMenuOpening
which:
-Opens a manual connection to my database and executes a stored procedure returning certain drill down information contextually on the row I'm looking at.
-Sets the DataSource of a RadGridView to point at my newly acquired data
-Creates a RadDropDownMenu;
-Creates a new RadHostItem to host the "History" RadGridView, and then finally
-Sets the ContextMenu to be this newly created RadDropDownMenu
-Sets appropriate MinimumSize fields so that the hosted item is properly sized and visible.
This actually works the first time I right click on something, but only the first time.
After that, the context menu that appears always contains the same data, no matter if I clear it.
There are some questions surrounding this:-
-How can I update the datasource of a RadHostItem's hosted control (I tried using RadControlHostItem, a derived class that basically exposes the "HostedControl" as a Control on the RadHostItem)
-Is creating the HistoryGrid at design time as I've done a bad idea ? I ask because I found programmatically instantiating a RadGridView very awkward and it never quite worked as expected.
-What happens to the control "x" when you instantiate a RadHostItem(x)? I ask because the grid does disappear, even when I tried to instantiate the RadHostItem pointing at a copy of the grid, rather than the grid itself (I admit I'm extremely new to C# so this may be because I don't know how to clone an existing object...)
-Having "surfed" the object "e.ContextMenu" at runtime in debug mode, it seemed to have the RadHostItem with grid inside and the grid showing a datasource that had the right data in it.. (may be going mad), could there be some form of contextmenu caching that has caught me out or is this a red herring?
I realise this is quite an involved question, but it is causing quite a headache, so any pointers or hints would be most welcome!
I'm also open to suggestions like "Have you thought of using this completely different component and approach to achieve a similar result" type of thing!
Regards,
Mike Renwick