DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   checking max value while editing in datagrid (http://www.daniweb.com/forums/thread158704.html)

mrkcse Nov 21st, 2008 12:11 am
checking max value while editing in datagrid
 
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);

mrkcse Nov 21st, 2008 2:33 am
Re: checking max value while editing in datagrid
 
i have done this by checking condition in key pressevent

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


All times are GMT -4. The time now is 1:13 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC