Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to extract data from DataGridView in csharp smart device?????

How to extract data from DataGridView in csharp smart device?????

Scheduled Pinned Locked Moved C#
csharphelpquestiondatabasevisual-studio
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tunisien86
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • T Tunisien86

      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

      M Offline
      M Offline
      Michel Godfroid
      wrote on last edited by
      #2

      We 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).)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups