KryptonDataGridView, disable resizing of row header height?

Topics related to the Krypton Toolkit.

Moderators: Phil Wright, Chris Porter

KryptonDataGridView, disable resizing of row header height?

Postby Bomi » Tue Apr 13, 2010 4:01 pm

Hi,

just wondering how to disable the resizing of the height of row headers? Found settings to prevent users from changing the width of columns and height of rows but none for row headers? Thanks for any hint...
Greetings, Bomi...
Bomi
 
Posts: 58
Joined: Fri Mar 06, 2009 12:42 am

Re: KryptonDataGridView, disable resizing of row header heig

Postby Edgar Ferreira » Tue Apr 13, 2010 7:07 pm

Code: Select all
dataGridView.AllowUserToResizeRows = false;


Don't get me wrong, but you would find faster answers to this kind of tips if you google it.
Edgar Ferreira
 
Posts: 132
Joined: Thu Mar 26, 2009 8:59 pm
Location: Coimbra, Portugal

Re: KryptonDataGridView, disable resizing of row header heig

Postby Bomi » Tue Apr 13, 2010 8:02 pm

Hi Edgar,

thanks for answering. Prior to my posting i switched this setting via property window to 'False', but it is still possibel to resize the very first row of the KDGV, it's that blue one on top of the list that holds the column headers. So i thought there may be a special setting for this in the KDGV...
Greetings, Bomi...
Bomi
 
Posts: 58
Joined: Fri Mar 06, 2009 12:42 am

Re: KryptonDataGridView, disable resizing of row header heig

Postby Edgar Ferreira » Tue Apr 13, 2010 8:49 pm

Oh OK, you meant the ColumnHeaders (not RowHeaders).

In fact, I can't figure out an easy way to disable height resizing.
The standard DataGridView has the property ColumnHeadersHeightSizeMode wich seems to solve the problem.

Maybe Phil forgot to expose this property...
Last edited by Edgar Ferreira on Wed Apr 14, 2010 12:34 am, edited 1 time in total.
Edgar Ferreira
 
Posts: 132
Joined: Thu Mar 26, 2009 8:59 pm
Location: Coimbra, Portugal

Re: KryptonDataGridView, disable resizing of row header heig

Postby Chris Porter » Wed Apr 14, 2010 12:06 am

Can you access the KryptonDataGridView1.DataGridView.ColumnHeadersHeightSizeMode property?
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US

Re: KryptonDataGridView, disable resizing of row header heig

Postby Edgar Ferreira » Wed Apr 14, 2010 12:21 am

Chris Porter wrote:Can you access the KryptonDataGridView1.DataGridView.ColumnHeadersHeightSizeMode property?

I tried that but it seems the DataGridView interface is not exposed by inherited KryptonDataGridView.
Edgar Ferreira
 
Posts: 132
Joined: Thu Mar 26, 2009 8:59 pm
Location: Coimbra, Portugal

Re: KryptonDataGridView, disable resizing of row header heig

Postby Bomi » Wed Apr 14, 2010 2:55 am

There's a 'ColumnHeadersHeightSizeModeChanged' event, but no property to set ist. Solved the problem in the 'ColumnHeadersHeightChanged' event with simply resetting the height back to it's original value:

Code: Select all
Private Sub DGV_ColumnHeadersHeightChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DGV.ColumnHeadersHeightChanged

    On Error Resume Next
    Me.DGV.ColumnHeadersHeight = 23

  End Sub

Thanks to all for assistance :roll:
Greetings, Bomi...
Bomi
 
Posts: 58
Joined: Fri Mar 06, 2009 12:42 am

Re: KryptonDataGridView, disable resizing of row header heig

Postby sudhakshina » Mon May 02, 2011 8:53 pm

I know this is really very older post,
but if any other seeks the same problem, this is the better solution as ColumnHeadersHeightSizeMode is not yet exposed in KryptonDataGridView.
we dont find the property ColumnHeadersHeightSizeMode in design time so u can set this in constructor or any of ur load methods lik,

DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;


Thanks,
Sudhakshina
sudhakshina
 
Posts: 1
Joined: Mon May 02, 2011 8:45 pm

Re: KryptonDataGridView, disable resizing of row header heig

Postby anovgor » Tue Jan 31, 2012 10:22 pm

Please make this property visible in visual configurator. I've spent 2 hours trying to figure out what's wrong with krypton
anovgor
 
Posts: 4
Joined: Tue Jan 31, 2012 10:18 pm

Re: KryptonDataGridView, disable resizing of row header heig

Postby JFercan » Thu Feb 09, 2012 12:33 am

Thank you very much for the information. This was exactly what I needed.

Cheers :)
JFercan
 
Posts: 3
Joined: Thu Feb 09, 2012 12:31 am


Return to Krypton Toolkit

Who is online

Users browsing this forum: Google [Bot] and 0 guests