|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagridview...cepopulatingthe opportunity to refine the data. For some reason...the refined search is added to the end. I've tried clearing the rows first -- Me.DataGridView1.Rows.Clear() but the previous search returns and the new data added. Here are a few lines of the code... Me.DataGridView1.DataSource = Nothing Me.DataGridView1.Rows.Clear() Me.DataGridView1.Refresh() Me.DataGridView1.DataSource = SxSource GetData("Select LastName, FirstName, TestName,TestDate, Score, ID from TestScores where TestName ='" & ListBoxControl3.Text & "' ") VS 2005 What am I missing? Thanks You are clearing out the DataGridView, but you should be clearing out the
SxSource instead. Re-run your query to fill it, then perform a DataGridView1.Update Show quoteHide quote "Arne Beruldsen" <ArneBeruld***@discussions.microsoft.com> wrote in message news:06CAA76B-5D3F-4A63-B53A-E56565859DCB@microsoft.com... >I have a datagridview which loads fine on startup. However...the user has > the opportunity to refine the data. For some reason...the refined search > is > added to the end. I've tried clearing the rows first -- > > Me.DataGridView1.Rows.Clear() > > but the previous search returns and the new data added. Here are a few > lines of the code... > > Me.DataGridView1.DataSource = Nothing > Me.DataGridView1.Rows.Clear() > Me.DataGridView1.Refresh() > Me.DataGridView1.DataSource = SxSource > > GetData("Select LastName, FirstName, TestName,TestDate, Score, ID > from TestScores where TestName ='" & ListBoxControl3.Text & "' ") > > VS 2005 > > What am I missing? > > Thanks > I added the datagridview1,update...after the GetData line...and it still
simply adds to the end... I'm confused... Show quoteHide quote "Terry Olsen" wrote: > You are clearing out the DataGridView, but you should be clearing out the > SxSource instead. Re-run your query to fill it, then perform a > DataGridView1.Update > > "Arne Beruldsen" <ArneBeruld***@discussions.microsoft.com> wrote in message > news:06CAA76B-5D3F-4A63-B53A-E56565859DCB@microsoft.com... > >I have a datagridview which loads fine on startup. However...the user has > > the opportunity to refine the data. For some reason...the refined search > > is > > added to the end. I've tried clearing the rows first -- > > > > Me.DataGridView1.Rows.Clear() > > > > but the previous search returns and the new data added. Here are a few > > lines of the code... > > > > Me.DataGridView1.DataSource = Nothing > > Me.DataGridView1.Rows.Clear() > > Me.DataGridView1.Refresh() > > Me.DataGridView1.DataSource = SxSource > > > > GetData("Select LastName, FirstName, TestName,TestDate, Score, ID > > from TestScores where TestName ='" & ListBoxControl3.Text & "' ") > > > > VS 2005 > > > > What am I missing? > > > > Thanks > > > > > Arne,
Please do not multipost in 2 hours, now I gave you exact the same answer as Terry. Cor Show quoteHide quote "Arne Beruldsen" <ArneBeruld***@discussions.microsoft.com> schreef in bericht news:ABA660C0-BADD-4E2D-986F-557885271DD4@microsoft.com... >I added the datagridview1,update...after the GetData line...and it still > simply adds to the end... > > I'm confused... > > "Terry Olsen" wrote: > >> You are clearing out the DataGridView, but you should be clearing out the >> SxSource instead. Re-run your query to fill it, then perform a >> DataGridView1.Update >> >> "Arne Beruldsen" <ArneBeruld***@discussions.microsoft.com> wrote in >> message >> news:06CAA76B-5D3F-4A63-B53A-E56565859DCB@microsoft.com... >> >I have a datagridview which loads fine on startup. However...the user >> >has >> > the opportunity to refine the data. For some reason...the refined >> > search >> > is >> > added to the end. I've tried clearing the rows first -- >> > >> > Me.DataGridView1.Rows.Clear() >> > >> > but the previous search returns and the new data added. Here are a few >> > lines of the code... >> > >> > Me.DataGridView1.DataSource = Nothing >> > Me.DataGridView1.Rows.Clear() >> > Me.DataGridView1.Refresh() >> > Me.DataGridView1.DataSource = SxSource >> > >> > GetData("Select LastName, FirstName, TestName,TestDate, Score, >> > ID >> > from TestScores where TestName ='" & ListBoxControl3.Text & "' ") >> > >> > VS 2005 >> > >> > What am I missing? >> > >> > Thanks >> > >> >> >>
VB.Net advice needed
Windows History Deletion MDI Forms Using Web.config's <system.web><pages><controls><add /></controls></pages></system.web> To Register VB and CCTV System.Nullable 2.0 Framework Mailmerge date problem Running installed application asks for MSI Threading How to logon to network server via code |
|||||||||||||||||||||||