I have asp.net gridview with 5 textboxes in every row. Page size of gridview is 20 records on each page. I have enabled sorting on every column. When gridview is getting populated, then we are getting 28 filled records and 12 empty records.
When I hit sorting in asc mode on any column, It gives blank rows earlier then records are coming. I wanted to ignore those blank records while sorting.
I tried using custom onsorting method on gridview but its not working.
Cr BhargaviPosted Aug 13, 2023, 8:02 AM
You can take to troubleshoot and potentially resolve the issue:
Data Source Handling: Ensure that you're binding the GridView to a proper data source that does not include the empty records. Check the data source query or collection that you're using to populate the GridView.
Filtering Empty Records: Before binding the data to the GridView, make sure to filter out the empty records from the dataset. You can use LINQ or other methods to remove rows with empty values from the data source.
Debugging: Place breakpoints and debug statements in your data binding, sorting, and paging code to see the flow of data and events. This can help you pinpoint where the issue is occurring and what might be causing it.
Tahir AnsariPosted Aug 11, 2023, 2:15 PM