Cheat sheets can be very handy from time to time. Although you probably wont learn much from them, I find them excellent for refreshing my memory. For example if I’ve been working on an ASP project for a while and then have to do some CSS or even worse PHP I often take a while to get my head around the changes in language and format.
After some users reported problems using my flexigrid with asp and IE I decided to redo some of the code to fix it.
Basically the problem was that when the JSON code generated it is supposed to add a comma (,) to the end of every line apart from the last one. My code put a comma at the end of every line including the last one. Firefox realises this and fixes the problem while IE just dies and wont show the content. All I did was added a quick if statement to the end of the line that checks to see if it’s the last record retrieved from the database or not and sticks the comma on the end if it has to.
I’ve also been working with flexigrid at work as part of an application I’m making which populates the flexigrid with data users have entered using online forms and PDAs. This presented the problem that people dont always enter alpha numeric characters and flexigrid doesn’t seem to like this so I added a function called cleanup that will remove all non alpha numeric characters from your data before it kills flexigrid. This is also included in the new distro. And as a side note, I have had flexigrid working with 3500 records from a Sybase database a work without any problems.
I don’t have a demo of the ASP version online at the minute due to me not having any ASP hosting any more, I’ll do my best to find somewhere to get it online. If you would like to host the demo please get in touch with me.
Hasan from hasankoroglu.com kindly offered to host the demo for the Flexigrid with ASP on his server since I don’t have an ASP server any more. You can check out the demo of the Flexigrid with ASP on Hasan’s website by clicking here.
You can download the latest version of ASP Flexigrid here.
***This version is an outdated version of my script which has some display errors with IE. Please take a look at asp with flexigrid V2.***
I came across a pretty nifty script called Flexigrid. Basically it allows you to take information from a database using JSON or XML and display it on a pretty nifty grid with search, pagination, sorting and some other cool features.
Anyway, all of the examples use PHP to generate the XML or JSON so I decided to do it in ASP using a microsoft access database.
Download link removed. Please see the updated post here.