I added PercentEditorProvider to Grid, and set it up to be in use for "PROB" column. Somehow it does not display values in the columns as "xxx.xx%" and I can not see why. The values displayed ad just decimal numbers. Blow is mark up, what is missing in the setting ?
<ig:WebDataGrid ID="wdgAllOut" runat="server" Height="160px" Width="800px" AutoGenerateColumns="False" EnableAjax="False" OnRowUpdating="wdgAllOut_RowUpdating" DataKeyFields="idRow" DataMember="LR48OutDtTbl"> <Columns> <ig:BoundDataField DataFieldName="OutcomeDesc" Key="OutcomeDesc" Width="150px"> <Header Text="Outcome" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="OutOrderNo" Key="OutOrderNo" Hidden="True"> <Header Text="OutNum" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="TAX_BEN" Key="TAX_BEN"> <Header Text="Expected Tax Benefit" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="PROB" Key="PROB"> <Header Text="Probabillity of Occurence" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="CUM_PROB" Key="CUM_PROB"> <Header Text="Cummulative probability of occurence" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="FINTAX_BEN" Key="FINTAX_BEN"> <Header Text="FIN48 Tax Benefit" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ORGTAX_BEN" Key="ORGTAX_BEN"> <Header Text="Original Tax Return Benefit" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="RESERVE" Key="RESERVE"> <Header Text="FIN48 Reserve Required" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="idRow" Key="idRow" Hidden="True"> <Header Text="idRow" /> </ig:BoundDataField> </Columns> <EditorProviders> <ig:PercentEditorProvider ID="wdgAllOut_pep01"> <EditorControl ClientIDMode="Predictable"> </EditorControl> </ig:PercentEditorProvider> </EditorProviders> <Behaviors> <ig:Activation> </ig:Activation> <ig:EditingCore AutoCRUD="False"> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="CUM_PROB" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="FINTAX_BEN" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="ORGTAX_BEN" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="RESERVE" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="OutcomeDesc" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="PROB" EditorID="wdgAllOut_pep01" /> </ColumnSettings> <EditModeActions MouseClick="Single" /> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:WebDataGrid>
Dear mcseidel,
Thank you for contacting Infragistics!
We have received your support request concerning using the WebPercentEditor and the values not displaying in "xxx.xx%" format, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and my first question is are you referring to the format while editing or after editing?
Looking forward to hearing from you.
I attached site, if you run it the column "Probability of Occurrence" has Percent Editor Provider set up. I"m not sure if some kind of binding needed, but at the moment it does
not display % sign as plain WebPercentEditor do.. I tried to put grid column name into Value property but it does not accept it.
I need numbers in this column displayed with % sign e.g. '10%'
Hello mcseidel,
Thank you for the update and sample. I have a look at the sample and I have a few questions concerning this matter. Can you please clarify where you would like the percent symbol to be displayed? Do you want it to be displayed pm the column when you are just viewing the data? Do you want the symbol displayed when in edit mode of the cell? If you want it to display on the column when you are viewing values you can use the DataFormatString of the column to format it as a percentage such as the following:
DataFormatString="{0:n2} %"
That would display the number 25 as 25.00%. You can modify the number after the n for the number of decimal places you wish to display. Is this what you are looking for?
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
While the approach that you provided does work, what is the purpose of the PercentEditorProvider. Basically I have removed it from the column and use format string.
Why PercentEdiitorProvider does not show % sign as in stand along box ?
Hello Michael,
In edit mode editor does not show symbol (currency or percent). In display mode grid does not use editor. It formats cells by itself.
Please let me know if I can provide any further assistance.
ok, thanks