Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to point to a value in listbox with the text entered in datagridview column...
Posted

1 solution

Dear Meenakshi,

You can write the code on the Data grid view CellEndEdit and then you can retrieve the value of the text entered after this you can apply a foreach loop on the list items in the ListBox and highlight the matching item.

for e.g.

private void dgvBookedAnimal_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
         String strItemName=datagridview.Rows[e.RowIndex].Cells["columnName"];
         //now a foreach loop on listbox items for the matching item selection
        }


Hope this will help you out.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900