ASP.NET Repeater control instead of grid(aspcode.net)

submitted by aspcode.netaspcode.net(1045) 4 years, 10 months ago

Simple example on how to tie event handlers to a specific row in a repeater

3 comments |category: |Views: 165

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by AnnaBay21AnnaBay21(0) 4 years, 10 months ago 0

Huh..that is really simple. Never thought of that:)

Reply

posted by eggseggs(0) 4 years, 10 months ago 0

"For example, I have developed professional ASP.NET solutions almost every day for at least 5 years and still havn't delivered a single one (well maybe one or two in the beginning) using the datagrid/gridview."

"while using a repeater instead of a datagrid also will give us the flexibility to use whatever HTML markup we want (maybe tableless using divs)"

Tables are fine when they are displaying tabular data, which incidentally is what DataGrid/GridView are for as well. People here "tables are bad" and apply that to everything. Tables for layout are bad.

Reply

posted by aspcode.netaspcode.net(1045) 4 years, 10 months ago 0

I fully agree with you eggs when you say -like "Tables for layout are bad, tables are fine for displaying tabular data". No doubt. I do it all the time. But even in those scenarios I don't use the datagrid but a repeater. I get control over table rendering as well. Example when that is good is if you want to apply some custom CSS, for example look at another article I wrote.
http://www.aspcode.net/asprepeater-and-css-table-gallery.aspx

Another reason for me not wanting to use the datagrid is not about the rendering, but rather the lack of control when everything is baked into the framework control. As I said, I don't mind coding, but hey, that's me :)

Reply

information Login or create an account to comment on this story