473,657 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems with ObjectDataSourc e and filtering

Hi,

I am trying the new ObjectDataSourc e from ASP.NET 2.0. I connected a
Gridview with ObjectDataSourc e which is connected to a webservice which
returns a DataSet. In the Webmethod I return only the rows for the
current page because paging is enabled, I use the parameters
maximumRows and startRowIndex for doing this. I also got sorting to
work using the parameter sortExpression.

The method of the webservice looks like this:

[WebMethod(Descr iption = "")]
public DataSet GetDataSet(int maximumRows, int startRowIndex, string
sortExpression)
{
....

return dsPagedPortCode s;
}

[WebMethod(Descr iption = "")]
public int GetNumberOfRows ()
{
....

return ds.Tables[0].Rows.Count;
}

The description of the ObjectDataSourc e looks like this:

<asp:ObjectData Source
ID="ods" runat="server" MaximumRowsPara meterName="maxi mumRows"
StartRowIndexPa rameterName="st artRowIndex"
SortParameterNa me="sortExpress ion"
EnablePaging="T rue" SelectMethod="G etDataSet"
SelectCountMeth od="GetNumberOf Rows"
TypeName="WSSer vice.wsWebservi ce"
</asp:ObjectDataS ource>

Paging and sorting works but now I want to be able to get filtering
works, the returned DataSet contains one table with 4 columns and I
want to be able to filter on each column.

What do I have to change to the webmethod and the ObjectDataSourc e to
get filtering to work?

Thanks a lot,
kind regards,
Bert Janssens

Dec 1 '05 #1
0 1586

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

Similar topics

3
2643
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a detail of a product. On my page I have a product name and a short description. So I declare an ObjectDataSource in my page <asp:ObjectDataSource ID="productData" runat="server" SelectMethod="GetProduct"
2
6260
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" SelectMethod="GetUsers" TypeName="BizObject"></asp:ObjectDataSource> This works, however I need to explicitly clear/remove the cache when I
0
1884
by: Northern | last post by:
Hello, I have some trouble to declare and instantiate dynamically an ObjectDataSource in the codebehind file. The idea is to bind the objectdatasource to a gridview and have automate sorting and paging. The objectdatasource SelectMethod returns a dataview. When my objectdatasource is declared in the codebehind, sorting is not working and i receive following error when clicking on a datagrid's column header. I made the same test...
0
1326
by: aeden.jameson | last post by:
Suppose I have a GridView displaying product information that is bound to an ObjectDataSource. I would like to filter the data according to criteria entered by the user. Now I have attempted to set ObjectDataSource.FilterExpression and ObjectDataSource.FilterParameters in the Filtering and Selecting events, but I get the wrong data. I don't know why. It seems that only place I can set the filter and get the right data is in...
0
1157
by: Richard Carpenter | last post by:
I am working on a small project in which I am trying to implement a data access layer through the use of a project dataset schema. Data integrity and normalization will be handled through the use of SQL Server stored procedures. Basically, for each data entity, I've written _Get(), _Delete(), _Add() and _Update() stored procedures. The _Get() procs return all data needed to display the information in a meaningful manner to the user...
0
1469
by: Kevin | last post by:
Hi my name is Kevin I am currently working on a Asp 2.0 project and im having some ObjectDataSource Problems The thing is i have a Class called User and a Bussiness Logic Layer FcUser with the functions GetAllUsers, GetUserByID(int) and a InsertUser(BoUser as User), the both return a generic list of User objects, the insert method sends a User object from my UI provided by the ObjectDatasource
5
2644
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are simply working with objects in memory. So, it appears as though Microsoft requires that our datamapper classes reside inside a folder called "App_Code", and NO WHERE ELSE. So, has anyone successfully been able to place their datamappers in a...
0
2400
by: drawing in aspnet | last post by:
Question about putting the data layer in a separate class library. I keep reading that the data layer should be separated from the presentation layer and put in its own class library. I am trying to do this but running into a problem. I'm hoping someone can point me in the right direction. I first create a class library (all code in C#) and within this class library create a very simple Sql Server Express database (.mdb) file. It's...
0
1238
by: Kursat | last post by:
Hi, I have a data access library which contains some wrapper methods for my Stored Procedures. I bind data access methods to data controls by using ObjectDataSource objects. The problem is some of the data access methods make filtering based on authenticated user's username. Those methods all contain a username parameter. I want to supply username parameter of those methods automatically from a source but I do not know that source. ...
0
8837
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
8739
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...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8612
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 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...
0
7347
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, and deployment—without 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
6175
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
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.