How to extract data from DataGridView in csharp smart device?????
-
Hello everybody, I develop a GMAO csharp smart device application using Visual studio 2008.I try to show my data stocked in my tables in my database .sdf.I use DataGridView tool.I add in the proprietes of my dataGridView the table i wanna show its data.My DataGridViewForm's code is:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace ModeDifféré
{
public partial class DataGridT : Form
{
public DataGridT()
{
InitializeComponent();
}private void DataGridT\_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'baseGmaoLocaleDataSet2.Travaux' table. You can move, or remove it, as needed. this.travauxTableAdapter.Fill(this.baseGmaoLocaleDataSet2.Travaux); } private void dataGrid1\_CurrentCellChanged(object sender, EventArgs e) { } }
}
But the problem is when running,an error occurs :The column name is not valid. [ Node name (if any) = ,Column name = Effectué/Non ]
what is the problem?
Any help will be very helpful
:)
Regards -
Hello everybody, I develop a GMAO csharp smart device application using Visual studio 2008.I try to show my data stocked in my tables in my database .sdf.I use DataGridView tool.I add in the proprietes of my dataGridView the table i wanna show its data.My DataGridViewForm's code is:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace ModeDifféré
{
public partial class DataGridT : Form
{
public DataGridT()
{
InitializeComponent();
}private void DataGridT\_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'baseGmaoLocaleDataSet2.Travaux' table. You can move, or remove it, as needed. this.travauxTableAdapter.Fill(this.baseGmaoLocaleDataSet2.Travaux); } private void dataGrid1\_CurrentCellChanged(object sender, EventArgs e) { } }
}
But the problem is when running,an error occurs :The column name is not valid. [ Node name (if any) = ,Column name = Effectué/Non ]
what is the problem?
Any help will be very helpful
:)
RegardsWe only see the partial class, so we don't see the generated code, but based on your error message, I'd revisit my column names: your column appears with two special characters : é (e accent aigu) and / (slash). Try renaming your column to something less international :-) (Start with a letter + A combination of letters, digits and _ (underscore).)