Hi,
In my Datagridview contains itemno,itemdescription,quantity,price columns.
this values can view in crystal report.in crystal report only 10 colums can able to view.
so,in item descriptionin cell only 10 lines i have to enter .if it is more than that i want to display messagebox and chance is there for only one item description contails more than 10 lines.In this situation also i want to display error message.
sireesha.c
0
Newbie Poster
Recommended Answers
Jump to PostJust get the description textbox user enters description into and pass it.
int HowManyOccurance(string str, char charToSearchFor) { int numberOfOccurance = 0; CharEnumerator ce = str.GetEnumerator(); while(ce.MoveNext()) { if (ce.Current == charToSearchFor) numberOfOccurance++; } return numberOfOccurance; } { if(HowManyOccurance(yourTextBox.Text, '\n') <=10) MessageBox.Show("Correct"); else MessageBox.Show("Please make it shorter, …
All 3 Replies
Ramy Mahrous
401
Postaholic
Featured Poster
sireesha.c
0
Newbie Poster
Ramy Mahrous
401
Postaholic
Featured Poster
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.