Hello all
I am trying to pass a variable to a DataView so that I can filter the rows displayed in my datagrid.
Here's the code I am trying to get to work
Private Sub btnClientSearch _Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnClientSearch .Click
s_customerID = txtCustomerID.T ext
MsgBox("Client ID is " + s_customerID)
daTamDataFiles. SelectCommand = cmdSelectTransa ctions
daTamDataFiles. Fill(dsStatemen tData.Transacti ons)
dvTransactions. RowFilter = "CustomerID = s_customerID"
End Sub
The error that I get is that s_customerID is not a row, and it isn't, it's the variable that contains some data that I want to filter the rows on, namely the customerID which is a 7 digit alpha numeric code.
dvTransactions is the dataview whose Table property is dsStatementData .Transactions
so what I am trying to do is fill the dsStatementData .Transactions table, show it in my data grid called gridTransaction s using a filtered DataView. If I replace the text s_customerID with a customerID ex 'RUMSDO1' quotes and all. I get the rows filtered for that client ID.
Any help would be greatly appreciated.
John - supreme VB.net noob (pronounced 'newbie') 3 3875
Hi,
dvTransactions. RowFilter = "CustomerID = '" + s_customerID +"'"
Ken
----------------------
"John Wildes" <sp******@kisso ff.com> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello all
I am trying to pass a variable to a DataView so that I can filter the rows displayed in my datagrid.
Here's the code I am trying to get to work
Private Sub btnClientSearch _Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnClientSearch .Click
s_customerID = txtCustomerID.T ext
MsgBox("Client ID is " + s_customerID)
daTamDataFiles. SelectCommand = cmdSelectTransa ctions
daTamDataFiles. Fill(dsStatemen tData.Transacti ons)
dvTransactions. RowFilter = "CustomerID = s_customerID"
End Sub
The error that I get is that s_customerID is not a row, and it isn't, it's the variable that contains some data that I want to filter the rows on, namely the customerID which is a 7 digit alpha numeric code.
dvTransactions is the dataview whose Table property is dsStatementData .Transactions
so what I am trying to do is fill the dsStatementData .Transactions table, show it in my data grid called gridTransaction s using a filtered DataView. If I replace the text s_customerID with a customerID ex 'RUMSDO1' quotes and all. I get the rows filtered for that client ID.
Any help would be greatly appreciated.
John - supreme VB.net noob (pronounced 'newbie')
Ken
Thanks much, going forward, is this how I would reference variables in properties like this ?
john
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:eW******** ******@TK2MSFTN GP12.phx.gbl...
Hi,
dvTransactions. RowFilter = "CustomerID = '" + s_customerID +"'"
Ken
----------------------
"John Wildes" <sp******@kisso ff.com> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello all
I am trying to pass a variable to a DataView so that I can filter the rows displayed in my datagrid.
Here's the code I am trying to get to work
Private Sub btnClientSearch _Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnClientSearch .Click
s_customerID = txtCustomerID.T ext
MsgBox("Client ID is " + s_customerID)
daTamDataFiles. SelectCommand = cmdSelectTransa ctions
daTamDataFiles. Fill(dsStatemen tData.Transacti ons)
dvTransactions. RowFilter = "CustomerID = s_customerID"
End Sub
The error that I get is that s_customerID is not a row, and it isn't, it's the variable that contains some data that I want to filter the rows on, namely the customerID which is a 7 digit alpha numeric code.
dvTransactions is the dataview whose Table property is dsStatementData .Transactions
so what I am trying to do is fill the dsStatementData .Transactions table, show it in my data grid called gridTransaction s using a filtered DataView. If I replace the text s_customerID with a customerID ex 'RUMSDO1' quotes and all. I get the rows filtered for that client ID.
Any help would be greatly appreciated.
John - supreme VB.net noob (pronounced 'newbie')
hi,
Yes.
Ken
----------------
"John Wildes" <sp******@kisso ff.com> wrote in message news:e6******** ******@TK2MSFTN GP09.phx.gbl...
Ken
Thanks much, going forward, is this how I would reference variables in properties like this ?
john
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:eW******** ******@TK2MSFTN GP12.phx.gbl...
Hi,
dvTransactions. RowFilter = "CustomerID = '" + s_customerID +"'"
Ken
----------------------
"John Wildes" <sp******@kisso ff.com> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello all
I am trying to pass a variable to a DataView so that I can filter the rows displayed in my datagrid.
Here's the code I am trying to get to work
Private Sub btnClientSearch _Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnClientSearch .Click
s_customerID = txtCustomerID.T ext
MsgBox("Client ID is " + s_customerID)
daTamDataFiles. SelectCommand = cmdSelectTransa ctions
daTamDataFiles. Fill(dsStatemen tData.Transacti ons)
dvTransactions. RowFilter = "CustomerID = s_customerID"
End Sub
The error that I get is that s_customerID is not a row, and it isn't, it's the variable that contains some data that I want to filter the rows on, namely the customerID which is a 7 digit alpha numeric code.
dvTransactions is the dataview whose Table property is dsStatementData .Transactions
so what I am trying to do is fill the dsStatementData .Transactions table, show it in my data grid called gridTransaction s using a filtered DataView. If I replace the text s_customerID with a customerID ex 'RUMSDO1' quotes and all. I get the rows filtered for that client ID.
Any help would be greatly appreciated.
John - supreme VB.net noob (pronounced 'newbie') This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: domeceo |
last post by:
can anyone tell me why I cannot pass values in a setTimeout function
whenever I use this function it says "menu is undefined" after th
alert.
function imgOff(menu, num) {
if (document.images) {
document.images.src = eval("mt" +menu+ ".src")
}
alert("imgOff_hidemenu");
hideMenu=setTimeout('Hide(menu,num)',500);
|
by: jr |
last post by:
Sorry for this very dumb question, but I've clearly got a long way to go!
Can someone please help me pass an array into a function. Here's a starting
point.
void TheMainFunc()
{
// Body of code...
TCHAR myArray;
DoStuff(myArray);
|
by: Harolds |
last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005
the pmID is evaluated to "" instead of what the value is set to:
....
xmlItems.Document = pmXML
// Add the pmID parameter to the XSLT stylesheet
XsltArgumentList xsltArgList = new XsltArgumentList();
xsltArgList.AddParam("pmID", "", pmID);
xmlItems.TransformArgumentList = xsltArgList;
|
by: Tom Lee |
last post by:
Hi all,
I have the following problem and I cannot solve it. If
anyone can help me solve this problem.
I use the following code
<%#DataBinder.Eval(Container.DataItem, "Property")%>
to display Property from database. How do I dynamically
change the value "Property" to another one say "Name" to
display the Name from database or to any other variable
that I want.
Thanks.
|
by: Jim via DotNetMonster.com |
last post by:
Hi,
I'm assigning the value of a variable(MotivateNumber) in a Dataview object
of a dataset. I get the correct value in the dataset. When I try to run the
function to get the value I get a 0. How can I pass the variable to outside
the function. It's declared outside:
Dim MotivateNumber as Integer
Sub Page_Load(sender As Object, e As EventArgs)
| |
by: Larry Bird |
last post by:
I've successfully created a dataview that I want to passing to another
subroutine. See Example below:
Creation of dataview:
For Each CriteriaDetailRow In AlertData.AlertDS.Tables("EventCriteria").Rows
Dim foundRows() As DataRowView = Min_NumView.FindRows(New
Object() {CriteriaDetailRow.Item("Min_Num")})
For Each MinGPSHistoryDetailRow In foundRows
|
by: hcs |
last post by:
Hello,
i have a form which has a datagrid and another which displays some
information. what i would like is to be able to double click a row on the
datagrid on form B and then display the select record on form A. i am using
ado.net to an access database and using oledbdataAdapter,oldbconnection and
datasets. so what i need to do is to change the dataset on Form A to only
show the record with an ID that has been selected on Form B.
...
|
by: Andrew Bullock |
last post by:
Hi,
I have two classes, A and B,
B takes an A as an argument in its constructor:
A a1 = new A();
B b = new B(a1);
|
by: DaTurk |
last post by:
If I call this method, and pass it a byte by ref, and initialize
another byte array, set the original equal to it, and then null the
reference, why is the original byte array not null as well? I thought
passing by reference, your passing the address in memory.
public bool DoSomething(ref byte data)
{
byte retVal = null;
try
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |