Hi,
In a page a have combobox and a rad grid.
According to the selected value of combobox,
1-) I am making GridNumericColumn (say Col1) of my radgrid visible = false. (In NeedDataSource method -server side..-)
2-) I am making that GridNumericColumn (Col1) readonly as well. (In NeedDataSource or OnItemCommand method -again on the server side..-)
When I am inserting an item to grid, everything works fine.. (Since it is readonly and hidden, I will not be entering any data to that column.. ) So that column will be updated to database as NULL, which is fine..
But when I am editing the row I just entered, I am getting 'Object reference not set to an instance of an object.' exception..
If I remove the code which makes Col1 readonly, I am not getting this exception.. But I need that Col1 readonly, because I do not want user to enter any data to that column..
What should I do??
In a page a have combobox and a rad grid.
According to the selected value of combobox,
1-) I am making GridNumericColumn (say Col1) of my radgrid visible = false. (In NeedDataSource method -server side..-)
2-) I am making that GridNumericColumn (Col1) readonly as well. (In NeedDataSource or OnItemCommand method -again on the server side..-)
When I am inserting an item to grid, everything works fine.. (Since it is readonly and hidden, I will not be entering any data to that column.. ) So that column will be updated to database as NULL, which is fine..
But when I am editing the row I just entered, I am getting 'Object reference not set to an instance of an object.' exception..
If I remove the code which makes Col1 readonly, I am not getting this exception.. But I need that Col1 readonly, because I do not want user to enter any data to that column..
What should I do??