2012-05-17
GridView水平滚动源码
GridView水平滚动源码源码描述:当GridView中字段很多屏幕放不下的时候,我们可以考虑给GridView加入水平滚动条来展示数据。AddJqueryreferencetothemasterpage.Createastyleasfollows.Asyouseewidthisspecifiedas200pxinitially.LaterusingtheJQuery200pxisreplacedwithwidthofdvScreenWidthdiv.Addadivtomeasurethescreenwidth.AddanotherdivaroundtheGridView.Thisdivdisplaythescrollbar.AddthefollowingJQueryscrip.ScriptwillgetthewidthofthedvScreenWidthdivandreplacethewidthofdvGridWidthdiv.PopulatetheGridviewwithdummydata.PopulatetheGridviewwithdummydata.