I want to display data in gridview according to codition
Suppose user enter throgh salesorder form i.e having salesorderId then gridview wants to display data related to salesorder according to SaleorderId and
suppose user enter throgh Project form i.e having projectrId then gridview wants to display data related to project according to ProjectId.so how can i do this.
1 Replies - 4529 Views - Last Post: 17 April 2008 - 08:50 AM
Replies To: To display data in gridview according to ProjectId or salesorderId
Re: To display data in gridview according to ProjectId or salesorderId
Posted 17 April 2008 - 08:50 AM
Bind the GridView to your data source. Then all you need to do is change the ID value depending on whether you are coming from the salesorder or project form.
To bind to a data source control, set the DataSourceID property of the GridView control to the ID value of the data source control. The GridView control automatically binds to the specified data source control and can take advantage of the data source control's capabilities to perform sorting, updating, deleting, and paging. This is the preferred method to bind to data.
Page 1 of 1