Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How set read-only state to a editable column?
Re: How set read-only state to a editable column? [message #5597 is a reply to message #5596] |
Thu, 05 October 2006 11:27   |
|
nicomesas wrote on Thu, 05 October 2006 04:30 |
unodgs wrote on Thu, 05 October 2006 00:25 |
I checked my code and it was there already... I only added NoEditable.
To make row not editable type:
grid.GetRow(0).NoEditable()
grid.GetRow(10).NoEditable()
or
grid.GetRow(0).Editable(false) in 0.95 version
|
This would be perfect!
Another desirable thing, would be to be able to establish a cell determined like NoEditable.
The perfect thing would be this
gridData.GetRow(4).GetCell(2).NoEditable();
//set column 2 in row 4 to be read-only.
But I intuit that he is too complex.
What I believe that would be more easy it is to wait to an event WhenRowChange to change the edition mode of that cell in the row.
void MyForm::WhenRowChange() {
int row = gridData.GetCursor();
gridData.GetColumn(2).Editable(row != 4);
}
I'm tested this piece of code and it and which does not work as I hoped, happens is that I can edit the column 2 in the row 4 without problems.
Nico
|
gridData.GetColumn(2).Editable(row != 4);
Both GetColumn and GetRow returns ItemRect& which has Editable method, but only in GetRow context it works.
I will add in 0.96 sth like this...
grid.GetCell(4, 2).Editable(true/false)
..that's not a problem.
New version will be released soon (maybe as a part of upp), but I can put it on dgs.pac.pl even sooner if you want.
I will also make Editable working in GetColumn context. If column will be read-only it coudn't be edited even if it has edit assigned.
|
|
|
 |
|
How set read-only state to a editable column?
By: nicomesas on Thu, 28 September 2006 11:22
|
 |
|
Re: How set read-only state to a editable column?
By: nicomesas on Thu, 28 September 2006 11:58
|
 |
|
Re: How set read-only state to a editable column?
By: mirek on Fri, 29 September 2006 14:52
|
 |
|
Re: How set read-only state to a editable column?
By: nicomesas on Fri, 29 September 2006 15:56
|
 |
|
Re: How set read-only state to a editable column?
By: mirek on Sun, 01 October 2006 18:49
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: mirek on Tue, 03 October 2006 15:06
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: mirek on Wed, 04 October 2006 11:54
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: unodgs on Wed, 04 October 2006 22:24
|
 |
|
Re: How set read-only state to a editable column?
By: unodgs on Thu, 05 October 2006 00:25
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: unodgs on Thu, 05 October 2006 11:27
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: unodgs on Thu, 05 October 2006 15:13
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
|
 |
|
Re: How set read-only state to a editable column?
By: unodgs on Thu, 05 October 2006 15:10
|
 |
|
Re: How set read-only state to a editable column?
|
Goto Forum:
Current Time: Sat Jul 05 14:16:12 CEST 2025
Total time taken to generate the page: 0.03686 seconds
|