Depending on the data, some rows need to be bold and some not bold. Right now I'm using:
e.Row.CellAppearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;
to make a row bold. But the problem is, the rows that AREN'T bold then have a little icon of a pen in the RowHeader area, as if someone is editing them. How can I avoid this pen stuff?
If you are seeing a pencil icon on a row, then something is editing the data in that row. There is no reason why setting the Font to bold should have any effect on this.
My guess is that you have an unbound column in your grid and you are populating the values of the cells in tis column in code. What you should do in a case like this is call Update on the row after you make the changes. This commits the changes to the row so it no longer has pending changes.
This has been discussed so many times there really needs to be a grid.appearance item to disable it. I have a remove pencil class that uses a draw filter to remove (or add whatever) to the row header. To use it just declare the class dim rp=new clsremovepencil then put this line in the form load event: mygridname.DrawFilter = rp.
I actually think one of the ingragistics guys posted this a couple or more years ago. It didn't work exactly the way I needed so I commented a bit of stuff out. As is it removes the pencil all the time. I think it might have been written to remove the pencil part of the time. Good luck
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Public Function GetPhasesToFilter(ByRef drawParams As _
Implements Infragistics.Win.IUIElementDrawFilter.GetPhasesToFilter
' Drawing RowSelector Call DrawElement Before the Image is Drawn
Infragistics.Win.UltraWinGrid.RowSelectorUIElement Then
Else
End If
Infragistics.Win.DrawPhase, ByRef drawParams As _
Infragistics.Win.IUIElementDrawFilter.DrawElement
' If the image isn't drawn yet, and the UIElement is a RowSelector
drawParams.Element Is _
' Get a handle of the row that is being drawn
CType(drawParams.Element.GetContext(Type.GetType("UltraGridRow")), _
UltraGridRow)
' If the row being draw is the active row
If row.IsActiveRow Then
' Draw an arrow
drawParams.DrawArrowIndicator(ScrollButton.Right, _
drawParams.Element.Rect, _
UIElementButtonState.Indeterminate)
' Return true, to stop any other image from being drawn
Return True
' Else return false, to draw as normal or true to stop pencil
'Return False
End Class