How do I clear a DataGrid?
I have 2 datagrid (DataGrid1 and DataGrid2). They are the same, except for
a couple of extra fields that DataGrid has for detail.
I only display one DataGrid at a time. The problem is that even when one is
not showing, it is still sending the data it was filled with before. When I
switch to one DataGrid and DataBind to it, I want to clear the other
DataGrid.
Thanks,
Tom 3 2101
To clear the datagrid, you can set the Datasource = null and re-bind.
In my apps, I use <div>'s with a grid on it, then use some javascript to
hide the relevent <div>
Dave
"tshad" wrote: How do I clear a DataGrid?
I have 2 datagrid (DataGrid1 and DataGrid2). They are the same, except for a couple of extra fields that DataGrid has for detail.
I only display one DataGrid at a time. The problem is that even when one is not showing, it is still sending the data it was filled with before. When I switch to one DataGrid and DataBind to it, I want to clear the other DataGrid.
Thanks,
Tom
To clear the datagrid, you can set the Datasource = null and re-bind.
In my apps, I use <div>'s with a grid on it, then use some javascript to
hide the relevent <div>
Dave
"tshad" wrote: How do I clear a DataGrid?
I have 2 datagrid (DataGrid1 and DataGrid2). They are the same, except for a couple of extra fields that DataGrid has for detail.
I only display one DataGrid at a time. The problem is that even when one is not showing, it is still sending the data it was filled with before. When I switch to one DataGrid and DataBind to it, I want to clear the other DataGrid.
Thanks,
Tom
"Dave Britton" <Dave Br*****@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com... To clear the datagrid, you can set the Datasource = null and re-bind.
I'll try that. In my apps, I use <div>'s with a grid on it, then use some javascript to hide the relevent <div>
I use <div> also to hide and unhide my grids. But I believe that the data
is still transered with the page on each repost. I was trying to dump the
data so it wouldn't be sent back and forth when not being used.
Thanks,
Tom Dave
"tshad" wrote:
How do I clear a DataGrid?
I have 2 datagrid (DataGrid1 and DataGrid2). They are the same, except for a couple of extra fields that DataGrid has for detail.
I only display one DataGrid at a time. The problem is that even when one is not showing, it is still sending the data it was filled with before. When I switch to one DataGrid and DataBind to it, I want to clear the other DataGrid.
Thanks,
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gary |
last post by:
I have a problem with the datagrid not clearing when the datasource changes,
a few fields remain on the screen and even when new data would fill those
grid squares the old data remains.
I wind...
|
by: Dan |
last post by:
I have a C# form with an OleDBconnection, adaptor and
dataset along with a several text boxes linked to the
Dataset and 2 buttons. I am assigning the dataset to a
DataGrid.
My problem:
I enter...
|
by: Brad |
last post by:
I'm working with a DataGrid in C#, and the user needs to be able add
and remove columns from the DataGrid on the fly, without opening and
closing the form. The scenario is this. I have a setup...
|
by: Alvin Bruney |
last post by:
I have a server side datagrid control. I'd like to clear the grid before the
post occurs using javascript. Anybody know how to do this? It would be a
similar effect to binding to a null dataset in...
|
by: Asha |
last post by:
greetings, how can iclear a datagrid content?
|
by: Ed Bick |
last post by:
I am binding a datagrid to SQL Adapter.
I am wanting to clear it out and populate with a different data set based on
user action. I can not seem to find the equivalent to a VB6 Clear method.
...
|
by: dbuchanan |
last post by:
Help me understand the behavior of this code.
If I run code 1 (below) the datagrid stays populated.
=== incidental code ===
Private dataSet1 As CLIP.dsTables
private Sub FillDataSet()...
|
by: amber |
last post by:
Hello,
What is the best method of clearing a datagrid?
I'm having issues with it not 'resetting' when I want to repopulate it.
I usually design my datagrids using the .net toolbar/properties, but...
|
by: DaveP |
last post by:
I've got to be missing something very simple here, but I'm stumped. I have a
DataGrid control on a form. The form allows search of a database and display
of resulting rows in the DataGrid.
My...
|
by: Neelakandan v n |
last post by:
Hi,
I am unable to clear column headings in datagrid in a program using vb.net 2002, framework 1.0, after clearing a set of data displayed subsequent to a query. The database is in MySql 5.0. Could...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |