Open scrolling gridview with record closest to system date using FirstDisplayedScrollingRowIndex
Posted on 2009-04-14
I have a simple gridview with select records which include a date field. The records include dates both before and after the system date, which are actually dated items entered for an entire year at a time. I would like my scrolling gridview to open with the top record being the closest match to the current system date, even though there may not be an exact match (no record date matching system date). But when the user opens the gridview, they will be at the top of the records whose date matches the current system date. I am not an experienced programmer and have done most of the asp.net web site with Visual Studio 2008 and SQL Server. I can code a bit but would need some help. I am pretty sure what I want to do is with FirstDisplayedScrollingRowIndex, but I am not sure how.
Thanks for any help.