473,581 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom sorting

Hi,
I've a requirement in which I want to use the custom sorting..
I mean I've a dropdown with sortable column names and when the user selects
the
particular column from dropdown , I need to sort the grid.

For it,Im trying to get the gridView.DataSo urce() to retrieve the datatable
attached to it (Ive earlier binded the gridview in page load in not postback
section ) , but gridView.DataSo urce() always returning null..
Im unable to resolve this..

When we enable the default sorting,in the the gridview_sortin g,
gridView.DataSo urce hold the data...
But when I use it outward in any other control's event..
why its not showing the gridView.DataSo urce...

How does the default sorting work internally in the gridview...
Can anyone let me know how GridView's sorting happens...I would like to use
the same approach..for my custom sorting...to avoid re binding the data..

Sep 30 '08 #1
0 1213

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

Similar topics

5
560
by: Marri Suliez | last post by:
Has anyone found some documentation on how to properly subclass a ListBox control and provide custom sorting (when the list items come from a DataSource)? The only way I can figure out how to do this is by sorting an array of some sort and then setting the DataSource. I don't like this because it fires the DataSourceChanged event. What...
0
1634
by: Chris Mayers | last post by:
I have a Windows Forms DataGrid that has a DataView as a datasource. My problem is that I want the datagrid to exhibit some special sorting properties when the header rows are clicked on. From reading round the newsgroups, it seems that a custom 'IComparer' is the answer, but I'm not quite sure how to do this. Really, how to get at the...
1
1484
by: melanieab | last post by:
Hi, I found an article that explains how to do the custom sorting. Here is what it says: .... Perhaps you want some custom sorting method to take effect. To do that, DataGrid provides you with an action to overload called "SortCommand." In the properties events for your DataGrid, select the "SortCommand" action and implement it with the...
3
2158
by: Brian Henry | last post by:
How would you go about doing this I have a tree view which where anything is a parent it is a folder (folder icon, and the tag for the object is a string that says "FOLDER:{name of folder here}") then each folder has items in it and possibly more folders. The root node also has items on it that are not folders... but default sorting sorts...
0
1551
by: Roy | last post by:
Hey all, I must be losing my touch. I have made many pages in the 1.1 framework that utilize custom bidirectional paging in datagrids. We've converted over to 2.0 and I've been trying to use the built-in functionality of gridviews and objectdatasource's to accomplish the same thing (w/o resorting to the 1.1 methodology). I discovered two...
4
3092
by: Ambica Jain | last post by:
Hi, I want custom sorting on some of the columns in the datagrid. And i am able to do the same by overriding MouseDown event. However, i need to rebind my datatable to reflect the changes in grid. And with rebinding, sorting image (little triangle on the column header) goes away. I need to show sorting image as well custom sorting. Please...
0
1161
by: Kiran_Juikar | last post by:
I want custom sorting on some of the columns in the datagrid. And i am able to do the same by overriding MouseDown event. Sorting image (little triangle on the column header) goes away as I am not calling base mousedown event. I need to show sorting image (using Datagrid not DatagridView). Please help.
1
11706
by: WebMatrix | last post by:
Hi, I started a new web application which so far has several grdiviews displaying data. I find myself reimplementing the same logic (copy/pasting really) in grid's event ItemDataBound and RowCreated and Sorting events to add certain effects. For example inserting sorting direction image to the column header. I want to create one custom...
2
3336
by: Aamir Ghanchi | last post by:
hi, I have a gridview which is bound to ObjectDataSource which in turn reads from a business objects methods for custom paged data. When PageIndex is set to any value other than 0 and one of the column headers is clicked for sorting, the pageindex gets reset to 0. I tried to debug it . the PageIndex property of gridview stays the same in...
0
7876
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8156
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. ...
0
8310
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...
1
7910
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...
0
8180
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...
0
5366
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...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2307
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
0
1144
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...

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.