Hi All,
i have the following code to convert a integer value (seconds) to double and i wish to oput it like 00:10:15 (615 seconds) in my summary row.
This is working while m grid is not grouped.
I want to have the same formatting when grouped. Currently my code looks like this
so that i will see my seconds as Integer. When i change my first block to
then the formatting is also added when my summery value isNumeric, but this way seems just to be a workaround.
How to apply the same formatting from my first code block using Events or AggregateExpression and FormatString the correct way
Kind regards
Martin Gartmann
i have the following code to convert a integer value (seconds) to double and i wish to oput it like 00:10:15 (615 seconds) in my summary row.
Private Sub rgvWechselProtokoll_GroupSummaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles rgvWechselProtokoll.GroupSummaryEvaluate
If e.Parent Is Me.rgvWechselProtokoll.MasterTemplate Then
Dim fulltime As String
fulltime = Date.FromOADate(CDbl(e.Value) / 86400)
e.FormatString = String.Format("Gesamtzeit = {0:T}", fulltime)
End If
End Sub
This is working while m grid is not grouped.
I want to have the same formatting when grouped. Currently my code looks like this
Me.rgvWechselProtokoll.Columns.Add("Sekunden")
Me.rgvWechselProtokoll.Columns("Sekunden").IsVisible = False
Dim summaryItem As New GridViewSummaryItem()
summaryItem.Name = "Start"
summaryItem.AggregateExpression = "Sum(Sekunden)"
summaryItem.FormatString = "Gesamt = {0}"
Dim summaryRowItem As New GridViewSummaryRowItem()
summaryRowItem.Add(summaryItem)
Me.rgvWechselProtokoll.SummaryRowsBottom.Add(summaryRowItem)
so that i will see my seconds as Integer. When i change my first block to
Private Sub rgvWechselProtokoll_GroupSummaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles rgvWechselProtokoll.GroupSummaryEvaluate
If e.Parent Is Me.rgvWechselProtokoll.MasterTemplate Or IsNumeric(e.Value) Then
Dim fulltime As String
fulltime = Date.FromOADate(CDbl(e.Value) / 86400)
e.FormatString = String.Format("Gesamtzeit = {0:T}", fulltime)
End If
End Sub
then the formatting is also added when my summery value isNumeric, but this way seems just to be a workaround.
How to apply the same formatting from my first code block using Events or AggregateExpression and FormatString the correct way
Kind regards
Martin Gartmann