473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Datagrid clear

I have set the datasource of the datagrid to a datatable.
How do I clear the datagrid contents before refill the datagrid everytime ?
Nov 20 '05 #1
4 1826
DataTable.Clear()

OHM

Alan wrote:
I have set the datasource of the datagrid to a datatable.
How do I clear the datagrid contents before refill the datagrid
everytime ?

Nov 20 '05 #2
It did not clear the datagrid.
What other hints ?

"One Handed Man" <Bo****@Duck.net> wrote in message
news:bp**********@titan.btinternet.com...
DataTable.Clear()

OHM

Alan wrote:
I have set the datasource of the datagrid to a datatable.
How do I clear the datagrid contents before refill the datagrid
everytime ?


Nov 20 '05 #3
It did not clear the datagrid.
What other hints ?

"One Handed Man" <Bo****@Duck.net> wrote in message
news:bp**********@titan.btinternet.com...
DataTable.Clear()

OHM

Alan wrote:
I have set the datasource of the datagrid to a datatable.
How do I clear the datagrid contents before refill the datagrid
everytime ?


Nov 20 '05 #4
The problem I got is I may fill the datagrid several times with different
datatable contents so I need to clear the datagrid before I fill in
otherwise the new contents will append to the previous contents.

"Alan" <NO*************@yahoo.com.au> wrote in message
news:ej**************@tk2msftngp13.phx.gbl...
It did not clear the datagrid.
What other hints ?

"One Handed Man" <Bo****@Duck.net> wrote in message
news:bp**********@titan.btinternet.com...
DataTable.Clear()

OHM

Alan wrote:
I have set the datasource of the datagrid to a datatable.
How do I clear the datagrid contents before refill the datagrid
everytime ?



Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Weeepie | last post by:
Hello, Is it possible to clear a datagrid in VBdotNET? I'm using a query to fill the datagrid, but when I change the parameter, the next query follows the previous. Is there someone who can...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
1
by: Lee Price | last post by:
This is with regard to my previous post for resetting my DataGrid, and I was adviced to use the clear function on DataGrid items by Sachan The datagrid does not have a Clear function and I get...
3
by: tshad | last post by:
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...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
4
by: aikwee | last post by:
how, how do i clear the current content of a datagrid? I am using datagrid to do a xml editor, so every time i try to open anther file and load it to datagrid, it actually append it in to...
7
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround...
2
by: harini | last post by:
hi, i have a radio button. On clicking the radio button i have to clear the already existing tablestyle of my datagrid and bind a new table to the grid with a new tablestyle. i used, ...
6
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...
1
isladogs
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.