I am coming from database programming in delphi so the learning curve is hurting my brain. I hope someone can point me in the right direction.
I have adapted the app to include a few more fields etc, and understand the connection settings etc.
The app works fine if I have a connection. What I need to do is fill up the datagrid with images, desc etc whilst not connected. I can then connect and update the tables with the new data.
I cannot work out how to 'open' the data grid without being connected.
Once the above is working I need to do the following:
Loop through the datagrid.
Check if the record exists (the field is Reg_Num) if so updated if not insert new record.
Any help appreciated
SteveW
Newbie questions adapting the Picture app for mobile
-
classicmydac
- Posts: 38
- Joined: Fri 23 Dec 2005 11:51
-
Serious
-
classicmydac
- Posts: 38
- Joined: Fri 23 Dec 2005 11:51
dataset
Visual studio 2005 C#.
I have the following code
DataTable table;
table = dataSet1.Tables["Park1"];
// Use the NewRow method to create a DataRow with
// the table's schema.
DataRow newRow = table.NewRow();
// Set values in the columns:
newRow["Column1"] = "NewCompanyID";
newRow["Column2"] = "NewCompanyName";
// Add the row to the rows collection.
table.Rows.Add(newRow);
// Save Changes
dataSet1.park1.DataSet.AcceptChanges();
I created the datasource in visual studio by
adding new item
adding dataset
created a table called Park1 with colums.
Inc (Key)
column1
column2
When I run on my device all goes as planned except I cannot edit the data in the grid and when I exit the app and re-run the table does not retain the data.
I am trying to fill the table with data so when the device has a connection to MYSql server I can transfer the data across then clear the data from the device.
Any help appreciated
SteveW
I have the following code
DataTable table;
table = dataSet1.Tables["Park1"];
// Use the NewRow method to create a DataRow with
// the table's schema.
DataRow newRow = table.NewRow();
// Set values in the columns:
newRow["Column1"] = "NewCompanyID";
newRow["Column2"] = "NewCompanyName";
// Add the row to the rows collection.
table.Rows.Add(newRow);
// Save Changes
dataSet1.park1.DataSet.AcceptChanges();
I created the datasource in visual studio by
adding new item
adding dataset
created a table called Park1 with colums.
Inc (Key)
column1
column2
When I run on my device all goes as planned except I cannot edit the data in the grid and when I exit the app and re-run the table does not retain the data.
I am trying to fill the table with data so when the device has a connection to MYSql server I can transfer the data across then clear the data from the device.
Any help appreciated
SteveW
-
Serious
DataGrid in .NET Compact Framework does not allow editing contents of its cells.I cannot edit the data in the grid
Code: Select all
// Save Changes
dataSet1.park1.DataSet.AcceptChanges();