Gridview with Empty Rows [Resolved]

Posted by Yjeevanrao under Regular Expressions on 9/6/2010 | Points: 10 | Views : 2294 | Status : [Member] | Replies : 1

I want to bind grid view first column with DropdownList and remaining columns should be empty. When i select any one of the item form the dropdownlist it will fill the columns and it will generate new row with dropdownlist and empty rows. I tried for this in different ways i am able to bind the grid with dropdownlist but it display total itmes rows. I want to display at first time only one row. Please advise me. At last when i click on save button those all records will inserted into the database.

I need exactly like this

Product Name Qty Required Remarks
Battery Charger empty empty

But i am getting at first time like this.

Product Name Qty Required Remarks
Battery Charger empty empty
Notepad Pen empty empty
xxx empty empty




Posted by: Shankul2784 on: 9/6/2010 [Member] Bronze | Points: 50



When you want to add the selected dropdown value then you can store it in the datatable & that kept in the session or viewstate. When you are selecting the value add it to the datatable & then bind it to the grid. For empty you can add two other columns.

I hope, this will help you.

Thanks & Regards,


Yjeevanrao, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response