You must Sign In to post a response.
  • Category: .NET

    How to show gridview dynamically when enter value in textbox and click on submit button

    i have textbox and gridview and asubmit button
    gridview contains textboxes and label controls in it but
    what i want is when enter some value like 4 in textbox dyamically 4 gridview should be displayed
    any body give me some examples or helpme
  • #762668

    Hello Velidi Viram,

    I didn't get your exact requirement. Can you please explain it in deeply or if possible with snap shot (Design of your requirement) so that we can help you in better way.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #762676

    I think this should not be complicated to generate the GridView dynamically based on the number entered in the textbox.
    There are few things which you need to take care while doing implementation of this:
    1. In the button click event, you need to create the instance of the GridViews with dynamic id's
    2. Add each of the gridview to the page using this.Page.Controls.Add(gridview1).
    3. Each gridview should have the location X and Y defined.
    So when you generate the GridView dynamically, you need to provide the location as well which should also be dynamic.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments