473,699 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem working with objectDataSourc e/Gridview.

2 New Member
I am having a gridview accessing 'objectDataSour ce1' which inturn is connected to data addapter. The dataadapter is having a select function getmydata1(int3 2 eid,String edesc) which is having a select statement."SELE CT .....FROM mytable
where (@eid ='' or eid = @eid)
and(@edesc ='' or @edesc=edesc)"

I am able to show all the records in my form(with in the gridview) at the first time. In the same form I am having 2 text boxes which are used to enter the search criteria, if I am keeping these text boxes empty and click on search then it is showing all the records, If I am entering the description alone it is working fine but if I am trying to enter the eid then it is saying..."Objec tDataSource 'ObjectDataSour ce1' could not find a non-generic method 'getmydata1' that has parameters: eid"

I need help in this regards.... thanks in advance.
Oct 3 '06 #1
1 2275
parshuram
2 New Member
I am having a gridview accessing 'objectDataSour ce1' which inturn is connected to data addapter. The dataadapter is having a select function getmydata1(int3 2 eid,String edesc) which is having a select statement."SELE CT .....FROM mytable
where (@eid ='' or eid = @eid)
and(@edesc ='' or @edesc=edesc)"

I am able to show all the records in my form(with in the gridview) at the first time. In the same form I am having 2 text boxes which are used to enter the search criteria, if I am keeping these text boxes empty and click on search then it is showing all the records, If I am entering the description alone it is working fine but if I am trying to enter the eid then it is saying..."Objec tDataSource 'ObjectDataSour ce1' could not find a non-generic method 'getmydata1' that has parameters: eid"

I need help in this regards.... thanks in advance.

Sorry In my posting I forgot to give the SelectParameter s.....
<SelectParamete rs>
<asp:ControlPar ameter ControlID="Text Box1" Name="eid" PropertyName="T ext" DefaultValue="0 " />
<asp:ControlPar ameter ControlID="Text Box2" ConvertEmptyStr ingToNull="Fals e" DefaultValue=""
Name="edesc" PropertyName="T ext" Type="String" />
</SelectParameter s>

and when I set ' ConvertEmptyStr ingToNull="Fals e" ' to eid then it gives me an error.."Index was outside the bounds of the array."
Oct 3 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2215
by: Kjetil Klaussen | last post by:
Hi, I’m having some troubles trying to bind my dataset to a GridView control through an ObjectDataSource control. The binding works fine for regular columns in my dataset, but I can’t seem to get my expression columns to show up in my GridView. Anybody knows any neat tricks to make this work? Here’s a “step-by-step” to reproduce my worries: 1. Create a new “ASP.NET web site” project
0
1081
by: Herman verschooten | last post by:
Hi, I am creating my first real ASP.NET 2.0 site and want to use the some of the new features. I created a masterpage with my main layout and added several contentpages, no problem so far. I added a members-only section where I want to use a second masterpage, and am now having trouble. My member-startpage contains: A WebPartManager and 1 WebPartzone, with 3 gridviews each connected to a
2
3820
by: Damon | last post by:
Help! Need this fixed ASAP. I have a GridView/DetailsView master/details form set up, with both bound to separate ObjectDataSource objects. Both the GridView and the DetailsView have a DataKeyNames parameter of "UserCompany, BillableCompany". The DetailsView has control parameters for its select method pointing to these two keys on the GridView. But the select method function receives two copies of the UserCompany field! The...
0
1563
by: Frank | last post by:
Hello All, I am working with VS.NET 2005 and I have an editable GridView whose HTML markup is shown below. In short, when the user clicks on the Edit button, one of the textboxes is replaced with a DropDownList that displays account numbers in a list. If the user selects an account from the DropDownList that already exists in the list, I wish to hide the 'Update' button or column, along with displaying a warning message. I try to do...
0
1358
by: Frank | last post by:
Hello All, I am working with VS.NET 2005 and I have an editable GridView whose HTML markup is shown below. In short, when the user clicks on the Edit button, one of the textboxes is replaced with a DropDownList that displays account numbers in a list. If the user selects an account from the DropDownList that already exists in the list, I wish to hide the 'Update' button or column, along with displaying a warning message. I try to do...
0
2659
by: Steve | last post by:
I have a gridview which uses an objectdatasource for its select and delete. The delete command uses the function below. The delete itself works but the extra logic which requires parameters AccountDebitID and AccountCreditID does not work. 'Delete a transaction Sub deletetrans(ByVal transactionid As Integer, ByVal transactionamount
2
6777
by: Olivier Matrot | last post by:
Hello, I'm using a gridview with objectdatasource and custom objects collections SELECT/INSERT/UPDATE/DELETE methods are using custom objects as parameters. This is working fine. But I have a problem with the object that is passed back to the update method. It contains some of the properties of the original object sent during the SELECT method, but is missing others ! How can I ensure that all original object properties not modified are...
5
4367
by: Norbert Ruessmann | last post by:
Hello group, I have a business object, which contains Orders. Each Order has a list of OrderItems. Orders are collected in a list List<Order>, OrderItems for each order are of type v<OrderItems>. From a database view this is a one to many relation. I define two GridView controls: one for displaying/editing the Orders, another one for displaying/editing the OrderItems. I also define two datasource controls (ObjectDataSource) for each...
0
5518
by: Phillip Ian | last post by:
Tried this over in CSharp.General and didn't get anything, so I thought I'd try again here. If there's an AJAX specific group I could ask this in, please let me know...I did look. I'm trying to code what I think is a fairly typical Master/Detail scenario with two GridViews, using AJAX. Using the Northwind sample, I have two ObjectDataSources - one which pulls data from the Orders table, and one that pulls the related data from . Each...
0
1230
by: Jeff | last post by:
hi there ;) asp.net 2.0 I'm having problem with paging in GridView, I'm using custom paging. The ObjectDataSource reads in the rows needed for displaying each page as each page is selected. So that the entire resultset isn't read, but instead just enough to display the pages. The problem now is that the GridView is only displaying the 2 rows, The
0
8686
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8615
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,...
0
9173
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
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 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...
0
7748
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
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 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...
0
5872
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2009
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 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...

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.