Underwater bridges and buildings upside down!
We just dont see them do we? Underwater bridges and buildings made upside down? Ironically however, i bet every developer writes code every day in his life which is synonymous to underwater bridges and upside down buildings. Reason? Requirements!(Which makes coding so VERY different and exciting to me, over other older deciplines and professions).
This is the Nth(50th??) wacky thing i've ended up doing with a DataGrid that was probably designed by Microsoft with the sole purpose of 'showing' data from a datasource! Well, i thought that after adding icons that do things to datagrid columns , adding calculated columns, adding calculated checkboxes, paging with n number of different styles, adding links buttons and sorting i had done all that can be done with a asp.net data grid.
turns out, i am WRONG - we now need RADIO BUTTONS in a datagrid column and user can selected just one of them throughout the data column and then hit a button (which is in no way connected with the datagrid) to select the record and pass it's value to another form! Phew!
If you are one of those like me you're probably saying "hmmm... what the big deal... have a column template and add a radio button!" - well, .NET renames each control in column template when the html is returned and so you end up with 1 radio button per record where all of them can be selected at the same time!
Here's is a good approach that did the trick. It's more the concept that is described in the article that makes you go "wow! didn't think of that!" - noone should need the sample code there - the idea in the article is by itself good enough to get you going and write your own code!
This is the Nth(50th??) wacky thing i've ended up doing with a DataGrid that was probably designed by Microsoft with the sole purpose of 'showing' data from a datasource! Well, i thought that after adding icons that do things to datagrid columns , adding calculated columns, adding calculated checkboxes, paging with n number of different styles, adding links buttons and sorting i had done all that can be done with a asp.net data grid.
turns out, i am WRONG - we now need RADIO BUTTONS in a datagrid column and user can selected just one of them throughout the data column and then hit a button (which is in no way connected with the datagrid) to select the record and pass it's value to another form! Phew!
If you are one of those like me you're probably saying "hmmm... what the big deal... have a column template and add a radio button!" - well, .NET renames each control in column template when the html is returned and so you end up with 1 radio button per record where all of them can be selected at the same time!
Here's is a good approach that did the trick. It's more the concept that is described in the article that makes you go "wow! didn't think of that!" - noone should need the sample code there - the idea in the article is by itself good enough to get you going and write your own code!
0 Comments:
Post a Comment
<< Home