few things
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
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
SIGN IN To post a reply.
3 Replies
AL
Allon
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
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
LS
Lingaraj S
Syncfusion Team
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:
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.
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.
AL
Allon
August 26, 2009 08:53 AM UTC
Ligaraj S., Thanks a lot.
Regards,
Allon
Regards,
Allon
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AL Allon
- Aug 23, 2009 09:19 AM UTC
- Aug 26, 2009 08:53 AM UTC