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
150
Cell Value not updating on AfterRowActivate or BeforeRowDeactivate
posted

I am attempting to update the contents of some cells hen the row has focus and when it does not.  I thought i could accomplish this by setting the cell value in those events.  When i set the value i can see in code that it shows as updated but the grid never reflects the change.  If I then go back to that row and look at the value it has reverted to what it was before i tried changing it.  This is a bould grid that I have addd 2 unbound columns to.  The unbound columns are formattedText

Private Sub grdResults_BeforeRowDeactivate(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles grdResults.BeforeRowDeactivate
Dim activeRow As UltraGridRow = grdResults.ActiveRow
Dim strDisplay As String
Dim strNumberDisplay As String
Dim strTypeDisplay As String

strDisplay = "<p><span style=""font-size: 12pt; line-height: 1.44; color: black;"">" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(CStr(activeRow.Cells("Name").Value), VbStrConv.ProperCase)) + "</span></p>"

strDisplay = strDisplay + " " + "<span style=""font-size: 10pt; line-height: 1.44; color: #666666;"">" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(activeRow.Cells("Address1").Value, VbStrConv.ProperCase)) + "</span>"

strDisplay = strDisplay.Replace(StrConv(_searchFileter, VbStrConv.ProperCase), "<b>" + StrConv(_searchFileter, VbStrConv.ProperCase) + "</b>")

strTypeDisplay = ""
If activeRow.Cells("Status").Value = "A" Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(51), 16, 16, 3, 10)
Else
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(53), 16, 16, 3, 10)
End If

If activeRow.Cells("ResultType").Value = CentralSearchResultType.Customer Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(41), 16, 16, 3, 10)
ElseIf activeRow.Cells("ResultType").Value = CentralSearchResultType.Vendor Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(45), 16, 16, 3, 10)
Else
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(49), 16, 16, 3, 10)
End If

strNumberDisplay = "<p align=""right""><span style=""font-size: 10pt; line-height: 1.44; color: #666666;"">#" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(activeRow.Cells("AccountNumber").Value, VbStrConv.ProperCase)) + "</span></p>"
strNumberDisplay = strNumberDisplay.Replace(StrConv(_searchFileter, VbStrConv.ProperCase), "<b>" + StrConv(_searchFileter, VbStrConv.ProperCase) + "</b>")
strNumberDisplay = strNumberDisplay + strTypeDisplay

activeRow.Cells("DisplayMatch").Value = "DEACTIVATE"

activeRow.Cells("DisplayMatchNumber").Value = "DEACTIVATE"
End Sub

I even set the values of the cells to just be a text word to try to test this but the value never updates.

Private Sub grdResults_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles grdResults.InitializeLayout

grdResults.UseAppStyling = False
grdResults.UseOsThemes = DefaultableBoolean.False
grdResults.DisplayLayout.Override.ActiveRowAppearance.BackColor = Color.FromArgb(238, 238, 238)
grdResults.DisplayLayout.Override.ActiveRowAppearance.ForeColor = Color.Black
grdResults.DisplayLayout.Override.ActiveRowAppearance.BorderColor = Color.Black
grdResults.DisplayLayout.Override.ActiveRowAppearance.BorderAlpha = Alpha.Transparent
grdResults.DisplayLayout.Override.HeaderAppearance.BackColor = Color.White 'FromArgb(210, 226, 223)
grdResults.DisplayLayout.Override.HeaderAppearance.BackGradientStyle = GradientStyle.None
grdResults.DisplayLayout.Override.HeaderAppearance.BorderAlpha = Alpha.Opaque
grdResults.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.None
grdResults.DisplayLayout.Override.RowAppearance.BorderColor = Color.FromArgb(204, 204, 204)
grdResults.DisplayLayout.Appearance.BackColor = Color.White
grdResults.DisplayLayout.Appearance.BorderAlpha = Alpha.Transparent
grdResults.DisplayLayout.Override.RowAppearance.BackColor = Color.White
grdResults.DisplayLayout.Override.DefaultRowHeight = 55
grdResults.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
grdResults.DisplayLayout.ViewStyleBand = ViewStyleBand.Vertical
grdResults.DisplayLayout.Bands(0).ColHeadersVisible = False

grdResults.DisplayLayout.Override.CellAppearance.TextVAlign = VAlign.Middle
grdResults.DisplayLayout.Override.CellAppearance.ImageVAlign = VAlign.Middle
grdResults.DisplayLayout.Override.RowSizing = RowSizing.AutoFixed

grdResults.DisplayLayout.AutoFitStyle = AutoFitStyle.ExtendLastColumn

For Each ugc As UltraGridColumn In grdResults.DisplayLayout.Bands(0).Columns
If ugc.Key <> "DisplayMatch" And ugc.Key <> "DisplayMatchNumber" Then 'AndAlso ugc.Key <> "Yprevbal" AndAlso ugc.Key <> "PastDueBalance" 'AndAlso ugc.Key <> "TaxPropertyMasterId" Then
ugc.Hidden = True
ElseIf ugc.Key = "DisplayMatch" Then
ugc.Width = grdResults.Width - 180
'ElseIf ugc.Key = "DisplayMatchTypeIcon" Then
' ugc.Width = grdResults.Width - 40
End If
ugc.CellActivation = Activation.NoEdit
Next

End Sub

Private Sub grdResults_InitializeRow(sender As Object, e As InitializeRowEventArgs) Handles grdResults.InitializeRow
Dim strDisplay As String
Dim strNumberDisplay As String
Dim strTypeDisplay As String

strDisplay = "<p><span style=""font-size: 12pt; line-height: 1.44; color: black;"">" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(CStr(e.Row.Cells("Name").Value), VbStrConv.ProperCase)) + "</span></p>"

strDisplay = strDisplay + " " + "<span style=""font-size: 10pt; line-height: 1.44; color: #666666;"">" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(e.Row.Cells("Address1").Value, VbStrConv.ProperCase)) + "</span>"

strDisplay = strDisplay.Replace(StrConv(_searchFileter, VbStrConv.ProperCase), "<b>" + StrConv(_searchFileter, VbStrConv.ProperCase) + "</b>")

strTypeDisplay = ""
If e.Row.Cells("Status").Value = "A" Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(52), 16, 16, 3, 10)
Else
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(54), 16, 16, 3, 10)
End If

If e.Row.Cells("ResultType").Value = CentralSearchResultType.Customer Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(40), 16, 16, 3, 10)
ElseIf e.Row.Cells("ResultType").Value = CentralSearchResultType.Vendor Then
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(44), 16, 16, 3, 10)
Else
strTypeDisplay = strTypeDisplay + GetImageTag(CsiImageResources.CsiImageList.Images(48), 16, 16, 3, 10)
End If

strNumberDisplay = "<p align=""right""><span style=""font-size: 10pt; line-height: 1.44; color: #666666;"">#" + Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(StrConv(e.Row.Cells("AccountNumber").Value, VbStrConv.ProperCase)) + "</span></p>"
strNumberDisplay = strNumberDisplay.Replace(StrConv(_searchFileter, VbStrConv.ProperCase), "<b>" + StrConv(_searchFileter, VbStrConv.ProperCase) + "</b>")
strNumberDisplay = strNumberDisplay + strTypeDisplay

e.Row.Cells("DisplayMatch").Value = strDisplay

e.Row.Cells("DisplayMatchNumber").Value = strNumberDisplay
End Sub

Parents Reply Children
No Data