alberti47
2017-08-07T08:11:03Z
Hi.
I'm new on iGrid.Net that I'm evaluating as substitute for Component One C1TruedbGrid.
I'm using Grid to update a data table, and I was use to do the following:

oConn = New OleDb.OleDbConnection(strCONNESSIONE)
oConn.Open()
Criteri = "SELECT * FROM SIF_SIF"
oDataAdapter = New OleDb.OleDbDataAdapter(Criteri, oConn)
oDT = New DataTable
oDataAdapter.Fill(oDT)
oDataCmdBuilder = New OleDb.OleDbCommandBuilder(oDataAdapter)

IGrid1.FillWithData(oDT)

No problem for filling the grid with data's from DataTable.
Now Im doing changes to cells , add new row, etc etc.
At the end I was using the following sequence:

oDataAdapter.Update(oDT)
oDataAdapter.Dispose()
oDataCmdBuilder.Dispose()
oDT.Dispose()

in order to update the Data Table with current grid data's.
Question is : how to do the same using iGrid or what is Yr suggested solution
as minimum coding effort ?
Thanks.
Igor/10Tec
2017-08-08T07:32:52Z
First of all iGrid is a versatile tool to build unbound tabular interfaces, and it does not implement built-in data binding because of that. You should think about iGrid as a powerful editable replacement for the Windows native ListView control in this context.

The FillWithData method is a helper to upload data from typical ADO.NET data sources into iGrid, but it's a one-way road. The data are only copied to iGrid, and any changes in the grid are not reflected in the data source you used to populate the grid.

However, all this does not mean we cannot implement data binding in iGrid. We can do that using the rich member set of this control. If you install the iGrid demo, you can find the 'Bind to DataTable' sample in the 'Ideas for Your Apps' sample group in the main demo that demonstrates one of the possible ways how you can implement data binding in iGrid. This sample can be used a basis to implement any data update strategy in your app, which can be more useful than having a hard-coded data-binding approach you can't change.

Examine the source code of the sample and feel free to contact us if you have any troubles with implementing data binding with iGrid.
alberti47
2017-08-08T08:41:04Z
Thanks for Yr answer.
Il try to implement the behavior in the following way, ie updating the datatable during grid
cell commit.
I've to work more for delete and insert rows.

regards