-
August 18th, 2011, 01:36 PM
#1
GridView button with condition
I have a gridview with 3 columns Name,Surname,Change(ButtonField column) which is populated from an SqlDataReader with the following code
SqlCommand sqlCommand = new SqlCommand("select * from Empl where userId ='" + userid + "'", sqlConnection);
sqlConnection.Open();
SqlDataReader reader = sqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
In my database there are 4 columns UserId,Name,Surname,Change(bit). How can i show the button change only when Change(bit) column is true inside the database?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|