We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

string concatanation within formula cells

I am trying to create a formula which adds 2 strings together. For example

="string 1" + " string 2"

instead of showing "string 1 string 2" in the cell it shows "invalid expression"

is this kind of thing possible? do i need to use a formula function?

many thanks
Marcus

3 Replies

AD Administrator Syncfusion Team July 21, 2006 10:47 AM UTC

Hi Marcus,

Please try using Concatenate forumla function

[ C# ]
//= Concatenate("string 1", "string 2")
this.gridControl1.ColStyles[2].CellType = "FormulaCell";
this.gridControl1.ColStyles[2].CellValue = "= Concatenate( \"string1\", \"string2\")";

For cell reference, you can use code like,
this.gridControl1.ColStyles[2].CellValue = "= Concatenate( A1, A2)"; // concatenates string on these cells

Let us know if this helps.
Thanks,
Rajagopal


MG Marcus Greenwood July 21, 2006 12:48 PM UTC

yes, this works. thanks. However i''ve now found that in the documentation it says that you can use & to join strings. This does not appear to work. Is it a bug?


AD Administrator Syncfusion Team July 21, 2006 02:55 PM UTC

Hi Marcus,

We have seen that, when trying to use ''&'' in things like = A1 & B1 (or) = A1 & "abc" (or) ="abc" & A1, they work fine, but fails when tyring to join "abc" & "abc". Is this the issue that are you are coming across.
We are looking into this problem and will get this fixed in our next release.

Thanks for your interest in Syncfusion Products.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon