Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Please answer it Collapse All
Subject Author Date
tera tera Sep 30, 2009 - 12:30 AM


I want a command to optimize the selection of the cell.

void CSampleMuGridDlg::OnButton2() {     POINT  pt;    int iRow;     for ( iRow = 0 ; iRow < m_pMuMlGrid->RowCountGet() ; iRow++ ){ if ( m_Flag[iRow] == true ){    pt.x = -1;    pt.y = iRow;    m_pMuMlGrid->Selection1Line( pt , true );   }     }


bool CNxL_MlGrid::Selection1Line(     POINT  pt,     bool blFlag     ) {     if ( blFlag == true ){ if ( SelectionGetForCell( -1, pt.y ) == false ){   SelectionSet( pt , false ); }     }else{ if ( SelectionGetForCell( -1, pt.y ) == true ){   SelectionSet( pt , false ); }     }     return true; }


Technical Support Oct 1, 2009 - 6:30 AM

Your question is related to the incorrect usage of the grid control - not to Prof-UIS bug. Every app will work slow if you load to much data into it.

Now let’s discuss some additional details. The selection inside all the Prof-UIS grid controls is described as array of rectangles. This does not depend whether the grid control allows user to perform full row selection, single cell selection or multiple cells selection. Each rectangle contains row/column indices of selected sub-region of grid cells. If the grid cell needs to detect whether it’s selected, then it should review all the rectangles in the selection array and check whether cell’s row/column numbers are inside at least one of selection rectangles. This means you should not insert too much selection sub-regions into the grid control. We cannot make the grid control marking each cell as selected because this technique brings even greater performance disadvantages.