I am currently trying to get a DataGrid's datasource to change based on which item is selected in a radio button.
Currently I have the code:
I have it set in the ItemDataBound event to make the datagrid read-only if the selected value is "O". That works, but it sill displays the data from the working dataset.
It doesn't appear to change datasources when I change the selected value. Both DataSets are derived from the same typed dataset.
I have the dataset specified through the design-time functionality and not through the runtime. Would that cause it to not be overwritable during runtime?
Is there something that I am missing that would make this work?
Thanks,
Josh
Currently I have the code:
Code:
Select Case rblETAVDataSet.SelectedItem.Value
Case "O"
dgrdETALNames.DataSource = DsOriginalData
dgrdETALNames.ShowFooter = False
Case "N"
dgrdETALNames.DataSource = DsWorkingData
dgrdETALNames.ShowFooter = True
End Select
dgrdETALNames.DataBind()
I have it set in the ItemDataBound event to make the datagrid read-only if the selected value is "O". That works, but it sill displays the data from the working dataset.
It doesn't appear to change datasources when I change the selected value. Both DataSets are derived from the same typed dataset.
I have the dataset specified through the design-time functionality and not through the runtime. Would that cause it to not be overwritable during runtime?
Is there something that I am missing that would make this work?
Thanks,
Josh