checking max value while editing in datagrid

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Apr 2008
Posts: 9
Reputation: mrkcse is an unknown quantity at this point 
Solved Threads: 0
mrkcse mrkcse is offline Offline
Newbie Poster

checking max value while editing in datagrid

 
0
  #1
Nov 21st, 2008
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);
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: mrkcse is an unknown quantity at this point 
Solved Threads: 0
mrkcse mrkcse is offline Offline
Newbie Poster

Re: checking max value while editing in datagrid

 
0
  #2
Nov 21st, 2008
i have done this by checking condition in key pressevent

if(datagridview.currentcell.editformattedvalue>10000)
{
datagridview.endedit();
}
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC