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. Image for the cookie policy date

Set cursor position to the new record row within the GridDataBoundGrid

I''m new to GridDataBoundGrid and facing this problem of manipulating the cursor position within the GridDataboundGrid. How can I set the cursor position to the new record row (usually the last row) by using codes (design time) rather than using mouse cursor to click on the new record row of the GridDataBoundGrid during runtime. I would be very grateful if you can show me the full code to do it...thanks

2 Replies

AD Administrator Syncfusion Team April 28, 2004 05:41 AM

Hi Vincent, open the DataBound\RecordNavDataBoundGrid sample in designer and add a button on the form. Then add a event handler as follows: private void button1_Click(object sender, System.EventArgs e) { this.gridDataBoundGrid1.CurrentCell.MoveTo(this.gridDataBoundGrid1.Model.RowCount, 1); this.gridDataBoundGrid1.Focus(); // To also switch the record into edit mode (show pencil on header) call // this.gridDataBoundGrid1.Binder.AddNew(); } When you click the button the grid will position the current record onto the AddNew record. Stefan


VL Vincent Loy Chee Hoon April 29, 2004 04:10 AM

hi stefan, Thanks alot for replying to my question. But I got another question for you, where can I find more detail help regarding each properties and methods created within the GridDataBoundGrid?? Best Regards Vincent >Hi Vincent, > >open the DataBound\RecordNavDataBoundGrid sample in designer and add a button on the form. > >Then add a event handler as follows: > > > private void button1_Click(object sender, System.EventArgs e) > { > this.gridDataBoundGrid1.CurrentCell.MoveTo(this.gridDataBoundGrid1.Model.RowCount, 1); > this.gridDataBoundGrid1.Focus(); > // To also switch the record into edit mode (show pencil on header) call > // this.gridDataBoundGrid1.Binder.AddNew(); > } > > >When you click the button the grid will position the current record onto the AddNew record. > >Stefan > >

Loader.
Live Chat Icon For mobile
Up arrow icon