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.

Focusing Newly add Record.

Thread ID:

Created:

Updated:

Platform:

Replies:

40257 Jan 30,2006 04:49 AM Jan 30,2006 10:22 AM Windows Forms 5
loading
Tags: GridControl
vihar
Asked On January 30, 2006 04:49 AM

I am doing some what mapping for data , in that when i mapped a newly mapped data will store in new grid . What should i do if i want to get focus on newly added row in my grid..

Administrator [Syncfusion]
Replied On January 30, 2006 07:15 AM

Hi Vihar, The Grid.CurrentCell.MoveTo(GridRangeInfo.Row(rowIndx)) will move the focus to a particular row. I have attached a sample which, moves the focus to the newly added/inserted row. Please refer the link for GridGroupingControl. If you are looking for something else please let us know. Regards, Calvin

GDBG.zip

vihar
Replied On January 30, 2006 08:48 AM

Thanks For Your Reply . But its not working for GGC. I want a newly added row in focus.though its get focused but it is not coming in to view. I have to scroll down the grid for getting newly added record in to view. How can i scroll the scrollbar automatecally that newly added record will come in to View.... Thanks Vihar.. >Hi Vihar, > >The Grid.CurrentCell.MoveTo(GridRangeInfo.Row(rowIndx)) will move the focus to a particular row. I have attached a sample which, moves the focus to the newly added/inserted row. Please refer the link for GridGroupingControl. > >If you are looking for something else please let us know. > >Regards, >Calvin

GDBG.zip

stanleyj [Syncfusion]
Replied On January 30, 2006 08:57 AM

Hi Vihar, You can use CurrentCell.ScrollInView or the overloaded fashion of MoveTo which has an option to set through GridSetCurrentCellOptions and that is shown in the sample. this.gridDataBoundGrid1.CurrentCell.ScrollInView(); this.gridDataBoundGrid1.CurrentCell.MoveTo(GridRangeInfo.Row(ind),GridSetCurrentCellOptions.ScrollInView); Best regards, Stanley

vihar
Replied On January 30, 2006 09:52 AM

hi Stanley.Sorry to say but your ans did not help me . I am Doing All this thing in SourceListListChangedCompleted event of grid. Ao As new row will add this event eill fire and i want to do the focusing, i did this many thing .. GridGroupingControl1.Table.Records[e.NewIndex+4].SetCurrent(); But this is just making the new row focused but not getting it in view ,, Then According to your reply I tried GridGroupingControl1.TableControl.CurrentCell.MoveTo(GridRangeInfo.Row(e.NewIndex+4),GridSetCurrentCellOptions.ScrollInView); But This is also not Working ... GridGroupingControl1.TableControl.CurrentCell.ScrollInView(); I tried This also But No Result Again .. Do u have any other ides... >Hi Vihar, > >You can use CurrentCell.ScrollInView or the overloaded fashion of MoveTo which has an option to set through GridSetCurrentCellOptions and that is shown in the sample. > >this.gridDataBoundGrid1.CurrentCell.ScrollInView(); > >this.gridDataBoundGrid1.CurrentCell.MoveTo(GridRangeInfo.Row(ind),GridSetCurrentCellOptions.ScrollInView); > >Best regards, >Stanley

stanleyj [Syncfusion]
Replied On January 30, 2006 10:22 AM

Hi Vihar, Sorry, I was addressing to GDBG again. Can you try adding Update() to the sample you saw in the forum thread mentioned above. To the else block in the button handler dt.Add(o); this.gridGroupingControl1.DataSource = null; this.gridGroupingControl1.DataSource = dt; this.gridGroupingControl1.Update(); Best regards, Stanley

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.

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.

;