Hi, I have a ultraGridRowEditTemplate that is assigned to a wingrid band
e.g. ultraGridBand5.RowEditTemplate = this.ultraGridRowEditTemplate1;
However, once I hide or disable the wingrid and rebind it again via a ultracombo, I have lost the RowEditTemplate from the grid. Of course, exiting and then reloading the form will sort this (by firing the InitializeComponent() method), but I really don't want to have to do this. Is there anyway to assign the ultraGridRowEditTemplate back to the wingrid when the wingrid is shown again?ThanksChris
Sorry, I got the method wrong. The correct way to show the template is like this:
e.Cell.Row.ShowEditTemplate();
Hi Mike, Sorry for confusion, I want the RowEditTemplate to appear on a double click only on one column so...
if (e.Cell.Column.Key == "column name")
e.cell.Row.RowEditTemplateResolved.Show();
However, I have done what you have suggested, in the InitaliseLayout function, I have set the automatic display to be none
e.Layout.Bands[0].RowEditTemplate = this.ultraGridRowEditTemplate;
e.Layout.Bands[0].Override.RowEditTemplateUIType = RowEditTemplateUIType.None;And as you seen above, I have called the RowEditTemplateResolved.show() on the cell is double clicked event, however, When the RowEditTemplate appears, it has no text in the CellProxy object and when you click on OK or CANCEL, the dialogue doesn't close. Is there anything I have missed?ThanksChris
Hi Chris,
I'm a little confused by your question. You want the template to show only when you double click a cell or column and then you go on to say that it appears if you double click on any cell. Isn't that what you want?
Anyway, there's no RowEditTemplateUIType for that. But one thing you could do is turn the automatic display of the template off (RowEditTemplateUIType.None).
Then respond to the events of the grid, like the DoubleClickCell event and explicitly show the template:
e.Cell.Row.RowEditTemplateResolved.Show();
Hi Mike, No worries about this question, I must have put it wrong, I was after if I can change the alignment of the text between the two, so there is no bug with the WinGrid library.Finally, Is there a way you can only open the RowEditTemplate dialog on only a cell or column double click. in the InitializeLayout method I havee.Layout.Bands[0].Override.RowEditTemplateUIType = RowEditTemplateUIType.OnDoubleClickRow;however, if I double click any cells in any of the row, it appears.
In code I am after something like...e.Layout.Bands[0].Columns[6].Override.RowEditTemplateUIType = RowEditTemplateUIType.OnDoubleClickRow;
Thanks
Chris
I can't think of any reason why the alignment should be different in the template than in the grid. Or different in the template when it's in edit mode as opposed to out of edit mode.
If you can post a small sample project demonstrating this behavior, I'd be happy to take a look at it and see what's going on. But I would think the solution would just be to set the column.CellAppearance.TextHAlign on the grid column.