Click here to Skip to main content
15,910,303 members

Comments by Syed Ammar Haider (Top 5 by date)

Syed Ammar Haider 12-Oct-11 6:05am View    
Look man, as you say,
"I have used dataset , bindingsource and dataadapter on the form."

These APIs do not keep track of what is happening in the dataGridView. These are just used to retrieve data. If you want to save data after editing the dataGridView, you have to write the logic manually by yourself. For this please see the events associated with dataGridView.

OR

My suggestion in this regard is to leave the old ADO .Net(technology you are using) and try the new Entity Framework. This can perform automatic updates at the back end database keeping all the changes in the context.

For this, try this link:

http://www.codeproject.com/KB/database/IntroEntityFramework3.aspx

Hope this will help, Good Luck!
Syed Ammar Haider 28-Sep-11 3:37am View    
Yes, its a good practise to be explicit.
Syed Ammar Haider 27-Sep-11 23:53pm View    
Well, to make the application dynamic, you need Sql Server (any edition) except Sql server compact edition. Create a database separately using the Sql Server Management studio, and link it to your application. Here you go!

Please do not forget to mark the post as Answer if you find it useful.

Good Luck!
Syed Ammar Haider 4-Jul-11 2:28am View    
@Christian Graus

There is a requirement to enable and disable this textarea control without updating the whole page. so i need to put it in ajax update pannel.
Syed Ammar Haider 5-May-11 5:36am View    
After a user(student) has logged in.. This is to execute..
SqlDataReader dr;
string sSQLStudent = "select Course.course_code 'Course Code', Course.course_name 'Course Name' from Course, Time_Table where course.course_code = Time_Table.course_code and Time_Table.start_time <= (SELECT CONVERT(TIME,GETDATE()) AS HourMinuteSecond) and Time_Table.end_time >= (SELECT CONVERT(TIME,GETDATE())) and Time_Table.day = (SELECT DATENAME(DW, GETDATE())) and course.course_code in ( select course_code from Student_Course where user_id = '" + Session["sessionLoginUserName"].ToString().Trim() + "')";


SqlCommand cmd = new SqlCommand(sSQLStudent, conn);
dr = cmd.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(dr);
dr.Close();

List<string> courses = new List<string>();
DataTableReader dtr = new DataTableReader(dt);
while(dtr.Read() != false)
{
string a = dtr.GetValue(0).ToString();
courses.Add(a);
}

foreach (string course in courses)
{
List<string> _______ = new List<string>();
}


Now here in ________, how can i add course code retrived from data table and made a separate list for each. Actually its the idea of a virtual class where i need to add students of particular class only. that is why i need to achieve this...