Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1540
UltraGrid Cell (Not Column) Format
posted

Hello!!

I have a WinGrid on my APP and on my CellClick Event I need to change the type of component of the cell and not all column.

I've just read http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=1744 and other articles but it just explain me how to change de component tyoe of all column and I don't want it.

I tried to use the Style feature: e.Cell.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double; but it doesn't work for me because it only format the number after the user insert it. I need to have a cell that doesn't let the user insert "wrong" charaters.

Now, I'm using a solution that I read on this forum:

private UltraNumericEditor setControlToNumeric(object min, object max, NumericType type)
{
UltraNumericEditor numericEditor = new UltraNumericEditor();
numericEditor.MinValue = min;
numericEditor.MaxValue = max;
numericEditor.NumericType = type;
numericEditor.PromptChar = ' ';

return numericEditor;

}

On my ClickCell Event:

case ("DECIMAL"):

e.Cell.EditorComponent = setControlToNumeric(0, 100, NumericType.Double);

But it doesn't let me edit my cell.. it seems like the cell it set to disable.

Can you help me ?

Thank you.

best regards,

Maria