CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    106

    datagridview change value in cell in editmode programmatically

    Version : C# 2008 express

    I have a datagridview with one row.
    When I am in cell 3 I enter editmode and type something, eg 6
    Now when I press F2 of F5 a new window has to open with the text from the cell as parameter
    First I could also not get the keyevents from the datagridview, so I set formpreview to true and used the keyevents from the form instead, that part also does work.

    In that form I get a list of id numbers starting with that 6 (but its all string values)
    If I click a value of that list the form has to close (dialogresultok) and passing the value to the parent form (e.g. 60003)
    Now I want to have that value entered into the cell I pressed F2/F5 in.
    And thats the part that does not work.
    Also tried with EditedFormattedValue, but that seems to be read-only

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: datagridview change value in cell in editmode programmatically

    As nobody knows what you have coded you will need to do a short demoproject zip it and post it so we can look at what you have done and whats needed to do to get it working. a description alone per sure is to less to help you in your case.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

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

Featured