How to add usercontrol to a datagridview row dynamically in c#.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vajrala Narendra
    New Member
    • Jun 2007
    • 73

    How to add usercontrol to a datagridview row dynamically in c#.net

    Hi all,
    in C#.net 3.5, windows application
    How can i add a user control to Datagridview row dynamically?

    suppose i have a usercontrol with textbox and button
    i want to add this control(textbox , button) to each row of datagridview
    is it possible in windows application?

    If any one knows please Share somecoding.


    Thanks in Advance
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    First try - then ask for help

    Here we go again. I know I've said this to you before. You need to make an effort to do a little research and some experiementatio n before you just ask people to give you code for your needs.

    Originally posted by Original Poster
    Can anybody send me code to [...]
    The Bytes volunteers are not here to write your code for you.
    Bytes is very much a "Give me a fish I eat for a day. Teach me to fish I eat for a lifetime" kind of place. Just giving you the code doesn't help you learn near as effectively as good old-fashioned trial and error.

    Do a little reading up and experimenting then if your trials aren't doing what you expect, post the code and relevant messages/errors and we'll see what we can do to point you in the right direction for making it work.

    Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.

    You need to take it upon yourself to
    • First: Do some research. I heard about thing thing called Google, or books even.
    • Second: Do some experiments yourself. You will learn so much from actually trying it before throwing up your hands in defeat before even starting.
    • Third: Show the volunteers here the code that you created that was the closest to successful along with relevant errors.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Walk before you can crawl

      Just a suggestion...

      Try to solve one issue at a time, starting with the baby steps.

      First figure out how to dynamically make something simple like a bunch of buttons on a form, before you tackle the more complex things.

      Link back to your thread on how to dynamically make a button.

      Comment

      Working...