Autor Beitrag
Trombone
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26
Erhaltene Danke: 1



BeitragVerfasst: Do 25.08.11 16:46 
Ich glaube die Überschrift sagt schon alles;)

ausblenden C#-Quelltext
1:
2:
3:
4:
if(dataGridView1.Rows[e.RowIndex].Cells[2].EditType == DataGridViewTextBoxCell)
{
do something
}


so in der art habe ich mir das vorgestellt, ich habe schon alle möglichen Kombinantionen ausprobiert, komme aber nicht weiter... kann mir da mal jemand auf die Sprünge helfen?
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Do 25.08.11 16:56 
Du bekommst da einen Type zurück also musst du das auch mit einem Type vergleichen
Beispielsweise mit typeof(DataGridViewComboBoxEditingControl)
Trombone Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26
Erhaltene Danke: 1



BeitragVerfasst: Do 25.08.11 17:01 
ja, schon von Vorteil wenn man die Syntax beherrscht!
ausblenden C#-Quelltext
1:
2:
3:
if(dataGridView1.Rows[e.RowIndex].Cells[2].EditType != typeof(DataGridViewComboBoxEditingControl))
{
}


Funktioniert, danke;)