How to insert combobox into WinForm

  • Thread starter Thread starter Kamal Ahmed
  • Start date Start date
K

Kamal Ahmed

Hi, All

I have a datagrid binded to a datasource. I want to display a lookup field
in the same grid using combo box. I also want to display a calculated field
in datagrid i.e.
Qty x Rate (Amount). How is it possible.

TIA
 
hi Kamal
for the calculated field, in your code for the dataset, you should go to the
DataColumn.Expression property for one of the columns in your datatable. or
you can create a new column, and set the Expression to something like Qty *
Rate.
for more info on this property, see SDK docs:
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemDataDataColumnClassExpressionTopic.htm

there are several solutions to changing/replacing a standard text box to a
combo box for a column in the datagrid. some of them are quite crude, and i
have never found one that didn't cause other problems. this should get you
started:
http://www.google.ie/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=datagrid+combobox+cell

hope this helps
tim

\\ blog: http://tim.mackey.ie // 67d0ebfec70e8db3
 

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