hi all,

I want to restrict user enter upto value 1000 in a datagridview cell editbegin event.How to check this after we set the following.

dataGridViewValueUnits.BeginEdit(true);

i have done this by checking condition in key pressevent

if(datagridview.currentcell.editformattedvalue>10000)
{
datagridview.endedit();
}

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.