mapping 2 datatable columns to one datagrid column

G

Guest

Is this possible? I want to concatenate two columns in my table and display
them in one datagrid column. I have a TableStyle where I create
DataGridColumnStyle's. I'd like to set the MappingName to two columns but I
dont see how this can be done.

Thanks.
 
G

Guest

Im not sure I follow you. I want to know if I can do this with TableStyles
and DataGridColumnStyles.
I use a DataAdapter to fill my DataSet then set the TableStyle as follows:
I dont see how I can set the MappingName to 2 column names.
DataGridTableStyle ts1 = new DataGridTableStyle();

ts1.MappingName= "table";

DataGridColumnStyle textColName = new DataGridTextBoxColumn();
textColName.MappingName = ???????
textColName.HeaderText = "Work";
textColName.Width = 50;
textColName.NullText = "";
ts1.GridColumnStyles.Add(textColName);
 

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

Top