Geeks With Blogs

AzamSharp Some day I will know everything. I hope that day never comes.
You can always access the Datagrid invisible column through looping. Most of the time when you display data in the Datagrid you hide the first column since its a primary key. Now if you want to access that column you can easily use a DataGridItem to loop through each item of the Datagrid. This is not the only method to access the invisible column. If you have a select column in the Datagrid you can use that also.

	private void Button1_Click(object sender, System.EventArgs e)
		{
			foreach(DataGridItem dgi in DataGrid1.Items) 
			{
				Response.Write(dgi.Cells[0].Text); 
			}

		}

Posted on Tuesday, July 26, 2005 12:45 PM | Back to top


Comments on this post: Accessing Invisible Columns of Datagrid ( No big deal !! )

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net