4 Answers, 1 is accepted
The following articles in our FAQ section are outdated:
- Add data adapter and connection objects;
- How do I combine values of two columns to a single TextBox.
We have corrected the information about them and will update our online help soon. Please, excuse us for the inconvenience.
About the topic you are concerned about - there are couple of approaches that you can use. First everywhere you can use Expressions with combined two fields (two columns). For example you have DataSource with two columns(FirstName and LastName). In the Textbox you can use expressions and combine these two fields. Another approach is to combine these columns at DataSource level. When you are creating the DataSource you can combine the two columns as one - see Calculated Fields article.
IvanDT
the Telerik team
Thanks for the reply. In my code I need to use expression to combine two columns. I am using the Textbox present in the Telerik Reporting Textbox.
So to assign that value to the textbox I gave in the following way :
DynamicTextBox.Value =
"[=Fields."
+ dataField[i].ToString()+"]" + '_' + "[=Fields.CompInd]"; where dataField[i].ToString() gives me different columns present . For every column i need to append the Fileds.CompInd. When i gave the statement as above it is not throwing me any error, but i am not getting the combined values in the cell, Instead it is showing as [=Fields.Rank_LW]_[=Fields.CompInd] etc for all teh columns. Could you please let me know where I am going wrong.
Regards,
Shilpa
This is the valid statement for your textBox
DynamicTextBox.Value =
"= Fields."
+dataField[i].ToString()+
" + \" \" + Fields.CompInd"
This will be the right one if you had Rank_LW field in your DataSource.
Best wishes,
IvanDT
the Telerik team
Regards,
Shilpa