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
110
Update cell in Selected rows
posted

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.2115
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic .Net (Framework 3.0. sp1)