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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using Code Collapse with semicolon-delimited statements

Thread ID:





92993 Feb 18,2010 02:39 AM UTC Feb 23,2010 12:20 PM UTC WinForms 5
Tags: EditControl
Troy Pascoe
Asked On February 18, 2010 02:39 AM UTC

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 Natarajan [Syncfusion]
Replied On February 18, 2010 04:09 PM UTC


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 05:52 AM UTC

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 Natarajan [Syncfusion]
Replied On February 22, 2010 10:09 AM UTC



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

Karikalan N

Troy Pascoe
Replied On February 22, 2010 09:19 PM UTC

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 Natarajan [Syncfusion]
Replied On February 23, 2010 12:20 PM UTC


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon