asp.net - here is how it worked for me

asp.net - here is how it worked for me

YehudaYehuda Posts: 2Questions: 0Answers: 0
edited April 2011 in General
Hi,
Here is how I use DataTables with vb.net in case other need it:
The issue I had was that the thead of the gridview was missing.
Here (By Brent V) http://justgeeks.blogspot.com/2008/09/add-tbody-and-thead-to-gridview.html I found how to fix it.
in short you have to add the following to the grid code:
(Note that the code has some troubles but it is not mandatory for the DT to work so I did not aply )

[code]
//This replaces with and adds the scope attribute
GridView1.UseAccessibleHeader = true;

//This will add the and elements
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;

//This adds the element.
//Remove if you don't have a footer row
GridView1.FooterRow.TableSection = TableRowSection.TableFooter;
[/code]

This is a great tool Allan :)

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Hi Yehuda,

    Brilliant! Thanks for highlighting this. I am certain that I'll be linking to this post in future :-)

    Regards,
    Allan
  • YehudaYehuda Posts: 2Questions: 0Answers: 0
    I am glad it helps, Allan :)
This discussion has been closed.