(باستخدام DataSet وt1BindingSource) عند نقر الزر (جلب المعطيات) تُضاف بنود بالأسماء (السجل1، السجل2، ...) إلى combo حسب العدد الكلي للسجلات، وعند اختيار بند يتم الانتقال إلى السجل الموافق. اكتب التعليمات.
أظهر إجابة سلّم التصحيح
private void button1_Click(object sender, EventArgs e)
{
for(int i=1;i<=this.t1BindingSource.Count;i++)
{
comboBox1.Items.Add("السجل"+i);
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.t1BindingSource.Position = comboBox1.SelectedIndex;
}
{
for(int i=1;i<=this.t1BindingSource.Count;i++)
{
comboBox1.Items.Add("السجل"+i);
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.t1BindingSource.Position = comboBox1.SelectedIndex;
}