I've created a custom dropdown control, following the directions at http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7698. Works great, but the problem I'm having is that the text box that is the editor in the cell with the custom dropdown allows direct editing of the text. I'd like this to be readonly or disabled - basically the same behavior as a different column that has the DropDownList style.
I've tried setting the UltraTextEditor to readonly and disabled, but it appears that that the WinGrid is overwriting these properties. I've also tried doing things with the style to no avail.
I'm thinking I'm missing something simple here, any ideas how to do this?
Hi,
The DropDownList functionality you are referring to is specific to the UltraComboEditor and does not exist in UltraTextEditor. So I don't think this can work with an UltraTextEditor. But maybe you you use an UltraComboEditor instead, then it will honor the Style property on the grid column when set to DropDownList. You would, of course, have to hide the default dropdown button in the combo by setting DropDownButtonDisplayStyle to Never.
This is close, but not quite right yet - if I click on the text portion of the cell (instead of on the right button itself) I'm getting a small, empty drop down. I'd expect this to do nothing but activate the cell (though it it would do the drop down it would have been great).
I've tried to handle the Click, BeforeDropDown and BeforeEnterEditMode events, and manually do the drop down, but those events are never fired on the combo editor. I've also tried to use the BeforeEnterEditMode and AfterEnterEditMode events on the grid itself to do this, but I can't get it to work from there either. If I call grid.ActiveCell.Column.Editor.DropDown(), nothing happens, if I try to get back to the button that was added and call DropDown on it, I'll get an exception saying that the editor must be in edit mode to call that method - this happens even if I'm in the AfterEnterEditMode event.