PC Review


Reply
Thread Tools Rate Thread

DataGridViewColumn CellTemplate Change at run time

 
 
Asfar
Guest
Posts: n/a
 
      23rd Jun 2006
Hi,

I have a column in DataGridView and I wanted to change the CellTemplate
depending on which row of column I am.
Like for the first row I want a TextBox and when I focus the second row I
want a ComboBox.

I have tried changing the CellTemplate of the column at runtime but I get a
invalid cast exception because I have originally created the column as
TextBox column.

Is there a way of doing this?

Thanks,
-Asfar


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CellTemplate. Mr. X. Microsoft C# .NET 0 2nd Sep 2010 10:47 PM
Why did the DataGridViewColumn change Visible ? Arto Viitanen Microsoft Dot NET Framework Forms 0 8th Aug 2008 06:27 AM
Custom DataGridViewColumn tsair Microsoft C# .NET 0 7th Oct 2005 08:11 AM
DataGridViewColumn.DisplayIndex c j anderson, mcp Microsoft VB .NET 0 3rd May 2005 05:45 AM
Bug in DataGridViewColumn.HeaderText Werner Boelen Microsoft VB .NET 1 11th Feb 2005 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:50 AM.