Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASP.NET question
ASP.NET question
#1
Rob's comment in his "home server" thread is on-target for me, too -- when I have a technical quandary, I bring it here, and I never fail to get an answer (or a dozen answers ).  And I have a quandary now.
In addition to my "real" work at my new job, I've been picking up a little ASP.NET on the side -- one of the tools I use in the course of my day is a web-based manager for the website content processes I oversee, written in-house in C# and ASP.NET, which is now my code to tweak and refine to fit my needs.  It revolves around a GridView which is dynamically bound to a datasource in the page's PageLoad event, its contents determined by a SQL query that is generated by clicking on/selecting options on the page itself before hitting a "refresh" button.
What I'd like to do is add column-sorting to this GridView.  I've already learned that if you don't bind the GridView to the data source at design time, the grid's built-in sorting functionality just doesn't happen.  My admittedly crude and primitive efforts haven't gotten me very far.  I've tried to assign handlers for onclick events to the columns as they are first accessed through the grid's RowDataBound event, but the results seem to require javascript functions in the page to handle those events instead of a C# method in the codebehind.  And it doesn't seem I can use those functions to call the C# sorting method without a rather odd and involved option that I can't seem to make work anyway.
So...  does anyone have any advice to offer?  Am I overlooking something obvious?  Is there a clever hack to get around the late binding limitation?  Should I look for a third-party grid component?
Thanks.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply


Messages In This Thread
ASP.NET question - by Bob Schroeck - 10-15-2012, 04:15 PM
[No subject] - by paladindythe - 10-16-2012, 03:08 AM
[No subject] - by Bob Schroeck - 10-16-2012, 03:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)