Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Search/Sort parameters
22/07/2009
09:32
Avatar
marco.laporta
Member
Members
Forum Posts: 4
Member Since:
12/06/2009
sp_UserOfflineSmall Offline

Hi Tony,

I would like to ask you if it is possible to have different 'index' for search and sort.

I have a servers side asp mvc backend with an ORM (IBatis) and strongly typed class, and I'm writed a set of classes for the jqgrid to do easily the 90% of the common job needed to display a standard grid (with search, order, ect) starting from a collection of typed object.

I have also a framework to dynamically build the sql needed for sort and search operation.

A common situation when working with data relashionship, is similar as the following

Objects:

class Category {

   int IdCategory,

  string DesCategory,
}

class Product {

   int IdProduct,

  string DesProduct,

   Category category,

}

Data:

Table Product with a relashionship with Table Category

The ORM maps object property in table columns

When I present with jqgrid a list of product, for the colum Category, I display the description 'DesCategory' , but in search toolbar i use the select options with 'DesCategory' as label and 'IdCategory' as value. So:

-) I would like to sort by DesCategory when an user click on the colum header category, because alphabetic order is 'natural'.

-) I would like to filter by IdCategory when an user select a search options item, because numeric filters performs better in the DataBase than char filter.

... but i have only the  'index' property.

Yes, I can use filterModel instead of gridModel but I need to repeate a code silmilar at 90% at the colModel.

Sorry if this feature is already present, but I don't found it.

Best Regards

Marco

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
55 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information