I've recently started to upgrade a VB6 application to VB.net. The application relies heavily on UltrGrid Suite 3.02 for data entry, data viewing, and data printing. I have not been successful in getting an updatable ADO recordset. I have referenced the MS ActiveX Data Objects 2.7 Libarary. I can get the data to display correctly but I cannot edit the data fields. I have been searching for this answer for many days. Does anyone have any suggestions?
Are you using our Windows Forms grid (commonly called "WinGrid"), or are you using our UltraGrid 2.0 COM/ActiveX component from UltraSuite 3.02?
If you're using WinGrid, I don't believe that the objects provided by MS ActiveX Data Objects library implement the correct interfaces for databinding to a Windows Forms control. I suggest you take a look at the ADO.NET DataSet class as a replacement.
If you're using our UltraGrid 2.0 COM/ActiveX component, then I suggest that you instead use our WinGrid for use in a Windows Forms application.
I'm using the COM version. I had planned to convert from VB6 to VB.net then upgrade the controls at a later time. So I'm hoping that I can find a way to make the COM version of UltraGrid work in .net. Thx, RA Smith
Thanks for the clarification. I've moved this thread to our UltraSuite forum.
Our COM/ActiveX components were not designed with .NET interoperability in mind - we provided separate controls for this. For more details on this, you can refer to the following article from our online Knowledge Base:HOWTO: Are Infragistics' COM products, such as UltraSuite products, supported in Visual Studio .NET IDE?
It's likely that this is the reason you are finding it difficult to bind our UltraGrid component to data within a .NET application.
Hi,
The grid allows you to edit data by default. So if you place a grid on a form and bind it to a data source and you still can't edit any cells in the grid, then it must be the data source that does not allow editing.
What kind of data source are you binding to the grid?
Thank you Mike Saltzman for your reply. Apparently my post is now in Deleted Posts and I cannot access. In my VB6 application, I used an ADO control and then use the following code to populate the grid.
Me.adoControl.ConnectionString = DBConnectionString Me.adoControl.RecordSource = "SELECT * FROM Table " Me.adoControl.Refresh Set Me.ssugControl.DataSource = Me.adoQuotes Me.ssugQuotes.RefreshIn the Initialize code, I set a couple of columns to "hidden" and a couple to activation_noedit. This works great in VB6. In VB.Net, I've had to make the following changes in order to populate the grid but I have no edit capability.
Dim dbConnection as New ADODB.ConnectionDim rsQuotes as New ADODB.recordset
rsQuotes.CursorLocation = ADODB.CursorLocationEnum.adUseClientrsQuotes.CursorType = ADODB.CursorTypeEnum.adOpenDynamicrsQuotes.LockType = ADODB.LockTypeEnum.adLockOptimisticrsQuotes.Open(strSQL, dbConnection)Me.ssugQuotes.DataSource = rsQuotesMe.ssugQuotes.Refresh()
Any help you can provide would be greatly appreciated.