BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Professional Edition
 how to get the cell value in CBCGPGridCtrl
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

timguo

19 Posts

Posted - 01/23/2012 :  7:33:37 PM  Show Profile  Reply with Quote
I want to use CBCGPGridCtrl as a input interface and wolud somebody can advise me how to get the value from a cell in CBCGPGridCtrl.
thanks and best regards

Tim Guo

komiagin

82 Posts

Posted - 01/23/2012 :  11:22:54 PM  Show Profile  Visit komiagin's Homepage  Reply with Quote
quote:
Originally posted by timguo

I want to use CBCGPGridCtrl as a input interface and wolud somebody can advise me how to get the value from a cell in CBCGPGridCtrl.
thanks and best regards



It's easy to do. I assume that you're not using grid in virtual mode.


	int nRow = 0;
	int nCol = 0
	CBCGPGridRow* pRow = m_Grid.GetRow(nRow);
	CBCGPGridItem* pItem = pRow->GetItem(nCol);
	CString sValue = pItem->GetValue();


Andrew
Go to Top of Page

timguo

19 Posts

Posted - 01/24/2012 :  05:51:11 AM  Show Profile  Reply with Quote
Andrew,

Thank you very much.
I tried the codes you recommendated. It got a unhandled exception problem at "CBCGPGridItem* pItem = pRow->GetItem(nCol);" Would you please help me?

Thanks
Tim

Tim Guo
Go to Top of Page

Support

2995 Posts

Posted - 01/24/2012 :  07:22:58 AM  Show Profile  Visit Support's Homepage  Reply with Quote
http://www.bcgsoft.com/cgi-bin/forum/topic.asp?TOPIC_ID=5657

BCGSoft Technical Support
Go to Top of Page

timguo

19 Posts

Posted - 01/25/2012 :  6:59:58 PM  Show Profile  Reply with Quote
Can I use use grid in virtual mode? and how to retrieve the data from grid in virtual mode.

thanks

Tim Guo
Go to Top of Page

timguo

19 Posts

Posted - 01/25/2012 :  9:13:06 PM  Show Profile  Reply with Quote
Above codes can work in in virtual mode.

best regards

Tim Guo
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2013 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000