Data Binding In Whidbey
Have you gotten your copy of VS 2k5 (I keep trying to extend that whole Y2k abbreviation)? I have had mine for a few weeks, but have only really started to play with it.
When I read articles, I tend to fixate on the things that will, honestly, make my life easier. With VS 2k2, I had to join a twelve step program to get over my dislike of the D word: databound. But, where would we be without the data binding features of the intrepid DataGrid (as for that matter, think of what Dino Esposito would have written about with out it...thanks for your articles Dino, your early articles guided me quiet quite a bit)?
And so, you know the routine: add grid, set data source, call databind. Rinse, lather, repeat. You want paging with that? Or how about sorting? Comon, you know which events you need to code up! Have you ever said “Why do I have to call databind on Web forms? I don't on Win Forms!”?
VS2k5 introduces some new components for data binding, called Data Source Items. With a DSI, you configure your data source and then add a control, say the new Grid View Control. Set up your GV so that it uses the DSI and Run your app. As if by Magic, you got data in your Grid View with no call to a databind method! You can also configure your GV control for pagination, and you do not need to add any code to set the current page. Want Sorting, again, its a property of the GV control, with Zero Code.
Fun Fun.
C