set selected item in textbox

  • Thread starter Thread starter tupolev
  • Start date Start date
T

tupolev

I have successfully created a datagrid with a combobox added in a column of
the datagrid, I also have written an event that works when you select an
other item in the combobox. Know: how can I set de selected item (as a
string) in the textbox of the datagrid ?

Tupolev
 
tupolev said:
I have successfully created a datagrid with a combobox added in a column of
the datagrid, I also have written an event that works when you select an
other item in the combobox. Know: how can I set de selected item (as a
string) in the textbox of the datagrid ?

Just set the value of the selected field in the DataTable, the grid will
update when it sees that the data has changed. Use the grid's parent form's
CurrencyManager to get the current row (see Form.BindingContext(,).Current).

For future ADO.NET / WinForms questions refer to one of the following
groups:

microsoft.public.dotnet.framework.adonet
or
microsoft.public.dotnet.framework.windowsforms


HTH

~
Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top