Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

DataGridView Cell - How to set Watermark text in Datagridview cell in C# window application

$
0
0

Hi,

I am using window application. I want to use some cell in the columns as watermark text.

What is the syntax for that and how can we set this function in Win App c#.

My code :

 if ((dtGrid1[1,cnt].Value != null))
 {
                        dtGrid1[2,cnt].ReadOnly = false;
dtGrid1[2,cnt].value = "Enter" // Here i want watermark text for Enter
                        dtGrid1[2,cnt].Style.BackColor = Color.DarkGray;
                        dtGrid1.UpdateCellValue(2,cnt);
 }


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>