Hi,
I have a ultragrid column with ColumnStyle.DateWithSpin. I want to customize its behavior. I am facing two problems as follows:
1) I want to set SpinIncrement as 3. If I set it, it throws an error.
2) I also want to set if user click on on up/down only month portion of the date will be incremented or decremented.
So please help me..
Thanks,
Samaresh
Hi Samaresh,
samareshmandal said:1) I want to set SpinIncrement as 3. If I set it, it throws an error.
What is the error?
And what do you want the spin increment to be? 3 what? Days, months, years?
What exactly are you setting the SpinIncrement property on? The grid column has no such property, so I assume you must be using an editor or editor control.
samareshmandal said:2) I also want to set if user click on on up/down only month portion of the date will be incremented or decremented.
Do you want to change the selection behavior? So that the month spins no matter where the cursor is?
Hi Mike,
Thanks for your reply.
I here by sending piece of code what I try to use
_ugbandTradesList0.Columns[BulkTradeEntity.Cn.Maturity].Style = ColumnStyle.DateWithSpin; DateTimeEditor dateTimeEditor = (DateTimeEditor)_ugbandTradesList0.Columns[BulkTradeEntity.Cn.Maturity].Editor; dateTimeEditor.SpinWrap=true; dateTimeEditor.SpinIncrement = 3;
If I set SpinIncrement then it fires error when I am clicking on spin up/down, if I don't set then its work fine. Another thing is that I want to set SpinIncrement on Month, not on day and year, looking for your kind help.
Okay, 3 is not valid, because the DateTimeEditor does not know what to do with a number. Is it 3 years, 3 months, etc."
So what you have to do is give it more context. We have a class for specifying date and time increments which you can use for this called DateTimeIncrement.
dateTimeEditor.SpinIncrement = new DateTimeIncrement(0, 3, 0, 0, 0, 0, 0);
It works for me...
Thanks a lot.