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
295
UltraGrid Cell Values not Changing when trying to Save Data
posted

I'm trying to save the updated values of an UltraGrid, and I have one variable for each column in the grid. Despite calling ugModules.Update(), and updating the row that is being iterated over, the variable values are not reflecting the new values in the grid, they're always holding the values of the original data.

I also have the UpdateMode to OnUpdate in InitializeLayout, but they just aren't updating.

The grid DataSource is a DataSet that I created after running a Select query, if that helps?

This is the code:

ugModules.UpdateData()

Dim mID As Integer = 0
Dim mName As String = ""
Dim numUsers As String = ""

For Each ugr As UltraGridRow In ugModules.Rows
ugr.Update() 

mID = ugr.Cells("ModuleID").Value
mName = ugr.Cells("ModuleName").Value
numUsers = ugr.Cells("NumberUsers").Value

Yet, those variables are always reflecting the old values. I've also tried without ugr.Update(), but that made no difference?