|
I create a DataSet with 4 tables in it from a mdb file using the Wizard of the VS Express 2008. I have a DataGridView and I display the data of the "Transaction" table. I also have a table with my suppliers called "Suppliers". In "Transaction" table I have a column called "Supplier".
I have enabled the options to add,edit or delete record in the DataSet and to save all the changes back to the mdb file. To provide an easier way for the user to add new records I set "Supplier" columnType in the DataGridView as DataGridViewComboBoxColumn and DisplayMember, DataSource and ValueMember to the "Name" column in the Supplier table so the user can directly select the name name of the supplier without having to type it.
So when I run the program and load the form I get the following error message:
System.ArgumentException: DataGridViewComboBoxCell value is not valid.
Any help would be appreciated....
Thank you
|
|
|
|
|
yeah that DataGridViewComboBoxColumn is a tricky lil bugger!
ive had a problem with mine for almost two weeks now. but my problem is that the table in question references itself
good luck tho
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Check the AutoSizeMode property of your DataGridView .
You may have set some column(s) to expand the column width to fit the data. Depending on what data you have there (or actually you don't have ), you will get that kind of error if the lookup is turned on.
SkyWalker
|
|
|
|
|
Hi all...
I made a program in C# which takes any command and show the output in richtextBox...Everything is working fine except tht whenever i try to run my exe in some different computer it shows different error...In some computer it shows ".Net Framework Error" some computer do nothing i mean when i click on exe it do nothing and in some computer it throws exception...
I've no idea why this is happening...Can someone help me out..Am i missing anything?? I made exe in release mode...
Thnks..
Ash..
|
|
|
|
|
Make sure the different computers have the .NET framework installed and the correct version for your application.
If you make a setup project you can make it detect this and download the framework during install.
Dave
|
|
|
|
|
Thnks all
But it's very small project..It works fine in other PC's having .NET Framework..
Do i need to add some configuration file so that it works fine everywhere without taking care whether .Net Framework is installed or not..
So sorry for simple question...I just start working in c#..
Ash..
|
|
|
|
|
If the correct version of the framework isn't installed it will not run.
If the other PCs are running Vista and your app requires administrator rights then you'll need to add an application manifest so UAC prompts for it to be allowed. I've mentioned this before somewhere, I'll try and find the link.
Dave
|
|
|
|
|
Tht will be very helpful for me..
Thnks..
Ash..
|
|
|
|
|
I can't find it but it's very simple.
How to prompt for UAC elevation in Vista.
In Solution Explorer, right click your project and select Add|New Item. Select Application Manifest File and click Add.
In the app.manifest file, change the line that reads
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
to
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Dave
|
|
|
|
|
I tried dave but it's not working... Now it's not giving any error but showing nothing...
Neverthless thnks..
Ash..
|
|
|
|
|
I think you need to put some try/catch blocks in your app and write any caught exceptions to the event log so you can see what's happening or where it's locking.
Dave
|
|
|
|
|
Yeah i think same...I'll do this and let you know..
Ash..
|
|
|
|
|
Make sure that .Net Framework is installed on each computer where you are deploying your executable. Also, check that there are all the files that are referenced by your program.
|
|
|
|
|
maby the .Net framework isnt installed on the 2nd pc?
or maby the wrong version of it
go
start > Controll Panel > Add Remove Programs
and check if .Net Framework is infact there
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
If (Programming != Your Passion)
{
you.suck = true;
}
else
{
you.suck = false;
}
|
|
|
|
|
HarveySaayman wrote:
If (Programming != Your Passion)
{
you.suck = true;
}
else
{
you.suck = false;
}
Why not make this a one-liner? you.suck = (Programming != Your Passion)
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i have seen the error in my redundant ways
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi All,
As my subject says all that I have been struggling with the same exception as "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".
The scenario is I am using socket programming to send some data to the client machine from my server using a web service. I have tested around 50 odd cases in which the same exception is raised in around 10 cases and rest is delivered successfully.
Can anybody help me out with this exception? Exception details are pasted below -
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)
Thanks in Advance....
Ankur
|
|
|
|
|
Possibly a firewall or antivirus blocking the required port on the clients or the router blocking that port if they are behind one?
Dave
|
|
|
|
|
|
Hi,
I have developed a C#.net windows application and in that one i have used a third party control in it..
For deploying the application i am publishing my application so a setup.exe file is getting created
When i installed it at client side its working fine
My question is ...Why in the Client System ...my system name is appearing ...How to change it
Execution path in client system
start...programs.......my system name...application name
i want to replace that one with some other name
EX :
Present
start.....programs.....Happy...WindowsApplication1
want to change to
start.....programs....Softy.....WindowsApplication1
Plz reply me how to do this
regards sindhu tiwari
its me sid
|
|
|
|
|
Because you built the installer that way. What are you using to make an MSI ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
What i am doing is just right click on the project then i have clicked publish there .............
i am using Visual studio 2005 professional edition
regards
sindhu tiwari
its me sid
|
|
|
|
|
OK, I presume it's assuming that you are the author and want a group created. If there are no options presented, you'll need to use a different tool, like Advanced Installer.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have developed a C#.net windows application and in that one i have used a third party control in it..
For deploying the application i am publishing my application so a setup.exe file is getting created
When i installed it at client side its working fine
My question is ...Why in the Client System ...my system name is appearing ...How to change it
Execution path in client system
start...programs.......my system name...application name
i want to replace that one with some other name
EX :
Present
start.....programs.....Happy...WindowsApplication1
want to change to
start.....programs....Softy.....WindowsApplication1
Plz reply me how to do this
its me sid
|
|
|
|
|
hi,
I do not succeed in allocating a value for the axle x in my graph. I do not succeed in finding correspondence with there vb seriecollection (1) .XValue =
help me i begin in C#!!!!
public void Excel_Graphic(int Lig, int col)
{
string upperLeftCell = "A3";
int endRowNumber = System.Int32.Parse(upperLeftCell.Substring(1))
+ Lig - 1;
char endColumnLetter = System.Convert.ToChar(
Convert.ToInt32(upperLeftCell[0]) + col - 1);
string upperRightCell = System.String.Format("{0}{1}",
endColumnLetter, System.Int32.Parse(upperLeftCell.Substring(1)));
string lowerRightCell = System.String.Format("{0}{1}",
endColumnLetter, endRowNumber);
Worksheet ws = (Worksheet)app.ActiveSheet;
Object Graph1 = new Object();
ChartObjects GraphObjs = (ChartObjects)ws.ChartObjects(Type.Missing);
ChartObject GraphtObj = GraphObjs.Add(100, 20, 300, 300);
Chart xlChart = GraphtObj.Chart;
Range chartRange = ws.get_Range("A2", lowerRightCell);
Range AxeY = ws.get_Range("A2", "A16");
Range AxeX = ws.get_Range("B2", "B16");
xlChart.SetSourceData(AxeY, Type.Missing);
xlChart.ChartType = XlChartType.xlXYScatterLines;
xlChart.Location(XlChartLocation.xlLocationAsNewSheet, Graph1);
}
jere
|
|
|
|