|
or even use the Intelisense of an IDE, there all pretty self explainitory methods and functions lol
but hey, as im sure you know already, there are alot of people on these forums that just are'nt cut out for this kind of 'hard' work
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
kanchoette wrote: if (element.Value.ToString().ToLower() == "home owner")
if (element.Value.ToString().ToLower().Contains ( "home owner") )
|
|
|
|
|
Hi,
I need to use the System.Printing.Activation dll bu I'm unabled to find it in the .NET Framework 3.5 in my VS 2008 environnement
I was searching on the net but I can't find it and I saw no other case like mine. Did somebody have tehe same problem I have.
Please help me.
Regards.
|
|
|
|
|
I just found an answer. This dll is include into the ReachFramework.dll
thanks.
|
|
|
|
|
This namespace is found in these assemblies:
System.Printing.dll
|
|
|
|
|
not exactly, i needed to add a reference to the ReachFramework.dll because the System.Printing.dll doesn't contain it
|
|
|
|
|
Perhaps it was once in System.Printing.dll before, This[^] was one of 2 hits from google for "System.Printing.Activation" (with quotes), but I guess you're right, good find!
|
|
|
|
|
Ahh A little more searching took me to here,[^] which shows the dll you spoke of also listed as containing that namespace.
Good job
|
|
|
|
|
Thank you for your interest and your involvement.
|
|
|
|
|
Hi.
I wanna know , Can we change amount of a const variable at run time for ever.
I mean , when we change the amount, it will be firm even after closing and running the Application again.
Thanks
|
|
|
|
|
You can use readonly instead of const and you can save that value in an XML file, txt, database etc.
Hope this helps
|
|
|
|
|
Hi,
I believe changing a CONST type in the runtime is merely impossible... because its a compile-time constanst...
If you want to assign a value at runtime only for once and after if you want to deny any changes then you can use readonly.
However all this concepts are valid only when the assembly is loaded in to the memory.. means only while the application is running.... Once the application is stopped then, all the variables and objects in the program is lost whatever the type(CONST or ReadOnly doesnt matter).
If you want to retain the changes even after the application is closed, then saving the data in a separate file and accessing it, as and when required is the possible solution.
Have a Happy Coding.....
|
|
|
|
|
You can distribute the source file with the application, include some code to parse the source, find the text where the const variable is defined and change it. Then your program merely has to rebuild itself, exit and start the new version.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Hi guys,
I've got a windows form with a datagridview linked to an access database. The third column in the datagridview is a list of numeric values. On load up I would like a textbox to display the average of all the values in this column. Can't quite figure it out.
Here's the code I have written:
<br />
int Counter = 0;<br />
double AverageCalc = 0;<br />
<br />
while (Counter < datagridview.Rows.Count)<br />
{<br />
string Average = null;<br />
Average = datagridview.SelectedRows[Counter].Cells[2].Value.ToString();<br />
AverageCalc = AverageCalc + Convert.ToDouble(Average);<br />
Counter++;<br />
}<br />
<br />
AverageCalc = AverageCalc / datagridview.Rows.Count;<br />
txtAverage.Text = AverageCalc.ToString();<br />
It loops through once, and then fails at:
Average = datagridview.SelectedRows[Counter].Cells[2].Value.ToString();
When Counter = 1
I'm not really sure what else to try, any advise would be greatly appreciated.
Thanks
Martin
modified on Wednesday, April 8, 2009 9:24 AM
|
|
|
|
|
its because you have only one row SELECTED and you are looping through all rows in datagridview
try
Average = datagridview.Rows[Counter].Cells[2].Value.ToString();
to loop through all rows
or
while (Counter < datagridview.SelectedRows.Count)
to loop only through selected rows
|
|
|
|
|
Oops I missed that out
|
|
|
|
|
Thanks alot, I knew it would be something simple like that.
|
|
|
|
|
It fails because ?
What is the exception ?
|
|
|
|
|
Hi,
I have a combo box which I am populating dynamically using Datatables.
The combobox acts as a selection point from where a user selects a value and accordingly charts are generated..!
The column i am populating changes dynamically and is never the same.
Now I want to add another option "ALL" in the combo box after/before I populate the combobox...such that my combo box should have all the values frm table as well as an item " ALL " I tried doing it, but it shows error.
Can anyone help me out please. how should i go abt it..?
I am making a Windows Application using C#.
Cheers
Jimish
|
|
|
|
|
One thing you could do is to modify the SQL query so that 'ALL' is in the datatable.
I.e. " SELECT Value1 FROM Table1 UNION ALL SELECT 'ALL' "
Then the option value will be in the datatable and you can select it.
|
|
|
|
|
Query input must contain at least one table or query.
It shows the above error..!
Jimish
|
|
|
|
|
Hi,
After binding your datatable / dataset to Combobox. Add below line.
cmBOX.Items.Insert(0,"ALL");
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I had tried it earlier..but it shows the following error..:
Items collection cannot be modified when the DataSource property is set.
Jimish
|
|
|
|
|
Hi,
This might be the simplest thing ever. However.....
Our team have used SQL Reporting many times using a web page for the client to go to and select a report and a day from a calendar control then ping... a report opens in Excel and the client saves it on their PC.
What if I want to show the report in the space on my webpage below the calender and the 'select the report you want' dropdown menu. For the report to be inside my webpage?
Can I do this? We have only ever called ReportCommon.ExecuteExcel in our C# code behind page.
Even the report opening in it's own browser would be OK I guess but to the screen better.
Any thanks gladly received
Harvey
|
|
|
|
|
how to add tool tip, each items of combobox?
best Regards.
Tayfun
ISTANBUL/TURKEY
|
|
|
|