Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
4959 | Jun 11,2003 12:04 AM UTC | Jun 16,2003 08:49 PM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.GridControl1.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm End Sub Private Sub GridControl1_WrapCellNextControlInForm(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridWrapCellNextControlInFormEventArgs) Handles GridControl1.WrapCellNextControlInForm Me.GridControl1.RowCount += 1 Me.GridControl1.CurrentCell.MoveTo(Me.GridControl1.RowCount, 1) e.Cancel = True End Sub
> Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load > Me.GridControl1.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm > End Sub > > Private Sub GridControl1_WrapCellNextControlInForm(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridWrapCellNextControlInFormEventArgs) Handles GridControl1.WrapCellNextControlInForm > Me.GridControl1.RowCount += 1 > Me.GridControl1.CurrentCell.MoveTo(Me.GridControl1.RowCount, 1) > e.Cancel = True > End Sub >
this.gridDataBoundGrid1.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm;
this.gridDataBoundGrid1.WrapCellNextControlInForm += new GridWrapCellNextControlInFormEventHandler(this.gridDataBoundGrid1_WrapCellNextControlInForm);
2) In the event handler, cancel the grid's actions, and do things yourself.
private void gridDataBoundGrid1_WrapCellNextControlInForm(object sender, GridWrapCellNextControlInFormEventArgs e)
{
this.gridDataBoundGrid1.CurrentCell.MoveTo(this.gridDataBoundGrid1.Model.RowCount, 1);
e.Cancel = true;
this.SelectNextControl(this.gridDataBoundGrid1, true, true, false, true);
}
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.
This page will automatically be redirected to the sign-in page in 10 seconds.