|
Try to update the dataset instead of the datatable, and avoind performing dataset acceptchanges. If your Datatable is bound to the control, once you update the adapter, may be the call the binding again.
Ofcourse your best friend is debugging.
|
|
|
|
|
thanks but your solution dos not fix it.
i don't have problem with update dataset or datatable, because both has update as well. but select function dosnt work probably
|
|
|
|
|
hi..
i m using tab control(windows appln.wth C#)
i want to check the entered 3 marks in 3 text boxesin first tab page,whethr any of the txt boxes contain below 100.how to use "or" for this?
and in next tab page i want to print the result according to that in a label or txtbox.
i m new to C# .pls giv idea.
i trie this(below).but not wrking.
int x = Convert.ToInt32(Txtapti.Text);
int y = Convert.ToInt32(Txttech.Text);
int z = Convert.ToInt32(Txteng.Text);
if (x < 70 || y < 70 || z < 70)
{
Txtresult.Text = "candidate failed!";
}
|
|
|
|
|
Hello,
First I have to say that your problem has nothing todo with your subject line. (you have no problem with the tabcontrol)
accessred wrote: but not wrking.
What does it do?
Have you debuged it?
accessred wrote: i trie this(below).
Where have you placed that code?
accessred wrote: Convert.ToInt32(Txtapti.Text);
This is not good, as it will throw an exception if you input a non int string in your textbox.
I would do a int.TryParse if you have .Net > 1.1 or double.TryParse if you have .Net < 2.0.
All the best,
Martin
|
|
|
|
|
m using .Net 2.0. Thnx..
"I am burning...the only thing rest in me is you..."
|
|
|
|
|
Hello,
accessred wrote: m using .Net 2.0.
Ok, but thats the only thing I have not asked!
I don't think that your problem is solved, or am I wrong?
Still waiting for more infos, to help you.
All the best,
Martin
|
|
|
|
|
see..problem may be small..but i m a begnner in coding..thats y..
i 'm having a tab control with three tabpages.in page1,three text boxes are there for each subject marks.all details will be stored in a file that is displayed in 2nd page.third is result page.if any of the entered value is less than 100 then the result page should show the candidate failed. that shud be displayed on a textbox.(txtresult.Text)
it s the problem.
"I am burning...the only thing rest in me is you..."
|
|
|
|
|
Hello,
accessred wrote: problem may be small..but i m a begnner in coding ´
Nothing you have to be ashamed for, everybody started once and had also "small" problems.
accessred wrote: thats y
Don't understand that!
accessred wrote: i 'm having a tab control with three tabpages.in page1,three text boxes are there for each subject marks.all details will be stored in a file that is displayed in 2nd page.third is result page.if any of the entered value is less than 100 then the result page should show the candidate failed. that shud be displayed on a textbox.(txtresult.Text)
it s the problem.
I understood the question also at the first time.
But I asked 3 questions and you answered 0 of them.
So with no more information about your code, we will not be able to help you!
All the best,
Martin
|
|
|
|
|
answers:
1) i debugged the code.when running no error is coming,jus not displaying the result.
2)code placed in
private void Txtresult_TextChanged(object sender, EventArgs e)
3)double.TryParse is not working.error comins as:
"no over load for method tryparse takes 1 arguments"
"I am burning...the only thing rest in me is you..."
|
|
|
|
|
Hello,
accessred wrote: 1) i debugged the code.when running no error is coming,jus not displaying the result.
OK
accessred wrote: 2)code placed in
private void Txtresult_TextChanged(object sender, EventArgs e)
So, I would assume that the code is not executed because you are not changing the code of the result textbox.
You actually whant to write the result to the textbox.
I would think, you should place a button on the page and on Click you execute the code.
accessred wrote: 3)double.TryParse is not working.error comins as:
"no over load for method tryparse takes 1 arguments"
As you said you have .Net 2.0 you could also use the int.TryParse, but here is the way I would do it in .Net 1.1
using System.Globalization;
double d;
int i
if(double.TryParse(label.Text,NumberStyles.Integer, CultureInfo.CurrentCulture, out d))
{
i= Convert.ToInt32(d);
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Hi,
I have a web archive file which I need to send as an email. I need to embedd the content in the mail body instead of sending it as an attachment.
I tried using chilkat.mht's loadFromFile(*.eml), it worked well for some files and it failed for some files. When the file contains images, it is sending them as attachments with empy email body.
Can any one help me in this aspect ?
Many thanks,
Anupama
|
|
|
|
|
I have a DataGridView with all the cells of type DataGridViewTextboxCell I want that when I click a particular cell it will convert to DataGridViewCheckBoxCell. I need help.....
|
|
|
|
|
I tried something like that.
First I tried with CellBeginEdit and CellEndEdit but the ComboBox control didn't appear (just it's editable box). Then I used CellClick and CellValidating. It worked, but I had to solve the "reentrant call" problem - finally I find the solution on the net.
I explained it here: Dynamically change DataGridViewTextBoxCell to DataGridViewComboBoxCell
|
|
|
|
|
how can i convert mm/dd/yyyy hh:mm date format to current computer date format.
i have date and time as string in xml file like 7/4/2007 4:48 PM now i need to match it with cuurent time i.e System.Datetime.Now() if the current computer date time format it like mm-dd-yyy hh:mm(which i am not sure can in any format) so i want to convert my datetime to current computer date time format. How can i achieve it. i am using framework 1.1
|
|
|
|
|
You didn't specify the source of "your" date time format but it really shouldn't matter.
If nothing else you can compare the individual fields.
DateTime tmp = DateTime.Now();
if ( your.year == tmp.year &&
your.month == tmp.month ...
You get the idea.
If you use visual studio put the cursor on DataTime and press F1.
ken.tachyon
|
|
|
|
|
if my date time format is mm/dd/yyyy i.e in xml file and current computer date time format is mm-dd-yyyy can i convert my datetime string to new date time or is it that i have to parse individually year month date hour and minute and then compare
|
|
|
|
|
If you know the input format, you can parse it manually to get the date, month and year. With this, you can construct a DateTime object and convert it to whatever format you please using the ToString() method and its overloads. Alternatively, you could just build the date string you need using the date, month and year that you've extracted.
A word of advice - if you're exchanging data between different apps, the ISO format (yyyy-MM-dd) is the only sane thing to use.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
I tried to reply to your email but had a display name problem and could not.
If you are still having problems send an email to this message giving me a sample of
the code you are having the problem with.
I will be able to look at it and respond to you then.
|
|
|
|
|
Try: DateTime.ParseExact() That takes the date/time as string and the format as string array.
Mohamed Gouda
Egypt
|
|
|
|
|
justintimberlake wrote: how can i convert mm/dd/yyyy hh:mm date format to current computer date format
<br />
string your_string_XML_Date =your_XML_Date.ToString(CultureInfo.CurrentCulture);<br />
string currentDateTime = DateTime.Now.ToString(CultureInfo.CurrentCulture);<br />
<code><br />
<br />
Hope that helped<br />
Nassos <br />
<br />
<div class="ForumSig">GanDad</div>
|
|
|
|
|
Hi,
I'm using the RKLib component for exporting the data to excel for quite some time. It's perfectly working fine for me till this time.
Recently I have used the same in another application which contains a dataset(C# appln.) having less than 5000 rows. The issue here is it is taking 1 hr to write it to excel. The dataset contains 30 columns and majority of them are of string data type. Is there any workaround for this so that it will be reduced to maximum 3 minutes. For this application the no. of rows may increase in future. In such a case, I cannot use this component.
Can anybody please help me in this regard?
Thanks
Meeram395
Meeram395
|
|
|
|
|
Do you mean this[^] RKLib? If so, then the source is there so you could go over it with a fine toothed comb to see if there is anything slowing it down design-wise or if there are any modifications you can make to improve it's speed efficiency.
I haven't used that package before so personally I can't speak to its quality. Usually I recommend using the COM Interop[^] capabilities of MS Office to do Excel reading/writing but I've found that it isn't the best performer when it comes to time either.
It seems that you might have to just face the facts here - you're exporting 15,000 strings to an Excel sheet and that's going to take some time no matter what tools you use to do it.
Look at it this way: it takes about an hour for your app to push that dataset into an Excel file, how long would it take to do it manually? If if your app takes an hour, you're still probably getting some pretty nice time savings
|
|
|
|
|
Just curious what I can't do with Visual C# 2005 Express that I could do with VS.NET? Are VSS & database designer the main differences?
I use Subversion, so VSS integration is not an issue.
I just wonder what the compelling reason to upgrade would be?
"For fifty bucks I'd put my face in their soup and blow." - George Costanza CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
|
|
|
|
|
Can't create multiple projects in the same solution.
There's no Threads window when you're debugging.
No Crystal Reports.
No addin support.
... and some stuff like that.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Thanks for the answer. 5 from me.
"For fifty bucks I'd put my face in their soup and blow." - George Costanza CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
|
|
|
|