Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3610882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:48:27+00:00 2026-05-18T21:48:27+00:00

I am developing a project in VB.Net and I am using Gujarati fonts (non-Unicode).

  • 0

I am developing a project in VB.Net and I am using Gujarati fonts (non-Unicode).

I have placed a DaraGridView (DGV) and displaying the data stored in database in DGV.

In DGV, if the contents of the cell is truncated, the DGV shows ellipses (three dots) (…); but as the font is set to a Gujarati font, it displays a Gujarati alphabet “ઈઈઈ” instead of “…” because the Gujarati character “ઈ” is coded with the English “.” (dot) character.

In Gujarati font, “.” can be generated with the English character “P”.

So, How can I change the ellipses to English “P” character? OR How can I remove the ellipses completely?

I have found a similar solution by berc on Tuesday, August 31, 2010 1:33 PM :
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/95c8963f-9832-4e2d-b057-3590afe3b65d

but I am not sure it is the perfect and/or the only way to do so, AND it will really work or not.
If the solution on the above link of MSDN is fine, how much code from it I can remove and/or will I need more code to get it work fully?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:48:27+00:00Added an answer on May 18, 2026 at 9:48 pm

    You can override the CellFormatting event:

    Private Sub DGV_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DGV.CellFormatting
        'Check for null values
        If (e Is Nothing) OrElse (e.Value Is Nothing) Then Return
        'Grab the current cell
        Dim C = DirectCast(sender, DataGridView).Rows(e.RowIndex).Cells(e.ColumnIndex)
        'I'm not sure if its my testbed or what but occasionally I was getting NULL here so check for that
        If (C Is Nothing) Then Return
    
        'Measure the string, if it fits, use it as is
        If TextRenderer.MeasureText(e.Value.ToString(), C.InheritedStyle.Font).Width <= C.Size.Width Then Return
    
        'This is our text that we'd like to append to the end of the string
        Dim RepText = "PPP"
        'This is our text that we'll slowly take off the last character of until it fits
        Dim NewText As String = e.Value
    
        'Loop until our text fits. NOTE: You may have to take into account cell padding here, too
        Do While TextRenderer.MeasureText(NewText & RepText, C.InheritedStyle.Font).Width >= C.Size.Width
            'Chop the last character off and repeat
            NewText = NewText.Substring(0, NewText.Length - 2)
        Loop
    
        'Set the new cell's value
        e.Value = NewText & RepText
        'Flag that we've changed the cell's text
        e.FormattingApplied = True
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a WPF project in vb.net and have multiple windows in it.
i have a problem i am developing an asp.net mvc project. Website is in
We have a software house developing code for us on a project, .NET Web
I'm developing a project in .NET (using C# to be more specific). Using Visual
I am developing a medium sized ASP.NET project using ASP.NET MVC and Entity Framework.
Currently in the early stages of developing a very large project using ASP.Net MVC.
I'm developing an ASP.Net project. I have an <asp:Table> control on my page, to
I have a potential project where I would be working on developing the Data
I'm developing a project using asp.net mvc. And i am saving images to database
I am developing e-commerce project on Asp.Net 3.5 with C#. I am using 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.