473,511 Members | 16,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dataview problem after clear()

Hi,
In my winform, I bind the controls to a dataview DV1 that is created on a
datatable TABLE1,
The problem is the I loose the binding when I refill the datatable (CLEAR(),
dataadapter.fill(dataset1,"TABLE1")).

Any idea pllease
Dec 28 '05 #1
3 3289
Toufik,

How do you do the clear exactly?

Because I don't know a command
Datatable(Clear()

And if you do it by
mydatatable = new datatable,

Than it is clear

Cor
Hi,
In my winform, I bind the controls to a dataview DV1 that is created on a
datatable TABLE1,
The problem is the I loose the binding when I refill the datatable
(CLEAR(),
dataadapter.fill(dataset1,"TABLE1")).

Any idea pllease

Dec 29 '05 #2
exactly here is the process:
1- ONLOAD:
- create dataadapter DA1
- DA1.fill(DS1,"TABLE1")
- create dataview DV1 on table TABLE1
- bind the controls to the dataview DV1
(every thing works OK)

2- On ACTIVATE event (because I change the data in another form and I
re-load the information)
- create a new datadapter DA1 (which has the same structure but not the same
rows)
- DS1.tables("TABLE1").clear()
- DA1.fill(DS1,"TABLE1")

here I loose the binding, exactly because of the CLEAR thar I did for the
dataset.tables("TABLE1"), if I remove the clear the binding still here but I
don't have the information I need (the old information stay here)

Thanks for any help.
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:u#*************@TK2MSFTNGP14.phx.gbl...
Toufik,

How do you do the clear exactly?

Because I don't know a command
Datatable(Clear()

And if you do it by
mydatatable = new datatable,

Than it is clear

Cor
Hi,
In my winform, I bind the controls to a dataview DV1 that is created on a datatable TABLE1,
The problem is the I loose the binding when I refill the datatable
(CLEAR(),
dataadapter.fill(dataset1,"TABLE1")).

Any idea pllease


Dec 29 '05 #3
Toufik,

I am not so sure about that datatable.clear (the information on MSDN is
obviously wrong, which I have reported)

Can you try this instead

http://msdn.microsoft.com/library/de...cleartopic.asp

Cor
Dec 29 '05 #4

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

Similar topics

9
2553
by: jwedel_stolo | last post by:
Hi I'm creating a dataview "on the fly" in order to sort some data prior to writing out the information to a MS SQL table I have used two methods in order to determine the sort order of the...
6
12888
by: Alpha | last post by:
I have a listbox with datasource from a dataview. When a user selects a different item in a combobox then I need to refresh the listbox to the appropriate listing based on that combobox's selected...
8
3870
by: Dave Hagerich | last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being displayed, using the following code as a test: DataView theView = new DataView(theDataSet.Tables); theView.RowFilter =...
36
4415
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
13
2072
by: Steve | last post by:
I have a form with a dataset and a datagrid. I created a dataview on this dataset. When the user modifies the datagrid, I look up this record in the dataview to make sure it is unique. Here is...
17
2730
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
4
4638
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following. I'm trying to delete all the rows in a dataview. There are 200 rows. Everything works fine until I delete half way through and then I'm...
0
1003
by: Aziz | last post by:
1. If I create a sorted DataView object from a DataSet table, how do I reference the sorted elements? (Say I want to output the CustomerName for the first row in the sorted DataView to a label or...
3
1622
by: koredump | last post by:
Hi, I'm working on fixing a bug in a very data intensive windows application. The application has a datagrid that binds to a dataview. The dataview can hold as many as 40000 records that are...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5668
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
5066
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
4737
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
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
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 ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.