Jump to content

Grincontrol Decimal Columns


korasoglu
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 hafta sonra ...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...