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.

Using Code Collapse with semicolon-delimited statements

Thread ID:





92993 Feb 17,2010 09:39 PM Feb 23,2010 07:20 AM Windows Forms 5
Tags: EditControl
Troy Pascoe
Asked On February 17, 2010 09:39 PM

We are using Essential Edit for dealing with SQL text. Often we have multiple SQL statements delimited by a semicolon. Example:
FROM table1
WHERE col1='test';
FROM table2
ORDER BY 1, 2;

We would like to use the Code Collapse to collapse these individal SQL statements. Any idea what statements we can put into the configurator file to achieve this? The complication is that there isn't anything to indicate the BeginBlock - this is either the start of the file or the start of the line following the previous ;.

Any help you can give me on this would be appreciated.

Karikalan N [Syncfusion]
Replied On February 18, 2010 11:09 AM


I have attached the sample file that does your requirement.

Sample’s Link: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Sample-1844444444.zip

Unzip the above link and run the sample.
1) Click Load Test file – to load sql file
2) Click Dsipay config file – to display the xml source

Karikalan N

Troy Pascoe
Replied On February 20, 2010 12:52 AM

Thanks. That works well.

Actually the start of the block isn't just on the word SELECT, but can also be update, insert, delete, create, drop, with, grant etc etc (very long list). I guess I can just code for all of these.

Karikalan N [Syncfusion]
Replied On February 22, 2010 05:09 AM



Yes. You can code for all these you want to collapse.

Karikalan N

Troy Pascoe
Replied On February 22, 2010 04:19 PM

Is it possible to add the config text to my code programmatically? - I don't want to use a config file.

Thanks in advance.

Karikalan N [Syncfusion]
Replied On February 23, 2010 07:20 AM


Sure. Edit control allows you to add the config text to your code programmatically.

Refer the UG link : http://help.syncfusion.com/ug_81/WindowsFormsUI_Edit/CreatingConfigurationSettingsProgrammatically.html

In above link, there is a simple sample code that will be helpful to add Config text programmatically.

Let me know if you have any question on this.

Karikalan N


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.