Wednesday, August 30, 2006

More ASP.NET datagrids

As I've stated elsewhere I am writing a web based application that is making use of datagrids (ASP.NET 1.1). As part of that I wanted to make some data editable and for the options to be limited to a drop down. I had great trouble getting this working and still am not sure why.

Essentially what I did in the end was to create an item template for the rows that need editing and add drop downs (and whatever else I needed).

My problem was referring to the drop downs and populating them. In the end I stumbled across this site which makes it look very simple, which of course it is.

I think part of the confusion is that there are so many ways you can do the same thing. In my case I prefer to create all the connections etc. in code.

While I was looking for the information I needed I came across a number of interesting suggestions on how to improve the datagrid by allowing click anywhere to select, scrolling them and making the whole grid editable. Personally I think these are great if you have the time to implement them.

No comments: