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
Nirmal Roy
NA
365
29.4k
Data grid Bonding Error
Aug 24 2016 2:32 AM
private void dataRepeater1_DrawItem(object sender, Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs e)<br /> {<br /> Label txtExample = (Label)e.DataRepeaterItem.Controls["label1"] as Label;<br /> Label label2 = (Label)e.DataRepeaterItem.Controls["label2"] as Label;<br /> Label label3 = (Label)e.DataRepeaterItem.Controls["label3"] as Label;<br /> Label label4 = (Label)e.DataRepeaterItem.Controls["label4"] as Label;<br /> var grid = e.DataRepeaterItem.Controls["dataGridView1"] as DataGridView;<br /> if (txtExample.Text != null && label2.Text != null && label3.Text != null && label4.Text != null)<br /> {<br /> SqlDataAdapter daa = new SqlDataAdapter(@"select Question,Fullmarks from dbo.tbl_QuestionConfig where Sectiontype='" + label2.Text + "' and Questiontype='" + label3.Text + "' and Subject='" + label4.Text + "'", con);<br /> DataTable dtt = new DataTable();<br /> daa.Fill(dtt);<br /> if (dtt.Rows.Count > 0)<br /> {<br /> dataGridView1.DataSource = dtt;<br /> dataGridView1.AutoGenerateColumns = false;<br /> dataGridView1.EnableHeadersVisualStyles = false;<br /> dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.LightSeaGreen;<br /> foreach (DataGridViewRow r in dataGridView1.Rows)<br /> {<br /> r.DefaultCellStyle.BackColor = Color.LightCyan;<br /> }<br /> }<br /> }<br /><div> }</div><div> </div><div> </div><div> </div><div> </div><div> datagrid view binding error.</div>
Reply
Answers (
2
)
How can hide a winform from a different class?
How Save This Screen Vehicle is PK Use C# any bigint 14 No.s