Results 1 to 2 of 2

Thread: How to fill a chart with a Datagridview from another form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2009
    Posts
    177

    How to fill a chart with a Datagridview from another form

    Hi,
    I am new to C#, I have a form,(Form1) that has a datagridview, and a second form (Form2) that has a
    chart control. what I am trying to do is pass a column value to my chart. I used to do this with VB.Net.
    but can't manage to do this in C#.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    106,272

    Re: How to fill a chart with a Datagridview from another form

    You need to show us the VB code, show us your attempt at the C# code and explain exactly how and where the C# code is not meeting your expectations. If I had to guess (which I do, because you haven't provided the relevant information) I'd say that you are using the default instance of a form in your VB code and those don't exist in C#. If you understand how objects work though, you don't need to use default instances in VB anyway, and then the VB and C# code are basically the same.

    I suggest that you follow the Blog link in my signature below and check out my Data Among Multiple Forms post. It is in three parts and the first part relates to VB default instances specifically, with the last two parts being relevant to both VB and C#. I suggest that you read all three parts, so that you understand exactly what default instances are and how they work and what to do to achieve the same end without them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width