Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1336
Blank Group Description
posted

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:

 

Private Sub WorkPlanGrid_InitializeRecord(ByVal sender As Object, ByVal e As InitializeRecordEventArgs) Handles WorkPlanGrid.InitializeRecord

 

 

    If TypeOf e.Record Is GroupByRecord Then

 

         Dim rec As GroupByRecord = DirectCast(e.Record, GroupByRecord)

 

 

         If rec.Description.Trim.StartsWith("(") Then

                  rec.Description =

"[Unspecified] " & rec.Description

 

        End If

 

    End if

 

End Sub

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!)

Parents Reply Children
No Data