andyhill Posted August 6, 2020 Share Posted August 6, 2020 I have a DBGrid with a TUniNumberEdit Editor for Floating Numbers set to 2 Decimal places that fails to paint only 2 decimal places, please advise - thanks. // GST nmInvEdit2.Alignment:= taRightJustify; nmInvEdit2.AllowBlank:= False; nmInvEdit2.DecimalSeparator:= '.'; nmInvEdit2.DecimalPrecision:= 2; // GST Columns.Add; Columns.Items[i].FieldName:= 'GST'; Columns.Items[i].Visible:= True; Columns.Items[i].Title.Alignment:= taRightJustify; Columns.Items[i].Title.Caption:= '$GST'; Columns.Items[i].Width:= 100; Columns.Items[i].Editor:= nmInvEdit2; //Columns.Items[i].Flex:= 1; Columns.Items[i].Font.Color:= clBlack; Columns.Items[i].Sortable:= True; Columns.Items[i].ShowSummary:= False; Link to comment Share on other sites More sharing options...
andyhill Posted August 7, 2020 Author Share Posted August 7, 2020 Sherzod, Farshad, please provide work around that makes UniNumberEdit used in DBGrid as an Editor paint the 2 decimal places (as programmed) - URGENT. Link to comment Share on other sites More sharing options...
andyhill Posted August 7, 2020 Author Share Posted August 7, 2020 When the grid is first loaded from the data-source more than 2 decimal places are shown. If I edit then after post the 2 decimal place rule is adhered to. How do I make the grid on first load paint the 2 decimal place rule ? Link to comment Share on other sites More sharing options...
andyhill Posted August 7, 2020 Author Share Posted August 7, 2020 Please provide a work around ASAP - Thank You. (need grid Number Editors repainted after page loaded) Link to comment Share on other sites More sharing options...
andyhill Posted August 8, 2020 Author Share Posted August 8, 2020 Sherzod, Farshad - please advise Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted August 8, 2020 Share Posted August 8, 2020 On 8/6/2020 at 12:40 AM, andyhill said: I have a DBGrid with a TUniNumberEdit Editor for Floating Numbers set to 2 Decimal places that fails to paint only 2 decimal places, please advise - thanks. // GST nmInvEdit2.Alignment:= taRightJustify; nmInvEdit2.AllowBlank:= False; nmInvEdit2.DecimalSeparator:= '.'; nmInvEdit2.DecimalPrecision:= 2; // GST Columns.Add; Columns.Items[i].FieldName:= 'GST'; Columns.Items[i].Visible:= True; Columns.Items[i].Title.Alignment:= taRightJustify; Columns.Items[i].Title.Caption:= '$GST'; Columns.Items[i].Width:= 100; Columns.Items[i].Editor:= nmInvEdit2; //Columns.Items[i].Flex:= 1; Columns.Items[i].Font.Color:= clBlack; Columns.Items[i].Sortable:= True; Columns.Items[i].ShowSummary:= False; Hi, I can't reproduce the issue. Can you please attach a test case? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now