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
Venkat S
1.5k
234
202.7k
How to put checkbox in inside datagrid
Jun 23 2011 8:42 AM
Hi Friends,
i have one requirement ie i want put checkbox in datagrid not in datagridview.
i created datagrid table like below.
and you know the solution please modify and send me.
otherwise please give me any idea.
DataTable dt = new DataTable("MyDataTable");
//Create columns and add to DataTable;
DataColumn dcID = new DataColumn("R_NAME");
dt.Columns.Add(dcID); //ID column created and add to DataTable
DataColumn dcSomeText = new DataColumn("R_Check");
dt.Columns.Add(dcSomeText); //LastName column created and add to DataTable
//Now Add some data to the DataTable
DataRow dr;
string[] str11 =new string[ ds.Tables[0].Rows.Count-1];
for (int i = 0; i <= str11.Length; i++)
{
dr = dt.NewRow();
//str11[0] = ds.Tables[0].Rows[i][1].ToString();
dr["R_NAME"] = ds.Tables[0].Rows[i][1].ToString();
dr["R_Check"] = ds.Tables[0].Rows[i][2].ToString() + i;
dt.Rows.Add(dr);
}
return dt;
}
please modify and send me the solution.
Thanks
Venkat.S
Reply
Answers (
2
)
Keeping selected item focused in listbox after postback
CSS File for Asp.net Heaving Basic things.