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. Image for the cookie policy date
close icon

tab character is not display properly in grid

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...

7 Replies

AD Administrator Syncfusion Team April 27, 2006 04:05 AM UTC

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


AD Administrator Syncfusion Team April 27, 2006 05:30 AM UTC

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


AK ahmad kamal bin abdul aziz April 27, 2006 08:35 AM UTC

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];


AD Administrator Syncfusion Team April 27, 2006 10:04 AM UTC

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


AK ahmad kamal bin abdul aziz April 28, 2006 12:53 AM UTC

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


AD Administrator Syncfusion Team April 28, 2006 03:56 AM UTC

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


AD Administrator Syncfusion Team April 28, 2006 09:08 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon