textbox in datagrid..making the textbox readonly dynamically
-
hi all, i have a textbox in datagrid.... i want to make this textbox readonly =true; for that i wrote the coding like this in the item databound event TextBox txtAP=(TextBox)datagrid.FindControl("txtH1a"); txtAP.Readonly=True; but i am getting the error that Object reference not set to an instance of an object. Ram
-
hi all, i have a textbox in datagrid.... i want to make this textbox readonly =true; for that i wrote the coding like this in the item databound event TextBox txtAP=(TextBox)datagrid.FindControl("txtH1a"); txtAP.Readonly=True; but i am getting the error that Object reference not set to an instance of an object. Ram
And which object is it that is causing the problem? Have you tried debugging?
only two letters away from being an asset