Hey all can you please help me to display the number of records in a datagridview in a combobox

You could handle the RowsAdded and RowsRemoved events, then implement something like this:

private void dataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs args)
{
    textBox.Text = ((DataGridView)sender).Rows.Count;
}

private void dataGridView_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs args)
{
    textBox.Text = ((DataGridView)sender).Rows.Count;
}
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.