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.

ListBox.Grid without multiline contents

Thread ID:

Created:

Updated:

Platform:

Replies:

124015 May 9,2016 06:23 AM May 16,2016 01:44 AM Windows Forms 5
loading
Tags: GridControl
Frank Piplak
Asked On May 9, 2016 06:23 AM

Hello,

is it possible to disable (general) multiline entries in the grid?

Best regards,
Frank

Attachment: GridControlMultiline_7a0253ab.zip

Anish George [Syncfusion]
Replied On May 9, 2016 08:34 AM

Hi Frank, 

Thank you for using Syncfusion products. 

It is possible disable the multi-lines in GridControl by setting the WrapText property as false. Please refer the below code snippet. 

C#: 
this.gridControl1.TableStyle.WrapText = false; 


Please let us know if you need any further assistance. 

Regards, 
Anish. 


Frank Piplak
Replied On May 9, 2016 08:59 AM

Hello Anish,

thanks for but it not works. Please see my code, perhaps I made a mistake?!

My Code:
            Dim vGridControl As Syncfusion.Windows.Forms.Grid.GridControl = pMultiColumnComboBox.ListBox.Grid

            With vGridControl
                .DefaultRowHeight = vgIntRowHeightDef
                .DefaultGridBorderStyle = Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid
                .GridLineColor = vgColBorderMid(vgBytTheme)
                .ColWidths(1) = 0
                .TableStyle.WrapText = False
            End With

Best regards,
Frank

Anish George [Syncfusion]
Replied On May 10, 2016 05:45 AM

Hi Frank, 

Thank you for your update. 

We request you to make use of the QueryCellInfo event and then set the WrapText property as false. Please refer the below code snippet. We have also created a simple sample for your convenience. 

VB: 
 
AddHandler Me.multiColumnComboBox1.ListBox.Grid.QueryCellInfo, AddressOf Grid_QueryCellInfo 
 
Private Sub Grid_QueryCellInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs) 
        e.Style.WrapText = False 
    End If 
End Sub 


Please let us know if you need any further assistance. 

Regards, 
Anish 


Frank Piplak
Replied On May 13, 2016 03:39 AM

Hello Anish,

works, many thanks.

Best regards,
Frank

Anish George [Syncfusion]
Replied On May 16, 2016 01:44 AM

 Hi Frank, 
  
We are glad to hear that the given suggestion helps you to find a solution. 
  
Please let us know if you need any further assistance. 
  
Regards, 
Anish 


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.

;