hi guys am having problem with data binding navigator control. have added data source. here in my case table name is "Event" and table name is "mca1". have set properties of all textboxes nd combo boxes to its repective field. and set bindindNavigator1 binding property to mca1bindingSource. now am getting to errors. project name is student. errors are
1: THe type name 'EventDtaSet1' does not exist in the type 'Student.Student'
The type name 'EventDataSetTableAdapters' does not exist in the type 'Student.Student'.
plze guide me what am missing.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Student
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
        DataTable dt;
        DataRow dr;
        string code;

        private void Form2_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'eventDataSet1.mca1' table. You can move, or remove it, as needed.
            this.mca1TableAdapter.Fill(this.eventDataSet1.mca1);
            textBox1.Enabled = false;
            textBox2.Enabled = false;
            textBox3.Enabled = false;
            textBox4.Enabled = false;
            textBox5.Enabled = false;
            textBox6.Enabled = false;
            comboBox1.Enabled = false;
            comboBox2.Enabled = false;
            comboBox3.Enabled = false;
            comboBox4.Enabled = false;
            button2.Enabled = false;


        }

        private void button1_Click(object sender, EventArgs e)
        {
            button2.Enabled = true;
            textBox1.Enabled = true;
            textBox2.Enabled = true;
            textBox3.Enabled = true;
            textBox4.Enabled = true;
            textBox5.Enabled = true;
            textBox6.Enabled = true;
            comboBox1.Enabled = true;
            comboBox2.Enabled = true;
            comboBox3.Enabled = true;
            comboBox4.Enabled = true;
            dateTimePicker1.Enabled = true;
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
            int ctr, len;
            string codeval;
            dt = eventDataSet1.Tables["mca1"];
            len = dt.Rows.Count - 1;
            dr = dt.Rows[len];
            code = dr["cStudentCode"].ToString();
            codeval = code.Substring(1, 3);
            ctr = Convert.ToInt32(codeval);
            if ((ctr >= 1) && (ctr < 9))
            {
                ctr = ctr + 1;
                textBox1.Text = "C00" + ctr;
            }
            else if ((ctr >= 9) && (ctr < 99))
            {
                ctr = ctr + 1;
                textBox1.Text = "C0" + ctr;
            }
            else if (ctr >= 99)
            {
                ctr = ctr + 1;
                textBox1.Text = "C" + ctr;
            }
            button1.Enabled = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            dt=eventDataSet1.Tables["mca1"];
            dr = dt.NewRow();
            dr[0] = textBox1.Text;
            dr[1] = textBox2.Text;
            dr[3] = textBox3.Text;
            dr[4] = textBox4.Text;
            dr[5] = textBox5.Text;
            dr[6] = comboBox1.SelectedItem;
            dr[7] = comboBox2.SelectedItem;
            dr[8] = dateTimePicker1.Value;
            dr[9] = textBox6.Text;
            dr[10] = comboBox3.SelectedItem;
            dr[11] = comboBox4.SelectedItem;
            dt.Rows.Add(dr);
            mca1TableAdapter.Update(eventDataSet1);
            textBox1.Text = System.Convert.ToString(dr[0]);
            textBox1.Enabled = false;
            textBox2.Enabled = false;
            textBox3.Enabled = false;
            textBox4.Enabled = false;
            textBox5.Enabled = false;
            textBox6.Enabled = false;
            comboBox1.Enabled = false;
            comboBox2.Enabled = false;
            comboBox3.Enabled = false;
            comboBox4.Enabled = false;
            this.mca1TableAdapter.Fill(this.eventDataSet1.mca1);
            button1.Enabled = true;
            button2.Enabled = false;


        }

        private void button3_Click(object sender, EventArgs e)
        {
            string code;
            code = textBox1.Text;
            dr = eventDataSet1.Tables["mca1"].Rows.Find(code);
            dr.Delete();
            mca1TableAdapter.Update(eventDataSet1);
        }

    }
}

You're using a variable that doesn't exist on the type.

The errors are relavent to Student.Student though, not the code you posted, which is Student.Form2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.