How to changde datagriview celltemplate run time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mabubakarpk
    New Member
    • Feb 2007
    • 62

    How to changde datagriview celltemplate run time?

    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:
    PendingTestRequ estLisDataGridV iew.Columns(1). CellTemplate = New DataGridViewTex tBoxCell

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

    Any body can help me in this regards,

    Thanks in advance
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Well, instead of using DataGridViewTex tBoxCell, have you tried using a DataGridViewLin kCell instead?

    -Frinny

    Comment

    Working...