473,386 Members | 1,673 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,386 software developers and data experts.

problem working with objectDataSource/Gridview.

I am having a gridview accessing 'objectDataSource1' which inturn is connected to data addapter. The dataadapter is having a select function getmydata1(int32 eid,String edesc) which is having a select statement."SELECT .....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..."ObjectDataSource 'ObjectDataSource1' 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 2260
I am having a gridview accessing 'objectDataSource1' which inturn is connected to data addapter. The dataadapter is having a select function getmydata1(int32 eid,String edesc) which is having a select statement."SELECT .....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..."ObjectDataSource 'ObjectDataSource1' 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 SelectParameters.....
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="eid" PropertyName="Text" DefaultValue="0" />
<asp:ControlParameter ControlID="TextBox2" ConvertEmptyStringToNull="False" DefaultValue=""
Name="edesc" PropertyName="Text" Type="String" />
</SelectParameters>

and when I set ' ConvertEmptyStringToNull="False" ' 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
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...
0
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...
2
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...
0
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...
0
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...
0
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...
2
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...
5
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...
0
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...
0
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....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.