Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
8441 | Nov 6,2003 06:32 AM UTC | Nov 7,2003 10:21 AM UTC | WinForms | 7 |
![]() |
Tags: GridControl |
grdResults(e.RowIndex, e.ColIndex).CurrencyEdit.CurrencyDecimalDigits = 2
should read
e.Style.CurrencyEdit.CurrencyDecimalDigits = 2
But even changing all your grid(row, col) to e.Style's would not be a good idea. Generally, PrepareViewStyleInfo should only be used to set properties that are special to an individual cell or row. But not used to set column properties as you have in your sample code. Instead, you should use the GridBoundColumn.StyleInfo for that column to set column properties as explained in this kb.
http://www.syncfusion.com/KB/Grid/Grid_c35c.asp#q562q
The reason is that PrepareViewStyleInfo is hit a lot, and for performance considerations, you normally want to minimize the work you do there.
> grdResults(e.RowIndex, e.ColIndex).CurrencyEdit.CurrencyDecimalDigits = 2
>
> should read
>
> e.Style.CurrencyEdit.CurrencyDecimalDigits = 2
>
>
> But even changing all your grid(row, col) to e.Style's would not be a good idea. Generally, PrepareViewStyleInfo should only be used to set properties that are special to an individual cell or row. But not used to set column properties as you have in your sample code. Instead, you should use the GridBoundColumn.StyleInfo for that column to set column properties as explained in this kb.
> http://www.syncfusion.com/KB/Grid/Grid_c35c.asp#q562q
>
> The reason is that PrepareViewStyleInfo is hit a lot, and for performance considerations, you normally want to minimize the work you do there.
>
>
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.