Print Page | Close Window

Insert a grid item

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=1383
Printed Date: 21 November 2024 at 4:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Insert a grid item
Posted By: Uzi Yachin
Subject: Insert a grid item
Date Posted: 08 November 2004 at 6:01am
I have to insert a grid item between existing items rather than to add it as a last child. Is there a way to do it? If not, are you going to add this feature in the next versions?



Replies:
Posted By: Alex H.
Date Posted: 18 November 2004 at 2:52am

I have the same problem -> Any solution for that  ??

 

 



Posted By: Oleg
Date Posted: 19 November 2004 at 12:52am

We added new InsertChildItem and InsertCategory methods.

You can add them manually in source:

for 9.50/9.51:

CXTPPropertyGridItem* CXTPPropertyGridItem::InsertChildItem(int nIndex, CXTPPropertyGridItem* pItem)
{
 m_pChilds->InsertAt(nIndex, pItem);
 pItem->m_pGrid = pItem->m_pChilds->m_pGrid = m_pGrid;

 ASSERT(pItem->m_pParent == NULL);
 pItem->m_pParent = this;
 pItem->m_nIndent = m_nIndent + 1; 

 pItem->OnAddChildItem();

 if (m_bVisible)
 {
  if (m_bExpanded) m_pGrid->SetPropertySort(m_pGrid->m_properetySort, TRUE);
  else if (m_pGrid->GetSafeHwnd() && m_pChilds->GetCount() == 1) m_pGrid->Invalidate(FALSE);
 }

 return pItem;
}

void CXTPPropertyGridItems::InsertAt(int nIndex, CXTPPropertyGridItem* pItem) {
 m_arrItems.InsertAt(nIndex, pItem);
}

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Uzi Yachin
Date Posted: 24 November 2004 at 1:17am
Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net