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
vinod jangir
NA
114
9.2k
I want to fill only tow colums from number of 10 colums
Sep 23 2015 4:44 AM
try
{
string connString = @"Data Source=VINODKUMAR;Initial Catalog=ShreeSankalp;Persist Security Info=True;User ID=sa;Password=1234567890";
using (SqlConnection sqlConn = new SqlConnection(connString))
{
string sqlQuery = @"SELECT * from Admission where AdmissionID='" + textBox1.Text + "'";
SqlCommand cnd = new SqlCommand(sqlQuery, sqlConn);
SqlDataAdapter da = new SqlDataAdapter(cnd);
DataTable studentdatabase = new DataTable();
da.Fill(studentdatabase);
var smallList = FeeDEposit.Select(c => new { c.Name, c.Age });
dataGridView1.DataSource = smallList;
dataGridView1.DataSource = new BindingSource(studentdatabase, null);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
MessageBox.Show("Please Enter Admission ID");
}
}
Reply
Answers (
4
)
cannot convert from 'System.Enum' to 'byte'
CSRF