How to use DataSource and DataSourceID in gridview

work on c # asp.net vs05.i need to store some value and show them in gridview . So on the button event, I write the code that saves the value and is shown on the gridview. I can store the value, but the problem occurs when shown on the gridview. Also I am using DataSource . I also install GridviewTask-->Choose Data Source--> DataSourceID

because the user needs to edit the information set on the page. after using DataSourceID will show this error message: Both DataSource and DataSourceID are defined in 'GridView2'. Remove one definition.

How can I use both in the same grid view? If I can't? then how to provide the user with this object so that they can edit the information set in the grid without using any other contorl.

+2


source to share


1 answer


You cannot - use DataSource or DataSourceID, but you cannot use both at the same time.

From your question, it is not entirely clear why you would want to use both at the same time. What exactly are you trying to achieve? Please clarify.



Mark

+3


source







All Articles