|
-
May 21st, 2007, 05:51 AM
#1
Thread Starter
New Member
Exporting Flexigrid to Semicolon delimeted File
How can I export data to a "Semicolon" delimeted file using flexgrid?
There are following 4 options while using flexgrid:
1. gridExport.SaveGrid(dialogSave.FileName, C1.Win.C1FlexGrid.FileFormatEnum.TextComma
2. dgExport.SaveGrid(dialogSave.FileName, C1.Win.C1FlexGrid.FileFormatEnum.TextCustom
3. dgExport.SaveGrid(dialogSave.FileName, C1.Win.C1FlexGrid.FileFormatEnum.TextExcel
4. dgExport.SaveGrid(dialogSave.FileName, C1.Win.C1FlexGrid.FileFormatEnum.TextTab
Can i cutomerise my delimeter to semicolon or something else?
How can this be done?
Please help me out!!!
Regards
Sandeep
-
May 21st, 2007, 05:54 AM
#2
Re: Exporting Flexigrid to Semicolon delimeted File
Have you consulted the documentation for the control? Presumably the TextCustom option is the one you want, but the documentation provided with the control will tell if and how you can specify a custom delimiter.
Alternatively you could save using a comma delimiter, read the whole file, replace all commas with semicolons then write out the whole file again.
-
May 21st, 2007, 06:00 AM
#3
Thread Starter
New Member
Re: Exporting Flexigrid to Semicolon delimeted File
Alternate option wont work out as the data itself may contain "," and it may result into change of some meaningfull data to something undesired.
Please let me know how can i get the documentation of this control?
-
May 21st, 2007, 06:04 AM
#4
Re: Exporting Flexigrid to Semicolon delimeted File
If you own the control then you have the documentation already. If you're using a trial version then presumably you got it from ComponentOne, so that's the logical place to look for accompanying documentation. They have extensive downloadable and online help documentation for all their components.
-
May 21st, 2007, 08:05 AM
#5
Thread Starter
New Member
Re: Exporting Flexigrid to Semicolon delimeted File
After reading the documnetation which says:
TextCustom
Cells are separated with the character specified in the ClipSeparators property.
I tried the following code
dim ClipSeparators as string
datagrdExport.ClipSeparators.Equals(";")
ClipSeparators = ";"
datagrdExport.SaveGrid(dialogSave.FileName, C1.Win.C1FlexGrid.FileFormatEnum.TextCustom, C1.Win.C1FlexGrid.FileFlags.IncludeFixedCells, System.Text.Encoding.Default)
but it didnt worked.....on exporting I am still getting a file which is tab seperated and not semicolon sseperated.
Please help me...
-
May 21st, 2007, 06:03 PM
#6
Re: Exporting Flexigrid to Semicolon delimeted File
This line:
vb.net Code:
datagrdExport.ClipSeparators.Equals(";")
is checking whether the ClipSeparators property of the grid is equal to ";" and never using the answer. This line:is assigning the value ";" to a local variable that is never used. You have to assign the value ";" to the ClipSeparators property of the grid.
-
May 22nd, 2007, 04:17 AM
#7
Thread Starter
New Member
Re: Exporting Flexigrid to Semicolon delimeted File
Thank you so much
Following code sets the value of delimiter to semicolon
datagrd.ClipSeparators = ";,"
prior to this i was trying something like this
datagrd.ClipSeparators = ";" //only one character
datagrd.ClipSeparators = ";;" //both characters are same
But ClipSeparators takes two distinct character long string as input.
Although i am able to export to a "semicolon delimited file" but still i am not sure what is the use of second character in the ClipSeparators string.
-
May 22nd, 2007, 06:36 AM
#8
Re: Exporting Flexigrid to Semicolon delimeted File
The documentation tells you that the ClipSeparators property contains the column and row delimiters.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|