Hi
If I had three columns in my datbase, and I would like to concatenate them on my databind, how would I do this? It is for a listbox.
For example I have the columns
Car Make
Introduced Year
Discoontinued Year
In my dropdown I would like it to say:
Fiat Punto (2003-2004)
If it helps, here's my current code:
ResultsetFields fields = new ResultsetFields(1);
fields.DefineField(CapCdeValFields.LongModelDesc, 0, "LongModelDesc");
IGroupByCollection groupByClause = new GroupByCollection();
groupByClause.Add(fields[0]);
IPredicateExpression filter = new PredicateExpression();
filter.Add(CapCdeValFields.ManufacturerName == lstMakes.SelectedValue);
ISortExpression sorter = new SortExpression();
sorter.Add(new SortClause(CapCdeValFields.LongModelDesc, SortOperator.Ascending));
TypedListDAO dao = new TypedListDAO();
dao.GetMultiAsDataTable(fields, dynamicList, 0, sorter, filter, null, false, groupByClause, null, 0, 0);
lstModel.DataSource = dynamicList;
lstModel.DataTextField = dynamicList.Columns[0].ToString();
lstModel.DataBind();
Many thanks
Drren