-
Problem while sorting the datagrid
Hi guys,
I have a data grid and i want to sort by clicking on any of the columns. I am giving the code here.
Sub dgnotes_search(ByVal sender As Object, ByVal e As
DataGridSortCommandEventArgs)
Dim sortfield As String
sortfield = e.SortExpression
WhereSort = WhereSort & " order by " & sortfield
GridNoteLoad(WhereSort)
End Sub
I did declared the wheresort as String and i am getting the error at "WhereSort" that 'too many arguments to private sub GridNoteLoad()'
can you guys help me why i am getting this error..? appreciate your help.
Thanks
-
Are you binding the grid to a dataset having a table or are you using a dataview to bind
The following should do the job
DataView dv = dataset.DefaultView
dv.Sort = e.Sortexpression
Then bind the dataview to the grid and you should achieve the result
You are including the keywork orderby in the sort expression you shouldnt add that keyword If you dont want to do the above use just the e.sortexpression as the parameter to your GridNoteLoad, The thing is i do not know what you are doing in you GridNoteLoad method
Sri
Similar Threads
-
By Bhargava in forum ASP.NET
Replies: 1
Last Post: 11-19-2005, 02:00 AM
-
Replies: 4
Last Post: 09-08-2005, 10:39 PM
-
Replies: 2
Last Post: 08-01-2002, 10:54 AM
-
Replies: 3
Last Post: 02-21-2001, 07:28 AM
-
By Heath in forum VB Classic
Replies: 1
Last Post: 01-22-2001, 01:21 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks