|
Hey,
In answering your last question, the 4 dgvs are not displayed at the same time. They are loaded as the user navigates through the dataset. For example, if the user is viewing an "Orders" table and wants to navigate to the "Customers" table, they would click on the dgvlink that says: "Customer Info". That action would cause the "Orders" control to close and the "Customers" control to load.
The reason for different dgvs stored in user controls is because they are all formmatted differently.
For example, when I load the "Customers" control, all column header names, column widths, column order, visibility etc. will be set. Storing this logic for multiple dgvs into one is simple too cluttered.
My only question is how do I make the dgv's underlying datasource recognize data that's entered in a new row when the dgv is disposed. As I have stated earlier, exiting the form automatically saves it but removing the control within the form doesn't. If I only knew what events are occurring when the form closes...
Later,
Richard Blythe
I've used up all my sick days, so today I'm calling in dead.
|
|
|
|
|
ok,
i use more than one dgv but they are in different "pages", so for exemple i add a new record in country_page, exit page, and when i enter customer_page i have a new option (country) in combobox_customercountry.
It seems you need to have all the dgv in the same "page", i never used that before, but i think it doesn´t really matter here to solve problem.
I think it codes the same way!!!
When you say dispose you mean that you disable or set visible=false in dgv, not really dispose it, right?
hey, i dont have a clue, dont get me wrong but, my wild guess is that you are putting more code that you need.
place another post, maybe you will be your answer
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I am currently developing an API, which should be public to a number of vendors.
I have an amount of classes, which I share with one of my coworkers, but in order to minimise the objects/methods e.c.t exposed to our vendors we whould like to devide the common code and specific code into two diffrent namespaces, but I would like to be able to subclass classes from one name space to another even though the classes in the commen namespace is declared internal - does anybody have any ides. If I try I get an compiler error saying that I have Inconsistent accessibility
Thanks in advance
Jakob
|
|
|
|
|
You are probably trying to return an internal class from a public method (or similar).
|
|
|
|
|
Actually no! I really want to subclass my classes in the common namespace, but without having to expose them to my vendors or users of the API.
|
|
|
|
|
The short answer is that you can't. You can't derive from a class that has a more restrictive scope than the child class.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
You could try making the classes public and the methods that you want to be exposed to subclasses protected internal.
|
|
|
|
|
You really can't do it this way. If you want a public class, then the class that it derives from must also be public.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi,
I have a small C# code snippet which i want to Unit test in VSTS 2008 .The problem is i am unable to find teh Unit Testing option in VSTS 2008.
I have searched and didnt get a answer for that.
In VS2008 and 2005 we can access Unit Test from Test Menu,but i cant seem to find teh similar in VSTS 2008.Can anybody provide any links.
Thanks in advance.
modified on Monday, October 6, 2008 10:42 AM
|
|
|
|
|
how to run external applications in c#
|
|
|
|
|
|
abiniyam wrote: how to run external applications in c#
System.Diagnostics.Process
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
how to run exterrnal applications in c#
|
|
|
|
|
Do you want to do this twice?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: Do you want to do this twice?
for (int i = 0 ; i < 2; i++)
{
Process.Start(...);
}
|
|
|
|
|
Hi,
I am trying to recreate a perl script in C# but have a problem creating a checksum value that a target system needs.
In Perl this checksum is calculated using the unpack function:
while (<package>) {
$checksum += unpack("%32C*", $_);
}
$checksum %= 32767;
close(PACKAGE);
}
where PACKAGE is the .tar file input stream
I need to replicate this in C# but can't find a means of replicating that unpack function.
All help appreciated!
(I know there are much better checksum calculations available but can't change target system so can't change calculation)
|
|
|
|
|
|
i need to know how to run flash file inside c#
|
|
|
|
|
Hi
You may try the followign steps:
First you want to add the "Flash" control to the Toolbox:
1) Right-click on the Toolbox, choose "Add/Remove items..."
2) Select the "COM Components" tab
3) Scroll down to "Shockwave Flash Object" and make sure it's ticked
4) Click OK
5) Drag the "Shockwave Flash Object" from the toolbox onto the Form (just like any other control)
6) Righ-click on the new object and select "Properties" to show the custom properties panel.
Please note:
You may not want to hard-code the URL for the moview or file in the properties dialog, so try setting the "Movie" property to something like Application.StartupPath + "\\MyMovie.swf"
If you want to talk to the Flash movie from C# then you need to use the "SetVariable" method
If you want to talk to the host Windows Forms app from Flash, use FSCommand... you'll need to add an event handler in your Windows Forms.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
3 Approaches:
1) Use a COM object that is meant to be used for swf/flv files.
2) Use a converter to convert the swf or flv file into a XAML compliant code file.
3) Integrate a web browser into the application that navigates to the swf or flv file. Keep in mind that the end-user must have the flash player installed for it to work with the web browser control.
Regards,
Thomas Stockwell
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.
Visit my Blog
|
|
|
|
|
hi all!
i'm new to c#. i have a class Item
public class Item
{
ProductName = "";
Quantity = 0;
}
and want to make its array i.e Item[] please help me....
|
|
|
|
|
Item[] myItems = new Item[numberOfElements];
|
|
|
|
|
thanks for reply....
please provide some details i also do this
Item[] it = new Item[5];
but when i try to access its properties it can't
it.ProductName // error occur here Object reference not set to an object...
|
|
|
|
|
fmlove wrote: it.ProductName // error occur here Object reference not set to an object
That's correct. It isn't set to a reference of an object. All you have done is created an array. You haven't populated it with anything.
To populate it you have to set each element with an instance of the class. For example:
it[0] = new Item();
|
|
|
|
|
fmlove wrote: and want to make its array i.e Item[] please help me....
Item[] item = { new Item(), new Item() }; This creates array with two items.
|
|
|
|