473,397 Members | 2,056 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,397 software developers and data experts.

Using the FindBy method

I am attempting to use the FindBy... method as described in Walkthrough
document for the DataGrid Web Control. It describes the process of locating
the Key in your dataset by extracting it from the GridControl. This was
succesful. I then set up the subroutine as shown in the sample:

Private Sub PreorderItems_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
PreorderItems.UpdateCommand

Dim qty As String
Dim key As String = PreorderItems.DataKeys(e.Item.ItemIndex).ToString( )
Dim tb As TextBox
tb = CType(e.Item.Cells(2).Controls(0), TextBox)

qty = tb.Text
Dim r As PreordDataSet.wPartPrice2Row
r = PreordDataSet.wPartPrice2.FindByBasket_ID(key)
..
..
..
PreOrderAdapter.Update(PreordDataSet1)
PreorderItems.EditItemIndex = -1
PreorderItems.DataBind()
End Sub

The r= line comes up telling me that:
Reference to a non-shared member requires an object reference

I have checked and it seems to me that it should be available because the
class browser sees it and when I go to the definition is shows as Public as
found in the DataSet's VB file:

Public Function FindByBasket_ID(ByVal Basket_ID As Long) As wPartPrice2Row

Return CType(Me.Rows.Find(New Object() {Basket_ID}),wPartPrice2Row)

End Function

Please advise as to what might be missing!
--
Thanks!
"One Line at a Time" - anonymous codeaholic
Greg McAllister

Nov 19 '05 #1
0 1047

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

Similar topics

4
by: Michael Sparks | last post by:
Anyway... At Europython Guido discussed with everyone the outstanding issue with decorators and there was a clear majority in favour of having them, which was good. From where I was sitting it...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
2
by: David R. Longnecker | last post by:
While attempting to migrate from my old "loop through all records" mindset with ADO 3.0 and into the ADO.NET arena, I've come across an issue using DataGrids with the OLEDB and Oracle data connection...
0
by: Henry | last post by:
Dear Group: A question regarding the behavior of the Visual Studio.NET. When I drag the "Customers" table in "Northwind" database on Server Explorer to my web page, then select the DataAdapter...
3
by: flat_ross | last post by:
For anyone who is just getting into VB.NET and/or is starting to work with inheritance I would like to point out a potential pitfall. We found this confusion recently when code-reviewing an...
7
by: Peter Row | last post by:
Hi, I've started work on my own control some parts of which use standard controls, others I need to draw on my controls surface to get the display output I require, however.... I seem to be...
3
by: Mark R. Dawson | last post by:
Hi all, I am trying to get custom attributes from a property. I can do this if I pass in the name of the property i.e. "Name" to the reflection methods, but if I pass in set_Name which is what...
6
by: semkaa | last post by:
Can you explain why using ref keyword for passing parameters works slower that passing parameters by values itself. I wrote 2 examples to test it: //using ref static void Main(string args) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
tracyyun
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...
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,...
0
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...

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.