RSS Forums RSS

checking max value while editing in datagrid

Please support our C# advertiser: DiscountASP.NET – 3 Months Free on C# Web Hosting
Thread Solved
Reply
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

  #1  
Nov 20th, 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);
AddThis Social Bookmark Button
Reply With Quote  
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

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

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

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the C# Forum
Views: 465 | Replies: 1 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:21 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC