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
480
Formating WebGrid using WebNumericEdit
posted

Hi,

I have a page with a WebNumericEdit control and a grid....

a column with diferent values (1 ... 0,25 ... 0,345678952315 ... 1,05498 ... 400 ...)

I want that when the user enters the page,

the values presented to him be with, let's say, max of 3 decimal digits (in the example above 1 ... 0,25 ... 0,345 ... 1,054 ... 400) and when he enters edit mode, the hole cell value be showed to him...That's the normal behaviour off the grid by using it's column format property..

But I also need that the user see the cell value with a certain cultureInfo....I do that by using a NumericEditControl and then the column shows the hole value all the time.

 Any Ideas???

 

Obs.: I have the following code in UltraWebGrid initialize Layout for the user to see the number formated in his CultureInfo when in editMode:

            System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("pt-BR");
            ci.NumberFormat.NumberDecimalSeparator = ",";

            //Set this property because if not, only 2 digits are showned

            ci.NumberFormat.NumberDecimalDigits = 20;

            WebNumericEdit1.NumberFormat = ci.NumberFormat; 

            UltraWebGrid1.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;
            UltraWebGrid1.Columns[1].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;
            UltraWebGrid1.Columns[1].EditorControlID = WebNumericEdit1.UniqueID;
         

Parents
No Data
Reply Children