Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

SQL datatable with Gridview

$
0
0

My Source:

DataTable groups = new DataTable();

SqlDataAdapter adapter = new SqlDataAdapter("SELECT Name, Group_ID FROM Groups", con);

adapter.Fill(groups);

GridView1.DataSource = groups;
GridView1.DataBind();

Question: I want to add a new column containing a button that when clicked will retrieve the Group_ID.

Appreciate the help cause I am going around in loop and I am not an expert YET :) Thanks in advance. 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>