I have a simple SQL table with about 10 fields driving an ajaxed radgrid via a SqlDataSource as follows:
I want only 1 of the 10 fields (Phone_No) to be editable on the editform, so I set the other 9 fields to readonly. When I change the phone number on the editform and click update, the change is not made on the database nor on the radgrid. If I remove readonly from the 9 fields and then change the phone number on the editform and click update, the change occurs on the database and the radgrid.
Why would that be, and what is the solution?
Thanks
<
asp:SqlDataSource
ID
=
"SqlDataSource_gvSalesRep"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"
SelectCommand="Select * From SalesRep"
UpdateCommand="Update SalesRep Set [Phone_No] = @Phone_No Where [Slspsn_No] = @Slspsn_No">
<
UpdateParameters
>
<
asp:Parameter
Name
=
"Phone_No"
/>
<
asp:Parameter
Name
=
"Slspsn_No"
/>
</
UpdateParameters
>
</
asp:SqlDataSource
>
I want only 1 of the 10 fields (Phone_No) to be editable on the editform, so I set the other 9 fields to readonly. When I change the phone number on the editform and click update, the change is not made on the database nor on the radgrid. If I remove readonly from the 9 fields and then change the phone number on the editform and click update, the change occurs on the database and the radgrid.
Why would that be, and what is the solution?
Thanks