CGXGridCore::UpdateInsertRows

virtual void UpdateInsertRows(ROWCOL nRow, ROWCOL nCount, UINT flags, BOOL bCreateHint = FALSE);?

nRow

Specifies the row id.

nCount

Specifies the number of rows to be inserted.

flags

  • Specifies the update technique:

  • GX_UPDATENOW specifies to scroll the window contents and call UpdateWindow after invalidating the window.

  • GX_SMART specifies to scroll the window contents without calling UpdateWindow after the last invalidation.

GX_INVALIDATE simply invalidates the window area below nRow.

bCreateHint

Specifies if a hint should be created.

Remarks

Overridable method which updates the window after inserting rows.

The method creates the following hint:

   CGXGridHint hint(gxHintUpdateInsertRows, m_nViewID);
   hint.nRow1 = nRow;
   hint.dwParam = nCount;
   hint.flags = flags;

You can override this method if you need to change the hint.

Example

This example illustrates how to update the window after inserting several rows.

// insert space and initialize row
for (WORD n = 0; n < nCount; n++) m_pDoc->InsertRow(n, contents);
UpdateInsertRows(nRow, nCount, GX_UPDATENOW, TRUE);

See Also

 CGXGridCore::InsertRows  CGXGridHint

CGXGridCore

 Class Overview |  Class Members