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.
Unfortunately, activation email could not send to your email. Please try again.

string concatanation within formula cells

Thread ID:

Created:

Updated:

Platform:

Replies:

46823 Jul 21,2006 04:57 AM Jul 21,2006 10:55 AM Windows Forms 3
loading
Tags: GridControl
Marcus Greenwood
Asked On July 21, 2006 04:57 AM

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

Administrator [Syncfusion]
Replied On July 21, 2006 06:47 AM

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

Marcus Greenwood
Replied On July 21, 2006 08:48 AM

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?

Administrator [Syncfusion]
Replied On July 21, 2006 10:55 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;