Connecting Tech Pros Worldwide Forums | Help | Site Map

How to changde datagriview celltemplate run time?

Member
 
Join Date: Feb 2007
Posts: 53
#1: Jun 15 '09
Hello every one

I am using VS2005 and i have bound the datagridview with data table. I want to change the datagridview celltemplate at run time. I am using the following code

Code:
PendingTestRequestLisDataGridView.Columns(1).CellT emplate = New DataGridViewTextBoxCell

but it gives following error
Value provided for CellTemplate must be of type System.Windows.Forms.DataGridViewLinkCell or derive from it.

Any body can help me in this regards,

Thanks in advance

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Jun 16 '09

re: How to changde datagriview celltemplate run time?


Well, instead of using DataGridViewTextBoxCell, have you tried using a DataGridViewLinkCell instead?

-Frinny
Reply