﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>A1VBCode Forums / Visual Basic .NET / .NET Programming (VB 2010 or earlier)  / Refreshj problem with datagridview / Latest Posts</title><generator>InstantForum.NET v4.1.1</generator><description>A1VBCode Forums</description><link>http://www.a1vbcode.com/vbforums/</link><webMaster>forums@a1vbcode.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 23:50:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Refreshj problem with datagridview</title><link>http://www.a1vbcode.com/vbforums/Topic27868-9-1.aspx</link><description>From what I read you're using a datagrid. (?)&lt;/P&gt;&lt;P&gt;Most database-bindable controls have a "databind()" method. Try using this.</description><pubDate>Tue, 07 Jul 2009 08:49:33 GMT</pubDate><dc:creator>Mobius</dc:creator></item><item><title>Refreshj problem with datagridview</title><link>http://www.a1vbcode.com/vbforums/Topic27868-9-1.aspx</link><description>Hello Everyone,&lt;/P&gt;&lt;P&gt;  I have two forms. I am enetering the values to be saved in the database in one form and another &lt;BR&gt;form is displaying those values in a DatagridvIew.Eything is working except that when I eneter the value on &lt;BR&gt;first form and hit the save botton, the values are not reflected immediatley on my second form datagridview.&lt;BR&gt; Although when I hit the save button on the first form, immediatley after that I am rebinding my datagridview again and &lt;BR&gt;I am Refreshing the datagridview and also the form itself, but nothing seems to be working.&lt;/P&gt;&lt;P&gt;Can anyone help me with that. Below is my code that has the datgridview &lt;BR&gt;Private Sub bindGrid(ByVal dv As DataView)&lt;BR&gt;        Try&lt;BR&gt;            Dim ChatsChild As New edsChild&lt;BR&gt;            Dim dt As New DataTable&lt;BR&gt;            dt = dv.ToTable()&lt;BR&gt;            grdPreviousCases.DataSource = dt&lt;BR&gt;            grdPreviousCases.Refresh()&lt;BR&gt;            Me.Refresh()&lt;/P&gt;&lt;P&gt;        Catch ex As Exception&lt;/P&gt;&lt;P&gt;        End Try&lt;/P&gt;&lt;P&gt;    End Sub&lt;/P&gt;&lt;P&gt;below is the code of the form that lets me save the data&lt;/P&gt;&lt;P&gt; If saveCase( cmbRegion.Text, txtNameLast.Text, txtNameFirst.Text, txtNameLast2.Text, txtNameFirst2.Text, txtPhone1.Text) Then&lt;BR&gt;{&lt;BR&gt;                PreviousCases.setUpdateStatus(1)&lt;BR&gt;                PreviousCases.Refresh()&lt;BR&gt;                Close()&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;PrevousCases is my second form name. PreviousCases.setUpdateStatus(1) calls the bindGrid method.&lt;/P&gt;&lt;P&gt;Can anyone help me with this. I might be missing somethig here or may be it is not possible to refresh the form at all.</description><pubDate>Thu, 02 Jul 2009 15:57:16 GMT</pubDate><dc:creator>anjali5</dc:creator></item></channel></rss>
