
I am a starter with C# . I am in trouble and hope to have the help from you all for the problem in which :
I do not know what this object is and how to create it in gridview for Columntype ( Picture above ): ( It seems both a textbox and a button is in a textbox . When you focus it , it shows as a textbox with a button in the right hand . And it is textbox only if lostfocus )
Sam HobbsPosted Apr 13, 2010, 1:36 AM
This is how you can research things like this. First, in Visual Studio go to the Tools menu and select Spy++. In the Spy++ toolbar is a finder tool; the icon looks like binoculars. In the finder tool, you can drag and drop the mouse to the window you want to know about.
It appears that the property grid is a PropertyGrid control; look at the documentation of that. I don't know anything more about the PropertyGrid control so if you want more information, look in the documentation.
MinhPosted Apr 12, 2010, 11:59 PM
I am sorry if my word is not correct but Infact , what i want is how to create an object of data gridview column as it is in the picture i show from Property window of C# . In my original question i said i do not know what that object is and that is true ( an object with both textbox and button in one ). Anyone who can help me for that trouble ? Thank you in advance .
Sam HobbsPosted Apr 12, 2010, 2:08 PM
MinhPosted Apr 12, 2010, 6:27 AM
http://www.windowsdevelop.com/windows-forms-general/how-to-create-a-custom-datagridview-combobox-column-17.shtml
Jaish MathewsPosted Apr 11, 2010, 1:05 PM
There's no complication. You know datagrid has columns and rows. The secific property you mentioned saying that what could be the default styles of each rows of your datagridview. Once clicked that button on right side, you will get another window. There you need to set the styles llike Font, ForeColor etc... One more such buttons ae normally known as Ellipse in software field ie. one hidden window is there so that you can click and enter values.
You can also access the same property through code. But row by row like below I set the 1st row FontColor using the same property, but using code.
dataGridView1.Rows[0].DefaultCellStyle.ForeColor = Color.Red;
Mark as answered if this was helpful
dataGridView1.Rows[0].DefaultCellStyle