Sep 19, 2012, 8:17 AM
[CLOSED] Editable ComponentColumn in a Gridpanel setting MaxValue
Hi,
In version 1.x of EXT.NET, I could do the following with a numberfield as an editor within a gridpanel, and it would apply the maxvalue to the numberfield in the editable column for each row:
Many Thanks,
Kev
In version 1.x of EXT.NET, I could do the following with a numberfield as an editor within a gridpanel, and it would apply the maxvalue to the numberfield in the editable column for each row:
((NumberField)this.gridPanel1.ColumnModel.Columns[5].Editor[0]).MaxValue = Convert.ToDouble(balance.ToString("#0.00"));
I've now converted the code to 2.0, and use a ComponentField and NumberField for the editor. I can access the ComponentColumn/Numberfield in the in the codebehind and I can apply the maxvalue to the field, like this:ComponentColumn cc = ((ComponentColumn)this.gridPanel1.ColumnModel.Columns[5];
Numberfield nf = ((NumberField)cc.Component[0]);
nf.MaxValue = 1000;
The code compiles fine, but I now get a javascript error telling me the control is undefined? This didn't happening in 1.x. I'm wondering what the solution is to do the same as I did in 1.x?Many Thanks,
Kev
Last edited by Daniil; Sep 25, 2012 at 6:50 AM.
Reason: [CLOSED]