Ticket Q537236
Visible to All Users

ScrollIntoView Not working

created 11 years ago

Hi,

i am using DxGrid to show the data. I am using ScrillIntoView method to scroll the grid at specific row position But it is not working. when i enter a new row i am changing the row color by its rowhandle. but when i pass same same row handle to scrollintoView it didn't work, and it is compulsory to have focused row as newItemRow after adding the new record. Is there a way to achieve this. I have attached a solution please update that.

Regards

Naveen Kr .Singh

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hello Naveen,
To resolve this issue, wrap your code with the Dispatcher.BeginInvoke method:

C#
private void LocationView_ValidateRow(object sender, GridRowValidationEventArgs e) { Dispatcher.BeginInvoke(new Action(() => { LocationView.SelectRow(LocationGrid.GetRowHandleByListIndex(LocationList.Count - 1)); LocationView.FocusedRowHandle = GridControl.NewItemRowHandle; LocationView.ScrollIntoView(LocationGrid.GetRowHandleByListIndex(LocationList.Count - 1)); })); }
    Comments (2)
    N N
    Naveen Kumar Singh 11 years ago

      Thanks Alexander

      DevExpress Support Team 11 years ago

        You are welcome, Naveen.
        Feel free to contact us should you need further assistance.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.