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

Datagrid Sorting Question - Deal With Empty Cells

Hi All. I'm using VB.net in a webform with a datagrid. I need to sort
by column name which is working fine, but i need any row with an empty
result for the sorted column to show up at the end my resultset, not
the beginning. Any ideas??

so instead of: NULL A-Z

I need: A-Z NULL

thanks.

-RH

Nov 19 '05 #1
2 1308
Hi,

Suppose in field Note there are some Null and empty
values, think about following query:

Select EmployeeID, EmployeeName, Note from Employee
order by (Case When Note is Null Then 'zzzzzzz' When Note
='' Then 'zzzzzza' Else Note End)

HTH,

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi All. I'm using VB.net in a webform with a datagrid. I need to sortby column name which is working fine, but i need any row with an emptyresult for the sorted column to show up at the end my resultset, notthe beginning. Any ideas??

so instead of: NULL A-Z

I need: A-Z NULL

thanks.

-RH

.

Nov 19 '05 #2
Hi,

Suppose in field Note there are some Null and empty
values, think about following query:

Select EmployeeID, EmployeeName, Note from Employee
order by (Case When Note is Null Then 'zzzzzzz' When Note
='' Then 'zzzzzza' Else Note End)

HTH,

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi All. I'm using VB.net in a webform with a datagrid. I need to sortby column name which is working fine, but i need any row with an emptyresult for the sorted column to show up at the end my resultset, notthe beginning. Any ideas??

so instead of: NULL A-Z

I need: A-Z NULL

thanks.

-RH

.

Nov 19 '05 #3

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

Similar topics

2
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child...
2
by: ChrisM | last post by:
Can anyone please tell me what I'm doing wrong here. I have a Windows Form with a DataGrid on it, and I'm having real problems with the Sorting. It is easy to reproduce the problem I have. If...
0
by: Danny | last post by:
I am trying to sort my second datagrid. And it works but only after i click 2 times on the column header. The first time i click on the header the data in the right order will add to the rows in...
5
by: Patrick.O.Ige | last post by:
Hi Guys, I have a datagrid wit editing and updating. But after adding Paging IT WON'T PAGE!! It compiles well but when i click on the paging link it doesn't go to the next link.. When i remove...
11
by: rkbnair | last post by:
I have created a datagrid in my aspx with the 'AllowSorting' property to true. When clicking on the column header, the page refreshes. However the sorting is not done. Am I missing anything? I...
7
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
0
by: alberto | last post by:
I create a DataTable dataTable. Then a BindingSource bindingSource = new BindingSource(dataTable, "") Then: dataGrid.DataSource = bindingSource. All works nicely, navigating the dataGrid...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.