Saturday, November 21, 2009

ASP.NET 2.0: Playing a bit with GridView "Sort Grouping"

ASP.NET 2.0: Playing a bit with GridView "Sort Grouping":

Thank the Lord!

"I am on bit experiment mood today, so I did a little tryout to see what it requires to add so called "sort grouping" into GridView. E.g when you have tabular data in GridView and you sort it based on some criteria, you'd want to better express those distinct items, based on which the grid is sorted. Here's a few screenshots of what I did, to demonstrate what I mean."

A few ASP.NET 2.0 GridView Sorting Tips and Tricks

A few ASP.NET 2.0 GridView Sorting Tips and Tricks:

From an old Scott Guthrie blog post from 2006. This seems to be exactly what I need to revamp the GridView that I'm working on! I'm also having good results with GaiaWare.

"I saw a few interesting posts today that talked about ways to implement some sorting tips and tricks with the ASP.NET 2.0 GridView:

Mike has a nice post that walksthrough how to implement custom bi-directional sorting with the GridView. Souri uses a similar approach to implement multi-column GridView sort semantics.

Teemu then has a cool post that shows how to implement 'sort grouping' where you can sub-group/band row values within the GridView:

Hope this helps,


Monday, November 09, 2009

jQuery Performance Rules

Very useful! Here are the rules, with my personal favorites highlighted in bold:
  1. Always Descend From an #id
  2. Use Tags Before Classes
  3. Cache jQuery Objects
  4. Harness the Power of Chaining
  5. Use Sub-queries
  6. Limit Direct DOM Manipulation
  7. Leverage Event Delegation (a.k.a. Bubbling)
  8. Eliminate Query Waste
  9. Defer to $(window).load
  10. Compress Your JS
  11. Learn the Library

Git Recipe for magical, mysterious end-of-line problem with Git status

Ok. I really don't understand this. Occasionally file operations will result in Git complaining that some files are different when nothing apparently has changed. This weird recipe seemed to fix the problem in a way that I do not understand.

git diff shows the every single line of the file as changed, but git diff -w (i.e. ignore all whitespace) shows the file as changed, but shows no lines as changed.

1. Type this command to temporarily turn off CRLF automagical conversions:
git config core.autocrlf false; git config core.safecrlf false

2. Refresh the view in Git gui. There will be no changes indicated anymore.
3. Type this line to temporarily turn CRLF automagical conversions back on:
git config core.autocrlf true; git config core.safecrlf true
4. Possibly repeat more than once, staging and un-staging in the mean time. Like I said, it's a mystery.

NOTE: I've only done this once. I haven't tested it multiple times. I'm just posting it here for posterity's sake in case I need to try this recipe again.