|
For some reason I was expecting a story about cows.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
KnotBeer wrote: Well, I want to first choose computer or user logs... Got that figured out (duh) but how do I get a dropdown that will list each file so I can open it as a data source and display it? I know how to open and read the files, and all that boring stuff.
To get a list of files, you can use the [Directory.GetFiles^]. I believe this will work with UNC paths as well as local paths. To read the file as a data source you can look at [this^] article.
Hope that helps.
Tanks for your support
Pat O
<a href="http://currentchaos.blogspot.com/">Blog</a>
_ _ _
|
|
|
|
|
I've started using LINQ to get data out of my SQL DB and it workes fine. I load the data and use databinding to get the data in the grid. The code lools like that:
BudgetDataDataContext _budgetDataContext = new BudgetDataDataContext();
bindingSourceNsc.DataSource = from n in _budgetDataContext.Nscs select n;
gridControlTest.DataSource = this.bindingSourceNsc;
The data is shown in the grid. That's fine. Now the user can change values directly in the grid. I'M chatching the event when the change has been made and want to write the new data to the database (update). The code therefore looks like that:
_budgetDataContext.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
The problem now is, that the data in the database is not changed. Can anyone give me a hint what I've done wrong?
BR
Honk
|
|
|
|
|
I'd no expert in Linq-to-SQL, but I'd guess the problem is this:
bindingSourceNsc.DataSource = from n in _budgetDataContext.Nscs select n;
You're essentially saying, "The data source is the result of this query". Since query results are read-only, your changes are getting back into the database.
Have you tried simply:
bindingSourceNsc.DataSource = _budgetDataContext.Nscs;
|
|
|
|
|
hi everybody ,
can anyone tell me what reference should i add to use System.Threading.Tasks ?
Thank you !
|
|
|
|
|
Are you using VS2010 and .NET 4.0?? If not, it doesn't exist in previous version. Considering neither 2010 or .NET 4.0 is out yet, it's unlikely you're using it.
|
|
|
|
|
oh , i see
I had found a tutorial that was mentioning it , and i though it was already there .
Thank you !
|
|
|
|
|
I thought it was also in ParallelFX? I'm not too sure though..
|
|
|
|
|
Probably, but it's more rare to come by in the forums.
|
|
|
|
|
Hi,
I wanted to know if there is any way to call a method from just clicking a radio button without having to click on an apply button.
Thank you
|
|
|
|
|
The Click event may help you here. If you want something more efficient, which isn't called unless the checked value changes, use CheckedChanged or something like that
|
|
|
|
|
Thank you, But I managed to figure it out by myself makes me pround
|
|
|
|
|
Is it possible to open and play mpeg file using aforge.net.
I get an error with the code
FileVideoSourcer vs = new FileVideoSource(Filename);
vs.NewFrame += new NewFrameEvntHander(Video_Frame);
vs.start();
void video_Frame(obj--------)
{
Bitmap bit = events.Frame;
}
Can anyone help me please::
Thank you
|
|
|
|
|
Why don't you ask people who know what aforge,net is ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
I have developed one application, and added it to right click pop-up menu of the folder.
Whenever user right-clicks on folder and selects my application from pop-up menu, I want the path to that folder (on which user has done right click).
I am using Directory.GetCurrentDirectory(), but it gives me path to the parent directory of the user right clicked directory.
How can I get the path to the directory on which user has done right click?
Regards
Abhishek
|
|
|
|
|
Perhaps you could pass the folder name to the application. Presumably, you've added a registry entry in order to allow you to run something from Windows' context menu. Append %1 to the end of the program's registry entry and parse the folder name as a command argument
|
|
|
|
|
Make that "%1" (with the double quotes) so the path is allowed to contain spaces...
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:32 AM
|
|
|
|
|
Thank you very much...
It solved the problem.
Thanks again
Regards
Abhishek
|
|
|
|
|
|
Horrible english, wrong forum, lack of information.
You get an F-, for doing nothing right at all.
|
|
|
|
|
To display PDF documents in my app I use the Adobe Active X component like this:
this.axAcroPDF1.LoadFile(@Filename);
this.axAcroPDF1.Show();
This works great for independent forms, but on a MDI form the component stays blank
After a lot of googling I found this in a VB forum:
================================================================
Your child form cannot directly refrence the Acro object like that.
instead of just using this.
AxAcroPDF1.LoadFile("C:\1.pdf")
you need to do it like this.
Form_ParentFormNameHere.AxAcroPDF1.LoadFile("C:\1.pdf")
=================================================================
I've tried to translate this to C# but have to confess I have no clue how to, and also one of the other messages said this solution doesn't work anyhow.
Anybody knows how to do this ?
Thanks in advance
|
|
|
|
|
Hi all,
I have encountered a rather nasty bug that I have no idea how to fix. I'm getting this exception when trying to create a foreach loop on a COM object. The type I am using for my variable is an interface.
For clarity, here is the basic structure of the code. I am using hte information stored in the individual messages to build a log of the operations performed by my program, which is a batch file verification tool.
foreach (KeyValuePair<fileinfo,> kvp in messages)<br />
{<br />
foreach (IMessage msg in kvp.Value)
{<br />
}<br />
}
The exception is thrown on the cast to IMessage in the second loop. I have tried casting to object as well but get the same error. I have also tried avoiding the foreach loop and working with GetEnumerator() directly (not generic), but the GetEnumerator method fails with the same exception.
Occasionaly, the loop will succeed in the cast, but I get even more obtuse exceptions thrown when I try to use the object. This happens seemingly at random. The exceptions are generally something to do with an unrecognised HRESULT or an unavailable RPC server connection, which makes no sense to me, as the application is stand-alone and does not require net access.
The strangest thing for me is that the code actually works in an older version of the program and there have been minimal changes to the class since then. If anything, it has become simpler to allow me to integrate it with other components and a log viewer.
I have found a proposed solutions on the Internet to import some keys to the registry, but I already have those keys in the correct location, so my problem appears to be different. I have never used InstallShield on this machine, so that can't have corrupted my settings as far as I can tell.
Also perplexing is how my primitive error handling code fails to work, where it once did. I get a null reference after the ErrorPage has been created when calling NavigationService.Navigate.
catch (Exception ex)<br />
{<br />
Debug.WriteLine("Fatal Error Encountered\n\n {0}", ex.Message);<br />
ErrorPage ep = new ErrorPage(ex);<br />
this.NavigationService.Navigate(ep);<br />
IsUIEnabled = true;<br />
}
I'm at a bit of a loss on this. Can anyone help?
.Net 3.5 SP1, Windows XP SP3, Visual Studio 2008 SP1 with a later patch that fixed the intellisense for xaml
|
|
|
|
|
Hi
I have a C# program that runs several threads. each thread prints a documents to a specific print
queue using a PrintDocument.print method. the problem is that after some minutes the application gets
a StartPrintCall not issued exception.
I am trying to locate some info regarding to what is causing this exception and how to solve it.
any help will be great!!!
10'x
|
|
|
|
|
Hi guys,
I m using a datagridview to show some data from sql server database.
I made the rows in designer and bounded the datagridview to my database.
It works great except one thing:
the datagridview gets new columns according the columns to datatable. It doesn't use the columns that i alread made.
I tried 'SELECT ColumnName as datagridViewColumnName' bud still not working.
Anyone a idea how to fix this?
Thanks a lot.
|
|
|
|
|
There is a setting to auto generate columns, turn that off. Then make sure each column is correctly bound.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|