HI,
I am new at using Infragistics and VB .Net. I have an Ultragrid control on my form that displays data from a database. I have a Context Menu that allows the users to update a cell in the selected rows. After the code is executed the edit 'pencil' icon is shown and remains there until I click off, then clicks back on the same row. The idea is when the users select the rows and access the context menu the dataset will filter the rows. There is a primary key value in the data row to use instead of the index, but am not sure how to code. Is it possible to change the cell value using selected rows? Hope this is clear enough to understatnd.
Below is code I use to change the cell.
For i = 0 To .Selected.Rows.Count - 1
.Selected.Rows(i).Cells("Exception").Value = "True"
Next
.UpdateData()
‘ Binding of Dataset with filters
Private Sub SetGridView(ByVal DataView As String)
Dim _RowFilter As String
Select Case DataView
Case "All"
_RowFilter = "Exception = 'False' and HoldInd = 'False'"
Case "Exceptions"
_RowFilter = "Exception = 'True'"
Case "Holds"
_RowFilter = "HoldInd = 'True'"
Case Else
_RowFilter = "Source = '" & DataView & "' and (Exception = 'False' and HoldInd = 'False')"
End Select
Dim dv As New System.Data.DataView(ACHManagerDataSet.ACH, _RowFilter, "achID", DataViewRowState.CurrentRows)
me.UltraGrid1.DataSource = dv
_ViewType = DataView
End Sub
Thanks you, any sample code would be greatly appreciated.
_____________________________________________
Product: UltraWinGrid ver 8.3.20083.2115Platform: Windows XP (32bit) - SP 2 Language: Visual Basic .Net (Framework 3.0. sp1)
Are you saying you want to set the value of the Exception cell for all selected rows in one statement?
Yes, I would like to know if it is possible to set the value for all the selected rows in one statement.
rmcneil said:Yes, I would like to know if it is possible to set the value for all the selected rows in one statement.
No, there's no single method to do this. What's wrong with the code you have here?