U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Ctrls<>() Callback / Disable some rows
Re: Ctrls<>() Callback / Disable some rows [message #10065 is a reply to message #9991] Mon, 18 June 2007 20:27 Go to previous messageGo to previous message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I also think you have some inconsistent behavior with Get{...} and Set{...}. Some appear to auto-adjust for the Fixed{Column,Row} count and some do not.

For example, when using a index from 0 to GetCount to check the value of a particular column, and set the cell equal to zero if the cell value is one, I have to specify the FixedCount offset when getting values... but not when setting values.

Consider the below snippet:
	const int	offset	= gridctrl.GetFixedCount(),
			pos		= gridctrl.GetCursor();

	if ( atoi(gridctrl.Get("checked").ToString())==1 )
		for ( int t=0; t<gridctrl.GetCount(); t++ )
			if ( (t!=pos) && (atoi(gridctrl.Get(t+offset,"checked").ToString())==1)) {
				gridctrl.Set(t,"checked",0);
			}

[Updated on: Mon, 18 June 2007 20:28]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl align text in column
Next Topic: GridCtrl - Child Ctrl, selected row, focus issue
Goto Forum:
  


Current Time: Sun Sep 13 01:20:47 GMT+2 2026

Total time taken to generate the page: 0.01090 seconds