Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl : how to forbid editing of one row ?
|
Re: ArrayCtrl : how to forbid editing of one row ? [message #30351 is a reply to message #30303] |
Sat, 25 December 2010 20:55   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
Didier wrote on Wed, 22 December 2010 18:10 | Hi,
I want to prevent editing certain rows of ArrayCtrl depending on the contained values.
Is there a way to do this
NB: StartEdit() method is not virtual so I can't derive the class
|
This is quite specific request 
If the ArrayCtrl is not supposed to hold MANY rows, I would probably used "the other" method of editing it, with embedded widgets for each row, and simply not assigned any for rows I do not want to edit.
void ArrayCtrl::SetCtrl(int i, int col, Ctrl& ctrl, bool value = true);
If this does not solve your problem, I am not strictly opposed to adding required option to ArrayCtrl 
Mirek
|
|
|
|
Re: ArrayCtrl : how to forbid editing of one row ? [message #30383 is a reply to message #30352] |
Mon, 27 December 2010 12:21  |
Didier
Messages: 726 Registered: November 2008 Location: France
|
Contributor |
|
|
Hi Mirek and undogs,
Quote: | Another option is to use GridCtrl where you can enable/disable editing for particular row/column or cell.
|
Actually I'm using SqlArray so changing to GridCtrl is not plug&play so I'll stick with SqlArray for now.
Quote: | If the ArrayCtrl is not supposed to hold MANY rows, I would probably used "the other" method of editing it, with embedded widgets for each row, and simply not assigned any for rows I do not want to edit.
void ArrayCtrl::SetCtrl(int i, int col, Ctrl& ctrl, bool value = true);
|
I will try this method, I didn't see it. I thought edit ctrls were only set to rows.
NB: I don't have many rows, and never will (max 100)
Thanks !
[Updated on: Mon, 27 December 2010 12:21] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue May 13 07:41:10 CEST 2025
Total time taken to generate the page: 0.01046 seconds
|