Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1500
Scroll to cell/ row with data error
posted

Hi,

I'm setting cell errors on my dataTable, but when my errors are on the last records (not visible on the grid without manually scrolling down)  it's not clear to the user that their data has problems. 

Is there a way to jump to the first row with data errors? (without looping the grid)

or is there a way to know the UltraGridRow if I know the DataRow? 

I have the code below to set the error, I was hoping I could just jump to the row/cell when I set the errorcolumn without doing another loop.

        private bool ValidateMapping()
        {
            foreach (DataRow row in m_mappingTable.Rows)
            {
                row.ClearErrors();

                if (row[ColumnParameter] == DBNull.Value || !(row[ColumnParameter] is IParameter parameter) || parameter.Id < 0)
                    row.SetColumnError(ColumnParameter, "mapping required");   
            }
            return !m_mappingTable.HasErrors;
        }