TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sudharsan s
NA
204
86.8k
how to set Checkbox in HTML table grid?
Jun 13 2012 5:40 AM
Hi..
I am using HTML table grid .
I want to set check box in first column of grid.
i am using the
append method
to fetch the data from database
here is my code..
public void load_builder()
{
SqlConnection con = new SqlConnection(constring);
con.Open();
string sql = "select category_code,category,created_date from category";
SqlCommand cmd = new SqlCommand(sql, con);
SqlDataReader dr;
dr = cmd.ExecuteReader();
//sb.Append("<tbody>");
while (dr.Read())
{
sb.Append("<tr >");
sb.Append("<td onclick=\"loaddata('" + dr[0].ToString() + "')\">
select
</td>");
sb.Append("<td id='c1" + dr[0].ToString() + "'>" + dr[0].ToString() + "</td>");
sb.Append("<td id='c2" + dr[0].ToString() + "'>" + dr[1].ToString() + "</td>");
sb.Append("<td id='c3" + dr[0].ToString() + "'>" + dr[2].ToString() + "</td>");
sb.Append("</tr>");
}
}
Instead of select i want to set checkbox.
pls help me..
Advanx thx..
Sudharsan S.
Reply
Answers (
1
)
HTML table header height and width
browser compatibility