|
Im writing an application that will monitor performance of our server. im using performace counters to achieve this. i was wondering if there is a way to clear performance counters programatically?
Thanks
Kulile --- RSA
|
|
|
|
|
I believe you should be able to set the PerformanceCounter.RawValue property to 0.
Logifusion[^]
|
|
|
|
|
Thanx, will try it now
Kulile --- RSA
|
|
|
|
|
Hi All,
I want to create a datagrid with 4 columns. The third column should have a combo box and the last column should have a checkbox. Its easy to get the checkbox column but how can I create a combo box column. The combo box should be visible always not only when it is selected.
Can any one tell me, how do I place combo box for each cell in third column of a windows datagrid contorl?
Any help is appriciated. Thanks in advance.
Regards
Kais
|
|
|
|
|
This is answer is without having VS in front of me and I didn't program ASP.net for some months so my memory of the terminology is a bit rusty.
Turn your datagrid column into <asp:templatecolumn> , then add an
<itemtemplate></itemtemplate> within the itemtemplate you can add your <ASP:DropDownList> , make sure to add the right events to the dropdownlist. If you want to fill the dropdownlist on runtime, you have to hook up to the itemdatabind (or something like that) event, there every row of the datagrid is being filled.
-- modified at 8:44 Wednesday 21st June, 2006
|
|
|
|
|
Thanks for that suggestion. It works for ASP.NET.
Am developing a windows application and using DataGrid available for winforms.
Is there a why how to do it in winform datagrid control??
Regards
Kais
|
|
|
|
|
I overlooked the "windows" part in the title.
There is a way, but since I don't have VS in front of me, its kind of hard for me to help you. I believe there is already a .NET object made by somebody that does this. I would use reflector and check how the other columns (checkbox, textbox etc) are made, and then in the same way create a dropdownlist column.
|
|
|
|
|
Searching for DataGrid ComboBox[^] gives several results. I think one of those should match your needs.
|
|
|
|
|
Hi.
My application opens xml reports from command line, which generated and executed by another C# programm. So I get file from "main args[]" to open. How to make my application to open new document if it is already launched and new commandline command with arguments executed?
|
|
|
|
|
When your application opens, indicate it somewhere, like a creating a temporary file, with a well-known name, containing the process id of the currently running instance of your program.
When you execute the command line, your program checks for the presence of the file. If it exists adn the process id it contains is still running, use some interprocess communication to tell it to open the new file, then exit from the new command line.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
hi all,
i think everybody in this forum are very busy their jobs.Yes,i have a
problem in opening a pdf file using hyperlink or linkbutton or anything
in .NET.Please tell me some control name by which i can open the PDF file or
Please tell me the steps to be followed to open it.I have delivery of my
project it is very urgent.Please give me solution as early as possible.
Thnak you all in advance.
bye.......
K.vamsee Krishna
|
|
|
|
|
Aspose.PDF[^] has a viewer I think.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
On event LinkClicked use this function : Process.Start("myfile.pdf")
The file is opened with default pdf reader.
|
|
|
|
|
i have a document in crystal report and i want to save that report as pdf, in windows application.. could anybody help me...
|
|
|
|
|
hi
try this
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
ReportDocument pdfReport = new ReportDocument();
pdfReport.Load(myReportFileName);
pdfReport.SetDataSource(myDataSet);
pdfReport.Refresh();
MemoryStream ms = (MemoryStream)pdfReport.ExportToStream(ExportFormatType.PortableDocFormat);
// Write the MemoryStream (i.e. ms) to file
regards
joe
|
|
|
|
|
Don't forget to call Dispose() on the ReportDocument object too.
|
|
|
|
|
how i can make connection between windows form and sql server through code?
|
|
|
|
|
|
hi all,
i am trying to load a page in a webbrowser.
how can i be sure that the page i am trying to open is completely loaded ?
then again i want to refresh that page for couple of times. (but it must be loaded completely before each refresh)
how can i check this ?
help please.
thanks in advance,
bye.
|
|
|
|
|
Monitor the ProgressChanged event, the DocumentCompleted event isn't that reliable I've found, sometimes kicks in too early. Once you've decided the whole page has loaded then you can refresh it and start monitoring again.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
Hi to all,
How/where to add libraries req. for C# project in Visual Studio 2005 framework.
Best Regards & Thanks,
Aniket Salunkhe
|
|
|
|
|
In the solution explorer you can right click on the name of the project and click "Add Reference". I believe that you can also go to the Project item in the menu and select "Add Reference"/
|
|
|
|
|
I am making a form that will will Generate a report. It will display the report from the reporting services.
From that form, I have a preview and print buttons. Preview will display the report.
and print will print the report. Printing of reports would be possible even if the report isn't displayed yet.
How will i print the report though it hasn't beens shown yet?
What could be my possible code for it?
|
|
|
|
|
Hi I've never really understood the use in this peice of code, ive been told its good practice/programming to use it and its been mentioned it had somthing to do with security but personaly i cannot see why.
<br />
private int x;<br />
public int X()<br />
{<br />
get {x}<br />
set {x = value;}<br />
}<br />
(the code might be slightly wrong doing this on the fly)
whats the use in it though surly unless your only using one of the get or the set you might as well just use a public variable that way u decrease on the code thats needed to be written, compiled and read.
any comments would be apreciated
-- modified at 6:16 Wednesday 21st June, 2006
|
|
|
|
|
Yes it is definately good practice. There is a slight mistake in it, it should be
get
{
return x;
}
And no () parentheses after X.
X is called the property of x and the reason it is good practice is because in the GET and SET section you can write code to perform any operation you want. For example, you might have a boolean variable (call it 'ready') in your class and you would only allow users to retrieve the value of x if 'ready' is true. So you could do the following:
get
{
if (ready) return x;
else return 0;
}
The same thing can be applied to the SET section, where you could for instance only allow writing of a value if 'ready' is true:
set
{
if (ready) x = value;
else x=0;
}
Now, if a variable only has a get property, it's said to be read-only. Obvsiously, since you cannot set its value to anything.
I hope this helps a bit.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|