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.

tab character is not display properly in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

43597 Apr 26,2006 09:03 PM Apr 28,2006 05:08 AM Windows Forms 7
loading
Tags: GridControl
ahmad kamal bin abdul aziz
Asked On April 26, 2006 09:03 PM

hi, why a string like "Pit\tStrip\tBlock" doesn''t display as Pit Strip Block. In grid the character "\t" (tab) is displayed as square...

Administrator [Syncfusion]
Replied On April 27, 2006 12:05 AM

Hi Akmal, I have tested this issue by creating a sample using GridControl in v.4.1.0.50 and then again tested by upgrading to 4.1.0.62. I was not able to reproduce the issue.If you can provide more information, we can try to suggest some solution. Here is a sample. http://www.syncfusion.com/Support/user/uploads/gc2_78aa07c.zip Could you please run this at your end and let me know how it goes? Thanks for your patience. Best Regards, Haneef

Administrator [Syncfusion]
Replied On April 27, 2006 01:30 AM

Hi Akmal, The CellType = "OriginalTextBox" is derived from System.Windows.Forms.TextBox. which does not have a escape sequence character.If you want to support the escape sequence character, you need to set the grid''s AllowEnter property to true.Here is a code snippet this.gridControl1[1,1].CellType = "OriginalTextBox"; this.gridControl1[1,1].Text = "Pit\tStrip\tBlock"; this.gridControl1.ColWidths[1] = 400; this.gridControl1[1,1].AllowEnter = true; Let me know if this helps. Regards, Haneef

ahmad kamal bin abdul aziz
Replied On April 27, 2006 04:35 AM

it still doesn''t work. the string comes from a file e.g: StringCollection filePreview = new StringCollection(); FileStream fileStream = new System.IO.FileStream("@C:\sample.txt", System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.ReadWrite); sr = new System.IO.StreamReader(fileStream); string currentLine = sr.ReadLine(); filePreview.Add(currentLine); //======================= in queryCellInfo. e.Style.CellValue = filePreview[index];

Administrator [Syncfusion]
Replied On April 27, 2006 06:04 AM

Hi Akmal, The Reason is that you are ignoring the escape sequence character in a text file(writing the "\t" instead pressing Tab key").You need to enable the escape sequence by using this code.Here is a code snippet. filePreview.Add(currentLine.Replace(@"\t","\t")); //or e.Style.Text = filePreview[0].ToString().Replace(@"\t","\t"); Please let me know if this helps. Regards, Haneef

ahmad kamal bin abdul aziz
Replied On April 27, 2006 08:53 PM

i''d tried it before, it still doesn''t help.. u can try with both file (wring \t and pressing tab key). Can u give me example that showing \t character properly? besides that, if u double click the cell, the \t is displayed nicely intead displaying square. >Hi Akmal, > >The Reason is that you are ignoring the escape sequence character in a text file(writing the "\t" instead pressing Tab key").You need to enable the escape sequence by using this code.Here is a code snippet. > >filePreview.Add(currentLine.Replace(@"\t","\t")); >//or >e.Style.Text = filePreview[0].ToString().Replace(@"\t","\t"); > >Please let me know if this helps. >Regards, >Haneef

Administrator [Syncfusion]
Replied On April 27, 2006 11:56 PM

Hi Akmal, We tried to reproduce this issue in 4.1, but could not get this issue. Maybe I am not following the steps that you are doing. Attached sample working fine here. Can you post a small sample showing this problem or tell us how to see it in the Attached sample? Here is a sample. http://www.syncfusion.com/Support/user/uploads/gc2_46231980.zip Could you please run this at your end and let me know how it goes? Thanks for your patience. Best Regards, Haneef

Administrator [Syncfusion]
Replied On April 28, 2006 05:08 AM

Hi sorry for the issue that have been raised, actually the grid i''m working on is a grid which is have been inherited from GridControl, After doing comparison between both grid, i notice grid control display the "\t properly and the ours (inherited) does not. thanks for your support

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.

;