hi there i got another problem
let me explain i have a search form with some text boxes and a datagrid. ok if i type some string into one textbox and then press F2 it searches in the databes for the string and then commit the result back and i load the results into the datagrid so far so good
if i click on a grid row it first clears the databindings from all textboxes and then binds the textboxes again to the data (most of em are text databindings) then i can click around the grid and get the actual data to the textboxes BUT if i bind the Tag property of a textbox to some data like an ID and then click around i get an error like this
An unhandled exception of type System.NullReferenceException occurred in system.windows.forms.dll
and then the program halts at the class definition of the main form (Public class form2)
how can i fix this?
i also noticed that if i bind data to the text property of a textbox and if i type this textbox1.databindings.add("text",datasource,"ID") then this error occurs too if i change text to Text the error wont occur
let me explain i have a search form with some text boxes and a datagrid. ok if i type some string into one textbox and then press F2 it searches in the databes for the string and then commit the result back and i load the results into the datagrid so far so good
if i click on a grid row it first clears the databindings from all textboxes and then binds the textboxes again to the data (most of em are text databindings) then i can click around the grid and get the actual data to the textboxes BUT if i bind the Tag property of a textbox to some data like an ID and then click around i get an error like this
An unhandled exception of type System.NullReferenceException occurred in system.windows.forms.dll
and then the program halts at the class definition of the main form (Public class form2)
how can i fix this?
i also noticed that if i bind data to the text property of a textbox and if i type this textbox1.databindings.add("text",datasource,"ID") then this error occurs too if i change text to Text the error wont occur