All,
I'm new to the Telerik controls (and loving them so far) - so please bear with me. I couldn't find a suitable answer by searching the forums, but I apologize if a similar question has been asked elsewhere.
I'm looking for guidance on the best way to achieve this.
I have a client who has a very strong urge for this application to work a certain way, and I know it's not typically how grids are edited/used, but if at all possible this is the situation I'm trying to code for (in Visual Studio 2008):
I have a RadGrid, defined in the aspx page, with no columns specified at design time.
At runtime, I'm loading a set of data that will have a variable number of columns. there will be 1-2 columns of read-only textual data, and then a variable number of columns of nothing but checkboxes. This is all that is contained in the grid. The user should be able to select/unselect each checkbox, and when satisifed with their data they will then hit a submit button, at which point I will store all changes in one go.
basic layout looks a little like this:
This differs from typical grid-editing usage in that client absolutely refuses to click an 'edit' command button to put the row in an edit state, followed by a save button to end the edit session. Too many clicks for what will be hundreds of checkboxes.
I started off using the examples listed here, defining a custom template to be used by the checkbox columns, however when I attempt to iterate through the MasterTableView Items collection, or through just the grid's item collection, calling FindControl with the proper name does not seem to return anything. At this point, I'm not even that concerned about tracking only what changed (although that'd be nice) - If I could just get the checked value for each box for each row in the grid I'd be happy.
One complication may be that I'm running this in a Master Pages environment - if this is a known problem, I can back out of that design and leave it as a standalone page.
If anyone has any advice, I'd be most appreciative.
I'm new to the Telerik controls (and loving them so far) - so please bear with me. I couldn't find a suitable answer by searching the forums, but I apologize if a similar question has been asked elsewhere.
I'm looking for guidance on the best way to achieve this.
I have a client who has a very strong urge for this application to work a certain way, and I know it's not typically how grids are edited/used, but if at all possible this is the situation I'm trying to code for (in Visual Studio 2008):
I have a RadGrid, defined in the aspx page, with no columns specified at design time.
At runtime, I'm loading a set of data that will have a variable number of columns. there will be 1-2 columns of read-only textual data, and then a variable number of columns of nothing but checkboxes. This is all that is contained in the grid. The user should be able to select/unselect each checkbox, and when satisifed with their data they will then hit a submit button, at which point I will store all changes in one go.
basic layout looks a little like this:
col1 col2 col3 col4 col5
ROW1 [x] [x] [ ] [ ] [ ]
ROW2 [ ] [ ] [x] [ ] [ ]
ROW3 [x] [ ] [ ] [ ] [ ]
ROW4 [ ] [ ] [ ] [x] [ ]
This differs from typical grid-editing usage in that client absolutely refuses to click an 'edit' command button to put the row in an edit state, followed by a save button to end the edit session. Too many clicks for what will be hundreds of checkboxes.
I started off using the examples listed here, defining a custom template to be used by the checkbox columns, however when I attempt to iterate through the MasterTableView Items collection, or through just the grid's item collection, calling FindControl with the proper name does not seem to return anything. At this point, I'm not even that concerned about tracking only what changed (although that'd be nice) - If I could just get the checked value for each box for each row in the grid I'd be happy.
One complication may be that I'm running this in a Master Pages environment - if this is a known problem, I can back out of that design and leave it as a standalone page.
If anyone has any advice, I'd be most appreciative.