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

Undesirable changing font size of field in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

130325 May 6,2017 03:20 PM UTC May 10,2017 06:06 AM UTC WinForms 5
loading
Tags: GridDataBoundGrid(Classic)
xetod
Asked On May 6, 2017 03:24 PM UTC

I'm developing a project in Arabic language and I have a weird issue using DataGridBoundGrid. I could explain this as when I click on the field to type something especially combination of numbers and letters in Arabic the font size decreases and when the field loses focus it returns to its original font size. Is there any way to stop this behavior as when I type the font size never changes?

Arulpriya Ramalingam [Syncfusion]
Replied On May 8, 2017 11:54 AM UTC

Hi Xetod, 

Thanks for your interest in Syncfusion products. 

We have analyzed your reported scenario and unfortunately we could not able to reproduce the issue at our end.  


Can you please provide the below details which will help us to provide better solution at the earliest. 
  • Please provide the information about the product version and Frame work version.
  • Please ensure that the issue occurred in the attached sample.
  • Provide us with the simple video or screen shots of your scenario.

Screenshot 
 
Regards, 
Arulpriya 


xetod
Replied On May 8, 2017 01:32 PM UTC

Thanks for the answer.
I'm using .Net Framework 4.5 and Syncfusion 15.1450.0.33.
I attached a sample video about when the issue occurs. 

Attachment: video_sample_2fe8944d.zip

Arulpriya Ramalingam [Syncfusion]
Replied On May 9, 2017 12:48 PM UTC

Hi Xetod, 

Thanks for your update. 

We have analyzed your reported scenario with our source. It is the default behavior of cell text drawing in our source. As per our Grid architecture, the cell text and the cell styles are drawn by using Graphics(GDI). So if the cell is in editing mode, the starting position of the text will differs from the starting position of the cell which is not in editing mode. We regret to say that the GridDataBoundGrid does not have the support or any extensibility to change this behavior. 

Please let us know, if you need any further assistance. 

Regards, 
Arulpriya 


xetod
Replied On May 9, 2017 01:26 PM UTC

Thanks for your effort to solve my issue.It's really appreciated.
For now, is there any way to force the cell on editing to change the font size when typing because I tried this code but It doesn't work.

 Private Sub gdbTelephone_CurrentCellControlKeyMessage(sender As Object, e As GridCurrentCellControlKeyMessageEventArgs) Handles gdbTelephone.CurrentCellControlKeyMessage

        CType(Me.gdbTelephone.CurrentCell.Renderer, Syncfusion.Windows.Forms.Grid.GridTextBoxCellRenderer).StyleInfo.Font.Size = 11

    End Sub



Arulpriya Ramalingam [Syncfusion]
Replied On May 10, 2017 06:06 AM UTC

Hi Xetod, 

Thanks for your update. 

We could able to understand your scenario and this reported scenario can be achieved by some workaround using QueryCellInfo event. In that event, Font.Size property can be used to set the font size on editing.  

Code snippet 
 
'Event Subscription 
AddHandler Me.gridDataBoundGrid1.Model.QueryCellInfo, AddressOf Model_QueryCellInfo 

'Event Customization 
Private Sub Model_QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs) 
    Dim currentCell As GridCurrentCell = gridDataBoundGrid1.CurrentCell 
    If currentCell IsNot Nothing AndAlso e.RowIndex = currentCell.RowIndex AndAlso e.ColIndex = currentCell.ColIndex AndAlso currentCell.IsEditing Then 
        e.Style.Font.Size = 15.0F 
        e.Handled = True 
    End If 
End Sub 
 
 
Regards, 
Arulpriya 


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.

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

;