Hi all,
When you group by a column that contains rows without a value (or an empty string), you get a grouping row that has a description that also has no value. Well, it does say "(x items)", but there's nothing before the item count.
We'd like to see the string "[Unspecified] (13 items)" for example.
I've done a fairly crude implementation like so:
rec.Description =
"[Unspecified] " & rec.Description
I could make it more robust, as if there is a value that genuinely starts with an open bracket, it would not work. However, it would be good if there was a simple string property on the XamDataGrid itself, that you could set, in order for the grid to do this for you!
What do you think?
Dave
(p.s. Any plans to improve the formatting in this forum? my posts always look ok when composing, but mess up when posted... it's almost impossible to paste code and get it to look good!)
Dave,
If you have an empty string, I believe this cannot be picked up by the XamDataGrid as something standard or predefined as it is a valid value. For this, a feature request would be one way or the way you are handling this at the moment.
Hi Alex,
I've checked out the resource strings. There's a "GroupByDescription_NullValue_Literal", which, as you state, holds the string to display for null values. However, we don't have any null values in our data, but blank strings.
It looks like I could do with a "GroupByDescription_EmptyString_Literal" as well. I'll add a feature request.
Yep, Joe's post looks nicely formatted - I imagine he probably used some sort of html editor to construct the post, then pasted the html directly into the "html popup" the forum provides. Would be nice if it handled pasting the code in directly, a bit better... but not a big deal!
Cheers,
Hello Dave,
To the best of my knowledge there is no such property that you can set, but you do not need that.
All predefined strings in our controls are Resource Strings and you can fully customize them - so is this string - it would display [null] (2 items) if you have 2 null values. You can modify by changing the resource string for this. Please follow this article in our help to see all the information about Resource Strings and how to change them. Of course the strings that you are interested in are the DataPresenter ones.
Regarding formatting, actually the forum supports quite good formatting, however you have to use magic to get it working. For example, you can see this post by Joe Modica, where you can see that the code is pretty nicely formatted. I do not know how to make it this pretty as well. So I suppose I should go and ask them, shouldn't I?