Hi,
I 'm using RadGrid to display data and allow users to change the data. The constraint I have is that the number of columns to be displayed varies depending on the user's search criteria. Therefore, I don't predefine the grid columns at design time, rather, I set the grid to AutoGenerateColumn="true" and the columns are generated automatically based on a datatable returned by a stored procedure.
I'm also using EditMode="InPlace" to allow users to edit any cell(s) in the grid in place (some columns are set to readyOnly to disable editing). When user clicks an UpdateAll button, the code captures the changed values from the grid cells and updates the database.
That all works very well.
Now, I would like to do the following:
1. Display one of the columns as a dropdown list, e.g. country code (so users can change the selection). I don't know how to, at run time, change an auto-generated column to a dropdown and correctly bind the dropdown to the right datasource. I presume this is all doable? Can any one point me to the right direction, or sample codes? Again, the key is: change an auto-genearted column to dropdown at run time.
Thanks in advance.
Barry
I 'm using RadGrid to display data and allow users to change the data. The constraint I have is that the number of columns to be displayed varies depending on the user's search criteria. Therefore, I don't predefine the grid columns at design time, rather, I set the grid to AutoGenerateColumn="true" and the columns are generated automatically based on a datatable returned by a stored procedure.
I'm also using EditMode="InPlace" to allow users to edit any cell(s) in the grid in place (some columns are set to readyOnly to disable editing). When user clicks an UpdateAll button, the code captures the changed values from the grid cells and updates the database.
That all works very well.
Now, I would like to do the following:
1. Display one of the columns as a dropdown list, e.g. country code (so users can change the selection). I don't know how to, at run time, change an auto-generated column to a dropdown and correctly bind the dropdown to the right datasource. I presume this is all doable? Can any one point me to the right direction, or sample codes? Again, the key is: change an auto-genearted column to dropdown at run time.
Thanks in advance.
Barry