|
Hi there,
I am relatively new to .Net programming. I've been using the DataGrid to display my Datatables and i really like the way you can easily navigate to child rows in child tables that you've set up in the DataRelations.
But the more I used it the more i found out about its drawbacks and came across the DataGridView. This has been introduced since VS2005 and the .Net 2.0 framework. Now it has many appealing new functions which are very useful to me. But so far i have not been able to find a way to navigate as easily as with the DataGrid.
From examples i have found, to relate the DataGridView to a source you have to use the DataBindings class. This all seems like alot more effort than with the DataGrid where you would just set the .DataSource property.
So my question is, "Is there an equivalent to the .NavigateTo() and .NavigateBack() functions of the DataGrid in the DataGridView? If there isn't, has a common practice of achieving similiar results been found?"
I hope to hear from someone soon,
codeboy1988
|
|
|
|
|
Hi,
I have write an AddInCustomAction that must be performed before the Installation.
I did something like:
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
}
This doesn't work properly.
the file MyFile.txt exists (and so should be removed)
but after installation it still exists!!
Any Idea?
Thanks
|
|
|
|
|
You should show your real code - posting pseudocode won't help us solve the issue.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Sorry, Here is the code:
public override Install(IDictionary stateSaver)
{
String path = this.Context.Parameters["targ"].ToString();
DirectoryInfo dir = new DirectoryInfo(path);
foreach (FileInfo f in dir.GetFiles())
{
if (f.Name == "MyFile.txt")
File.Delete(f.FullName);
}
base.Install(stateSaver);
}
|
|
|
|
|
hello...
i am working in a web application .i need to convert the time like... 5.00PM To 1700
6.10PM To 1810
12.00PM TO 2400 etc...
if there is any funtion that convert aal the time to thi format..and if not then tell me how could I do this...
Thanks in Advance
|
|
|
|
|
Something like this:
public static string ConvertTimeString(string time)
{
return DateTime.ParseExact(
time,
"h.mmtt",
CultureInfo.InvariantCulture).ToString("HHmm");
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
merahul wrote: 12.00PM TO 2400
What? That's not right.
Are you talking about user input? Why not have the user enter the data in the format you require?
|
|
|
|
|
merahul wrote: 12.00PM TO 2400
12PM is 12:00
12AM is 00:00
there is no 24:00 in 24h time
|
|
|
|
|
J4amieC wrote: there is no 24:00 in 24h time
that is debatable[^].
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
They can debate all they want, but 24:00 makes no sense.
|
|
|
|
|
It may have its uses, but I haven't needed it yet.
|
|
|
|
|
J4amieC wrote: there is no 24:00 in 24h time
There is in ISO 8601 (but I don't see why anyone would specify it).
|
|
|
|
|
Hello everyone!
I'm using a WebBrowser control in my app to load a page that updates its content dynamically via Ajax. I need to access the updated content to do some processing, but since the calls are made with Ajax the page doesn't get refreshed and thus the DocumentComplete event doesn't fire.
Is there a way to get notified when a call is made using the XMLHttpRequest object? Some event fires maybe?
Any help will be appreciated,
TIA
Kenia
Kenia
|
|
|
|
|
This topic might helps.But you have to be familar with COM interoparability to try it.
|
|
|
|
|
Hi everyone,
I have a form on my website and I'm thinking about creating a little javascript function to perform validation. I know asp.net has validation built in, but there are some other things I'd like the function to do that can't be done with the asp.net validation plus it's a learning project. I have a button at the end of the form which I would like to call this javascript function which will validate the form input fields, but then after that I'd like it to call the c# code behind which will access the database and do some other server side functions. Is there a way this can be done? Can you attach two "onClick" event handlers to a single button, or do I have to do something with a "hidden button" that is linked to the codebehind and have the javascript "click" it when it's done?
Thanks!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
What you're talking about doing is having the Javascript force a server side post back event. You might want to start looking at websites such as this[^].
|
|
|
|
|
Ah, that's the ticket! I had a general idea of what I needed the browser to do, but just wasn't sure what it was called. Then I tried googling for "javascript to click a hidden button" or "attaching multiple events to a button" but wasn't getting anywhere. Thank's again for the help!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
I also found this site very helpful in understanding the _doPostBack javascript function. aspalliance
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
First, you must understand that when you write javascript code it runs on client side and your c# code runs on server side. So you can have both, client validation written in javascript by attaching code to the onclick event and server validation written in C#. There's no ambiguity if that's what worries you. Hope this helps.
Kenia
|
|
|
|
|
Hi Kenia,
Thanks for taking the time to respond I've done a lot of server side coding but there are some things that I would like to have the browser do without issuing a post back (server side). I was searching on google for a couple of hours before posting my question and I think by that point I was just so confused myself that I didn't word it too well. Turns out I was really just trying to figure out if it was possible to have the javascript do a post back so the server can perform what it needs to do. This way, I can have my submit button run the function on the client, and if there's a problem it can pop up a window right away before ever having to send any info back to the server
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
|
|
|
|
|
Hi,
iam writing for student project an application in c# and there i have to use
a hardwaredriver written in c++.
http://babel.isa.uma.es/mrpt-browse-code/mrpt-0.7.0/samples/HOKUYO_laser_test/test.cpp
including the .h files also available at this site.
Can someone recomend an easy and fast way to do this.
Thanks
|
|
|
|
|
Personally, I would write a wrapper around it in C#. Not necessarily easy or fast but the most flexible in the longrun IMO.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
You got it in 1. If you do it personally, it will be both easy and fast.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
C++/CLI is a good candidate for this. Create a mixed mode assembly using C++/CLI and refer it in your C# project.
|
|
|
|
|
You could create COM component using native C++,register it and and next create runtime callback wrapper for the component.After doing it you could add the RCW assembly to your project and directly use it.It's better than using dllImports beacause it allows easy to use COM/MFC/CRT libraries.
It's much more better C++/CLI because this version is not enough scalable -in fact it consumes a lot of resources for type marshaling.I wrote a sample application using C++/CLI an year ago and I was badly surprised how much memory it requires to run-up to three times more than the same app written in C#.That's why COM is the best solution but it's also the most complicated too.
Regards!
|
|
|
|