I need some assistance. I have a gridview and there are times that its column is null. When it's null, I want to hide that specific column. Please see pix below:

This is what I started but the result is not nice. Sometimes it disappear and sometimes it doesn't. Worst is, even the column that has value sometimes disappears also.
Thanks for any assistance.

Sagar RanePosted May 21, 2018, 5:06 AM
U can check or validate value in datatable or list and remove particulare unwanted columns from datasource before binding to grid.
Write a method to check and validate the datasource before applying to gridview.