On Databinding

time to read 1 min | 184 words

I spent the last couple of hours playing with asp.net databinding. The scenario was pretty simple, two tables (parent-child), with very little that was going on there. I needed simple CRUD page. It would've taken me ten minutes to do it manually.

I just couldn't get some things to work, I wasn't willing to code more than a couple of lines, so I tried every option in the designers, but just couldn't make it do what I wanted. The first problem was that I wanted to display a number that is stored as a long in the database, but should be displayed as a three digit number, can't do that in a way that would also allow easy editing.

Just to note, there are solutions to everything that I run into, I just didn't feel like implementing them, since they each would take quite a bit of code. I read Roy's Ode To Databinding just a couple of days ago, doing it manually would've saved so much time.