This is a migrated thread and some comments may be shown as answers.

How do I combine values of two columns to a single TextBox

4 Answers 1544 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shilpa
Top achievements
Rank 1
Shilpa asked on 14 Sep 2011, 01:40 PM
Hi,

I am not able to open the link to see how to add the two columns in the Single Textbox in Telerik Reporting. Could you please help me to find the solution for this one ?


Thanks & Regards,
Shilpa

4 Answers, 1 is accepted

Sort by
0
IvanDT
Telerik team
answered on 19 Sep 2011, 08:10 AM
Hello Shilpa,

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.

Best wishes,
IvanDT
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Shilpa
Top achievements
Rank 1
answered on 19 Sep 2011, 12:07 PM
Hi Ivan,

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

 

0
Accepted
IvanDT
Telerik team
answered on 22 Sep 2011, 09:10 AM
Hello 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
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Shilpa
Top achievements
Rank 1
answered on 22 Sep 2011, 02:37 PM
Thanks a lot for the reply. It is working fine

Regards,
Shilpa
Tags
General Discussions
Asked by
Shilpa
Top achievements
Rank 1
Answers by
IvanDT
Telerik team
Shilpa
Top achievements
Rank 1
Share this question
or