473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

dataview.datasource not binding or updating datagrid

Ben
Dim dv As DataView = New DataView
(DataSet11.Tables("InventoryTable"))

dv.RowFilter = "ItemAuthor LIKE '" &
ItemAuthor.Text & "%'"
dv.RowStateFilter =
DataViewRowState.ModifiedCurrent
dv.Sort = "ItemID"
Dim temp As Integer = dv.Count()
DataGrid1.DataSource = dv

DataGrid1.DataBind()
when i compile this code my dim temp integer is 2 meaning
that my select statement is getting data from the primary
table. When i go to fill this datagrid i still get 4
items which is what was contained before the dataview was
created. Any help would be great.. thank you.. Ben
Jul 19 '05 #1
1 3437
Hi Ben
That code is putting a filter on the view where the ItemAutor in the table
is Like the textbox text AND the row state is Modified Current so are you
sure you have data that meets those requirements. If you just want the rows
to be filtered like the author then comment out the rowstate filter as i
guess this is your problem or at least change it to modified rows

Mark

"Ben" <bp****@altionet.com> wrote in message
news:06****************************@phx.gbl...
Dim dv As DataView = New DataView
(DataSet11.Tables("InventoryTable"))

dv.RowFilter = "ItemAuthor LIKE '" &
ItemAuthor.Text & "%'"
dv.RowStateFilter =
DataViewRowState.ModifiedCurrent
dv.Sort = "ItemID"
Dim temp As Integer = dv.Count()
DataGrid1.DataSource = dv

DataGrid1.DataBind()
when i compile this code my dim temp integer is 2 meaning
that my select statement is getting data from the primary
table. When i go to fill this datagrid i still get 4
items which is what was contained before the dataview was
created. Any help would be great.. thank you.. Ben

Jul 19 '05 #2

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

Similar topics

2
by: Alpha | last post by:
I have a window application. On one of the form, there is a listbox and a few combox. The lstSchItem has a dataview as a datasource. The comboxes are bind to its selected value but through the...
2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
1
by: troyblakely | last post by:
I am having trouble sorting a datagrid. I have read numerous posts on this and other lists, and tried most of the suggestions, but none of them have worked for me yet. I populate a dataset from two...
13
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...
4
by: Bruce A. Julseth | last post by:
I'm new to VB.NET and just gettng into database "Learning." How do I decide if I need a DataTable or a DataView. Thanks... Bruce
17
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...
3
by: astro | last post by:
I have a datagrid that is two levels down from the dataview (i.e. grandchild). I have spent 3 hours trying to get the syntax of determining it's real datasource (i.e. not it's source based on it's...
2
by: Ben | last post by:
Dim dv As DataView = New DataView (DataSet11.Tables("InventoryTable")) dv.RowFilter = "ItemAuthor LIKE '" & ItemAuthor.Text & "%'" dv.RowStateFilter = DataViewRowState.ModifiedCurrent dv.Sort...
4
by: James | last post by:
Basically I have a DataGrid that I'm binding to the results of a stored procedure call. The recordset is fairly small. Initially I'm creating a DataSet from the results and binding it. There's a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.