Results 1 to 2 of 2

Thread: Change whole row's celltemplate

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2007
    Posts
    103

    Change whole row's celltemplate

    EDIT: forgot to specify in title, vb.net 2008

    Ok so currently I have a dataGridView which contains columns, some of which are image columns and the rest text box columns, and my question is how do I change the first row in my dataGridView to be all text box during runtime. I am making a small csv editing too and I want users to be able to edit the column headers so I am moving them down to be normal cells (as I have already done with the row headers) thus allowing the users to edit them (if there is a way to let users edit row and column headers then this would fix my problem also.

    Thanks for any help will rep the solution (unless it's jmcihinnily as I have repped him too many times in a row )

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Change whole row's celltemplate

    You need to create new DataGridViewTextBoxCell objects and assign them to the items of the row's Cells collection.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width