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

few things

Thread ID:

Created:

Updated:

Platform:

Replies:

89377 Aug 23,2009 09:19 AM UTC Aug 26,2009 08:53 AM UTC Windows Forms 3
loading
Tags: Tools
Allon
Asked On August 23, 2009 09:19 AM UTC

Hello, everyone

I'd like to know 3 things about grid and form control:

1. How can I create grid control which has columns with AutoSizeMode = Fill?
2. How can I create grid control with only one visible column and with out rowheader (grd.colwidths(0) = 0 and grd.colwidths(1) = 180), that act like ListBox in the same manner, when you click some row, the whole row will be selected (actually, the only cell which is visible). I tried to use AllowSelection = Row, and it didn't work.
3. I used the example CustomOffice2007Colors_2005 with Group Bar in the right side of the form as mdi. When I select some label to open form in the left side, everything works well, but when I resize the whole form, the form that I have chosen inside the mdi, doesn't resize as well. I tried to use:

Private Sub Form1_SizeChanged() Handles Me.SizeChanged
CurrentForm.WindowState = FormWindowState.Normal
CurrentForm.StartPosition = FormStartPosition.Manual
Me.Panel1.Dock = DockStyle.Fill 'the panel which contains forms
CurrentForm.Dock = DockStyle.Fill
End Sub

and it didn't work out.

It will be very nice, if someone would help me, even in some questions from those 3 which I wrote above

Thanks in advance
Allon

Allon
Replied On August 23, 2009 09:53 AM UTC

Hello, everyone

I found solution for question no. 2. I did something with grd_CellClick, which save the last selected row and return its color to the gird's backcolor.

It'll be nice, if somebody will give some clue about the other 2 questions.

Thanks,
Allon

Lingaraj S [Syncfusion]
Replied On August 26, 2009 06:01 AM UTC

Hi Allon,

Thank you for your interest in Syncfusion products.

If you want the AutoFill columns in GridControl, then please try using QeueryColWidth event in GridControl to achieve this behavior.

Refer the code below:

// C# code
void gridControl1_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if (e.Index > 0)
{
e.Size = (this.gridControl1.ClientSize.Width-this.gridControl1.ColWidths[0]) / this.gridControl1.ColCount;
e.Handled = true;
}
}
//VB code
Private Sub gridControl1_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
If e.Index > 0 Then
e.Size = (Me.gridControl1.ClientSize.Width-Me.gridControl1.ColWidths(0)) / Me.gridControl1.ColCount
e.Handled = True
End If
End Sub


Refer the sample from below link:
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/Forums/GGCFill.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

Allon
Replied On August 26, 2009 08:53 AM UTC

Ligaraj S., Thanks a lot.

Regards,
Allon

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

;