object og = GridView_EmployeeTimeSheet.DataSource; System.Data.DataTable dt = new System.Data.DataTable(); dt = (System.Data.DataTable)og; but getting null in og(object) and at run time Gridview is showing its requried data
1. Why you want to retrieve data source?
2. How did you set DataSource?
1:- will convert that datatable in HTML Table using and then into pdf
2: datasource is set by calling functions 1 for admin and other is for user based on login gridview will be filled hence want gridview's datasource.
So why get from GridView? Simply get it in some Datatable and use it
hey thanks for replying co-operatly ... but have solved this issue On Some conditions abd used methods directly
Kindly let us know how you solved it
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.