Results 1 to 5 of 5

Thread: help needed in c# winforms

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    help needed in c# winforms

    hi, i am working in c# winforms(2005).i have two forms in my first form i have datagridview

    and i have loaded the records in formload from sqlserver2005. and if i double click any row

    header in my datagridview those records are displayed in second forms textboxes. so in my

    second form i am updating the record.my question is after updating the record if i close

    the second form the first form datagridview should be refreshed automatically for the

    second form's record updation.so please help me to do this please.
    Loving dotnet

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: help needed in c# winforms

    I've posted an example of doing just that in the VB.NET CodeBank forum. You can easily port the principle and the code to C#.

    http://www.vbforums.com/showthread.php?t=469518
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: help needed in c# winforms

    hi jmcilhinney thanks a lot for help, i need one more help, ie i have two projects.in my first project i have created one class alibrary and i included one form in that project.so i build that for and i got dll.then i refferef that dll in my second project .my second project contains one winform.that form contains one datagridview and i bound database values in datagridview in formload event.i have one button .so if i select any row from datagridview and if i click the button first project's form will open and all the values are filled in the textboxes of the first form.so i will do upadte of delete from the first project form.then if i close the first project's form datagridview in the second project form have to get refresh automatically whrn the first projects form closed,is it possible to do this please help me.i openend the first project form using the dll which refrenced in second project.
    Loving dotnet

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: help needed in c# winforms

    Did you bother to implement the steps I provided in that thread? Did you bother to run the project I attached to the first post in that thread? I'm guessing not, because if you had you would know that what you're asking for already happens automatically. You have the solution provided already and you appear to be trying your best to ignore it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: help needed in c# winforms

    hi jmcilhinney thank you nice help, thanks a lot
    Loving dotnet

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