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 General Discussion » Value changed to zero in CExtGridCellScientific cell type Collapse All
Subject Author Date
Roongrit Charoensupkul Sep 25, 2007 - 10:17 AM

I test using CExtGridCellScientific in ProfUIs controls sample application. When I enter the value 1e-14 to the cell with scientific cell type for the first time, the text is shown 1.00e-14 as I expected. But if I tried to edit the cell with the value 1.00e-14 in it, when the control in the cell change to edit box, the value is set to zero. I don’t want the value to be changed. What should I do?

Technical Support Sep 27, 2007 - 5:58 AM

We improved the CExtGridCellScientific cell so now the inplace editor is initialized with a value in an exponential form.

Please add the following changes to Prof-UIS. Add the following method declaration to the header of CExtGridCellScientific

virtual void OnQueryTextForInplaceControl( 
	CExtSafeString & strCopy 
	) const;
Then add its implementation
void CExtGridCellScientific::OnQueryTextForInplaceControl( 
	CExtSafeString & strCopy 
	) const
	ASSERT_VALID( this );
	if(		(GetStyleEx()&__EGCS_EX_UNDEFINED_ROLE) != 0 
		||	IsEmpty()
		strCopy = _T("");

	TextGet( strCopy );

Roongrit Charoensupkul Sep 26, 2007 - 12:35 AM

I copied this question to Support Forum board. Sorry that I post the question on this board at the first place.