|
Thanks,
I was more thinking on how to actually write the code to do it
|
|
|
|
|
I have a data grid and in the first column I have a button. When I click on the button event I new the values that are the ceel next too it.
|
|
|
|
|
i have a checkedListBox and a dataGrid, i want to select anything from the list and click a Btn , so the select item goes to the dataGrid
Regards....
code tips are reqired
|
|
|
|
|
costavo wrote: so the select item goes to the dataGrid
Are you trying to manipulate purely on the JavaScript or after a serverside roundtrip?
|
|
|
|
|
no sir, it is pure c# and workin in a windows app.
|
|
|
|
|
I am busy writing the following code and when I built up a header from Data with the following code:
for (int k = 2; k < components.Length; ++k)
{
SourceGrid.Cells.ColumnHeader header1 = new
SourceGrid.Cells.ColumnHeader(components[k].Phase.FullName);
header1.AutomaticSortEnabled = false;
grid1[0, k] = header1;
grid1[x + 5, k ] = new SourceGrid.Cells.CheckBox("", false);
grid1[x + 5, k ] = new SourceGrid.Cells.CheckBox("", false);
How can I use the following code to spam the header columns:
grid1[0, k].ColumnSpan = 2;
|
|
|
|
|
Brother Louis wrote: spam the header columns
Did you mean span the header columns?
I would suggest instead of manipulating the header, you could have fixated it from the Webform part right?
|
|
|
|
|
Please explain I'm lost what you say. It is "Columnspan"
|
|
|
|
|
Hi,
I have written a webservice the purpose being is to convert the sent docu to pdf.
Steps involved are as follows:
1)The to be converted doc is sent to the webservice in the form of bytes
2)In the web service a file is created using the bytes received.
3)This file is then printed using a printer driver(Nova PDF) which saves the sent file in pdf file in required folder.
4)Then the pdf is opened using filestream and then bytes are sent from the web service to the caller.
Problem occurs when large sized files!
I guess even before the filestream is completely done we are trying to read the file again as a resultant it throws an error:
File cannot be accessed as it is being used by another process....
Is there a way that i could do filestream read only once the pdf document is completely loaded by the printer driver?
Thanks,
gauthee
|
|
|
|
|
Did the Writer object close the Stream and got nulled before the StreamReader attempted to open it?
|
|
|
|
|
There is no writerstream!
On sending the file to the printer driver a pdf file is created and saved in respective folder, after this operation(print operation) then iam trying to open the pdf file using the filestream and at this point it thows error:
file cannot be accessed as it is being used by another process.....
gauthee
|
|
|
|
|
Hi,
if your producer does not signal it is done producing the file, the only
things you can do are:
- wait a very long time;
- or loop {wait a short time; try; exit on success;}
BTW: if the web service is going to send the PDF back to the client, it will
have to delete the file also; that too can fail because the file is being
read by another process (Antivirus, Google desktop, whatever).
The remedy is: loop {try; exit on success; wait a short time;}
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
You can use a FileSystemWatcher for this.
This class is used to monitor a certain folder on the filesystem (disk) where your service runs.
It fires events when something changes to the filesystem (eg. file created, renamed, deleted,...)
Say your PDF printer saves the file as c:\temp\pdf\someName.pdf, then you can monitor the c:\temp\pdf folder with the FileSystemWatcher.
When a file is created in that directory (by your pdf printer) an event is thrown. You can catch this event and
then send the newly generated file.
For more info on this class please visit the MSDN site here[^].
Hope this helps!
Tim Wuytens
|
|
|
|
|
Tim,
Thanks for the reply!
It is indeed a valid suggestion, though i have few questions.
When the PDF printer starts printing a file would be at a location so the filewatcher checks that a file is created and the event gets fired thereby.
The filewatcher can identify creation, deletion, modification but i guess my requirement is something like creation complete.
Something should be fired once the file is created and completly loaded!
gauthee
|
|
|
|
|
I took a quick look at the documentation of Nova PDF and found that you can catch events from the printer driver self.
There is an event NOVAPDF2_ENDDOC which fires when the job is done. Maybe this could be of use for you?
I've used the PDF document found on http://www.novapdf.com/download/pdf/novasdk.pdf[^]
See on page 28 of this document for the events.
See heading 4.5 on page 20 to see how to register to the events.
There's even something about e-mailing the converted documents in this guide.
Hope this helps as well!
Tim Wuytens
|
|
|
|
|
I have a need to populate a treeview control with a file containing as much as 500,000 lines of data. The data file contains information that could be saved as an Excel .xls file, or a .csv file, or a straight text file. I have a C# project that reads the data from an excel file and populates my treeview control, but it takes FOREVER for just 25,000 lines. And Excel files have the 65K line limit anyway.
Can someone tell me what the fastest methode would be to populate a treeview control with data from a file that could contain as many as a half a million lines or more?
Thanks.
|
|
|
|
|
That would say would be a horrendifying experience to the user loading from a text file considering the largest wait time unless the system had enough powerful horsepowers to process it as if it possessed a magical wand.
|
|
|
|
|
Just a couple of ideas:
1) Call BeginUpdate before you add the nodes and then EndUpdate once you are done.
2) If possible, use the Nodes.AddRange method instead of the Nodes.Add method.
Regardless, half a million lines in a treeview sounds a tad daft...
|
|
|
|
|
I think your approach is wrong here - populating anything user oriented (except my bank account) with 500,000 somethings is pointless. No user would be able to make sense of that much data.
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
I agree. The approach is wrong. There are other approaches that work better. I'm betting that someone somewhere has implemented a control that can keep a portion of the file in the visible window while the user scrolls up or down. It may not be the ideal solution, but it definitely is not the worst.
Phil
|
|
|
|
|
Load it dynamically. On form load, load the first-level tree nodes, and when the user expands and individual node load it's children.
If they are all first-level nodes you have some serious design issues to deal with.
|
|
|
|
|
Hi,
within a single run of your app you can get this for free by creating the
dialog only once, and reusing it over and over.
Across app sessions, you obviously would need to store and retrieve the info
somehow.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hey thanks for the reply,
ofcourse my problem is on Across app sessions,
the problem is when i store the PageSettings
and and set the PageSetupDialog.PageSettings
it shows the default values... and not the values that i have saved.
and im sure that the PageSettings that i have saved in the Properties
do not contain the default values...
maybe when you do PageSetupDialog.PageSettings = somePageSettings;
it doesnt effect the PageSetupDialog... i dont know cause evrything
i do results with displaying the default values again...
Net
|
|
|
|
|
Hi,
Can anybody please assist me with the following.I have googled but no luck.
I receive a dataset from a webservice which contains all data i requested. How can I simply insert all the rows which are in the dataset into SQL database?
The dataset contains three tables and the sql database destination has the exact same tables and columns.
any help, suggestions or articles will be greatly appreciated.
|
|
|
|
|