I have a grid column of type Object. Some rows are Decimal values, others are Dates.
I've read various articles explaining how to set editors on cells, and when editing them this works fine. However, I can't work out how to render this so it looks decent.
Ideally I'd like to just set the Format of each cell so I can format my date just as a Time and my Decimals with the required precision. However, I can only set a format on the column itself. If I set the format for Decimals, I'm left trying to set a control as the RenderingControl on an UltraControlContainerEditor. And vice versa if I set the column format to my time.
Is there a better way to do this? It just looks ugly with the editors rendered there, although perhaps I'm just not finding the best control to do the job.
Thanks.
Hi jcwild,
You can accomplish this by setting a different format for each editor. I've attached a sample application that demonstrates how to do this.
Please let me know if you have any questions.
Thanks Mike. That works well in terms of just formatting the cells.
Is there any way to use the UltraControlContainerEditors when editing the cell, but use the EmbeddableEditorBase when rendering the cell? The former editor has a rendering editor, but it seems to only take a control which is the bit that looks nasty. I'd like to be able to use a control when editing, but to just display the value with my custom format when viewing a cell.
Hello,
According to my understanding of this issue, setting the BorderStyle to None should have worked. In order to figure out what went wrong, I would need to see a sample. Please attach a sample to this thread and I will look it over to determine what went wrong.
If you would prefer not to attach a sample to the public forum, please let me know and I will open a private support case for you.
Which editor would you use for time? UltraTextEditor doesn't seem to be able to format a datetime just as time. I've tried UltraDateTimeEditor which displays the time ok, but I can't seem to get the border to disappear within the cell. I've tried setting BorderStyle to None and BorderAlpha to 0. Is this possible?
There are a couple of solutions which might work for you:
Please let me know whether either of these solutions work for you.