datagridview refresh @ runtime c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvenkatesan
    New Member
    • May 2007
    • 39

    datagridview refresh @ runtime c#

    Hi guys
    I am win appl.
    I was bind the datagridview from datatable.
    i was changed datas @ runtime. datatable changed but my datagridview not refresh.
    I written dagaridview.ref resh(); not work
    how to refresh?

    Thanks in advance
    Venky
  • Inbaraj
    New Member
    • Apr 2007
    • 76

    #2
    hi...

    U have to keep a button in the form in that button write the codeing to load the data to the datadrid (or) every update or add or delete write the coding to load the data....

    reg
    inbaraj

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Are you using a dataset? How are filling the DGV?

      Comment

      • mvenkatesan
        New Member
        • May 2007
        • 39

        #4
        Hi
        Thank u very much for ur input
        Mr.Keno, Initially I get data from memory stream to datatable then dtb to bind DGV
        but my problem is updated datatable, no changes in my form DGV
        how to refresh
        Give suggest me
        Once again thanks a lot for ur immediate response guys

        regards,
        Venky

        Comment

        • kenobewan
          Recognized Expert Specialist
          • Dec 2006
          • 4871

          #5
          So if the datatable is the source you need to update that, simply refreshing the DGV will not work. HTH.

          Comment

          • kannan raja

            #6
            call the form load with 2 arguments ,it ll work

            Comment

            • Tamilan

              #7
              Grid

              By Using Fillby Method In Table Adapter we can refesh Those Thigs

              Syntax

              <TableAdapterNa me>.Fill(<Datas etName>.<TableN ame>)
              Gridview.refres h();

              Comment

              • khurramzeb
                New Member
                • Oct 2010
                • 8

                #8
                Hi

                After updating GridView just put these two lines

                datagridview.Da taSource=datata blename;
                datagridview.Da taBind();

                hope this will work

                Comment

                Working...