korasoglu Posted April 3, 2018 Share Posted April 3, 2018 GrinControl Decimal Columns Sevgili arkadaşlar sql veri tabanından foreach dongü ile Convert.ToDecimal(item["Borc"]).ToString("##,###.00") ile convert yapıp veriyi yüklüyorum sorun yok. Benim sorum daha hızlı olması için direk dönen tabloyu DataSource yaptıktan sonra columnsu ##,###.00 formatında nasıl çevirebilirim. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 11, 2018 Share Posted April 11, 2018 gridView1.Columns[6].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; gridView1.Columns[6].DisplayFormat.FormatString = "N2"; grid'e datasource'u gösterdikten sonra bu şekilde ilgili sütunların direk 12.345,67 şeklinde görüntülenmesini sağlayabilirsiniz. Quote Link to comment Share on other sites More sharing options...
ylmz025 Posted April 11, 2018 Share Posted April 11, 2018 KintaRo üstad kod ile göstermiş ama direk properties penceresinden yaparsanız ekstra kod yazmamış olursunuz. Hangi sütunda görünecekse o veri o sütunun DisplayFormat özelliğini ayarlarsanız olur. Tarih formatlı verileriniz olursa onları da ayrıca o özellik ile ayarlayabilirsiniz. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted April 30, 2018 Share Posted April 30, 2018 evet, benim yöntem unbound gridler için. yani datasource'u sonradan çalışma zamanında gösterilen gridler için. datasource'u dizayn anında gösteriyorsanız editör ile ayarlayabilirsiniz. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.