Public Sub ChangeCellStyles(ByRef RowName As UltraGridRow) Try For Each MyCell As UltraGridCell In RowName.Cells If IsNumeric(MyCell.Column.Key) Or MyCell.Column.Key = "ControlCaption" Then If (Not MyCell.Value Is DBNull.Value) Then Dim str As String str = MyCell.Value MessageBox.Show(str.ToString) RowName.Cells("ControlId").Style.GetType(Of String)()
End If End If Next Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub
i am trying to set the style of the column "ControlId" on the bases of the "ControlCaption" which contains the EXACt component name or Caption can this be done at run time,here it is RowName.Cells("ControlId").Style=??????????? how to set the value from the ControlCaption columns ,i am also referring the articlehttp://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1725any idea MIKE!!! thanks in advance
Hi,
I'm not sure I understand your question. It sounds like what you want to do is change the Style of one cell based on the value of another cell in the same row. If that's the case, then this is very easy. You would do it using the InitializeRow event of the grid. This event gives you the row, so you can examine the cells of the row, get any values you want from those cells and then set the Style on the Cells in the row.