User (Old forums)MemberNovember 6, 2006 at 1:18 amPost count: 23064
I am new to this forum and Xceed components. One of the columns in my grid is a link. I followed the sample in the thread titled “Html Link in a grid”. It works great except that I want to turn of cell navigation because all of the grid data is read-only and I want entire rows to be selected. It appears that disabling cell navigation prevents the CellEditorManager ActivatingControl and DeactivatingControl events from being triggered. I need these events (or at least I think I do, according to the sample) in order to subscribe to the LinkClicked event of my custom CellEditorManager.
Am I missing something, or are there other events I could use to subscribe and unsubscribe to the LinkClicked event?
Imported from legacy forums. Posted by Lee (had 2983 views)User (Old forums)MemberNovember 6, 2006 at 4:52 pmPost count: 23064
If you make your grid ReadOnly, none of the events related to editors will fire, since you never fall into edition, thus you never get to the editors.
You will need to “mimic” the editor to do what you want, that is, subscribe to the cell click event (through the DataRowTemplate.Cells collection, before filling the grid with data, since this is a template), and in the Click event handler, simulate a click to the LinkLabel control (e.g. pop the browser and feed it the address).
Imported from legacy forums. Posted by André (had 371 views)User (Old forums)MemberNovember 6, 2006 at 5:14 pmPost count: 23064
Sorry, I should have been more clear. The data is read-only but the link column is not. The following methods in my LinkEditorManager are being called correctly:
But ActivateControlCore is never called and the ActivatingControl event is never triggered. Apart from that, it all works great. The linklabel appears and the link underline appears when the mouse hovers over the cell. I just need to hook up the LinkClicked event and I am all set.
Imported from legacy forums. Posted by Lee (had 445 views)User (Old forums)MemberNovember 6, 2006 at 6:04 pmPost count: 23064
I have gotten it to work for now by subscribing to the LinkLabel.LinkClicked event in the LinkEditorManager.CreateControl method and unsubscribing in the LinkLabel.Dispose event. Let me know if you think there is a more elegant or efficient way to do this.
Imported from legacy forums. Posted by Lee (had 3906 views)
- You must be logged in to reply to this topic.