I am looking for some code snippet which will render a gridview into <div>
instead of table.
Anyone can help me on this?
I need to draw a graph like the one I have attached and need some features like select the graph area with mouse and provide copy paste operation.
I think you should use the ListView control introduced along with DotNet framework 3.5.
The ListView is a template driven control which means that it will not render anything by default. By default, the developer must completely specify the HTML he/she wants to render in the form of templates (should specify the HTML that should be rendered within the LayoutTemplate ).
See the code project url below to get implementation details..
http://www.codeproject.com/KB/webforms/CompleteListView.aspx
Also refer the following msdn video,
http://www.asp.net/aspnet-35/videos/the-listview-control
UPDATE: Since your project is using DotNet Framework 2.0 you should use a Repeater server control to acheive this
The Repeater control has no built-in layout or styles; you must explicitly declare all HTML layout, formatting, and style tags within the control's templates.
But paging,sorting etc will be a bit difficult using Repeater. The ListView is an updated version of Repeater with the mentioned functionalities as well..
Hope this helps you..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With