|
how do i do then when i load a form it check the checkbox rather than showing true or false next to it
chkIsFavourite.text = gvdPizza.Rows.[e.Rowsindex].Cells[0].value.tosring()
|
|
|
|
|
Use chkIsFavourite.Checked = True ?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
How can i passing information from the datagrid to datagrid code i used
Collapse | Copy Code
clName.text = dgvSubs.Rows.[e.RowsIndex].Cells[0].Value.Tostring()
error says cannot covert system.windows.form.DatagridViewCell to system.windows.Form.DatagridColumnTextboxes
ClName- is the datagridViewtextboxes that in the datagrid that i want to pass the field to
|
|
|
|
|
Hi Peeps
I created a desktop App and published it with click once, I have a mdf with the published files and I am saving that mdf to a location on my c drive.
I tested the app on 2 different pc's and it works fine but on another pc I get an error, the pc where the error is on does not have SQL installed...
here is my error please help,
Error : a network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Thanks
|
|
|
|
|
You can't just access mdf file. You need to install MSSQL Server on the machine you're installing application or provide access to the server somewhere in the LAN/WAN.
Or if you don't use advanced SQL Server features you can try SQL Server Compact Edition (3.5 or 4.0). This is light version of the SQL Server. It has some limitations, but for some uses it is enough. It can be provided to the end user as 3 or 4 dll libraries.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Thanks for the reply, I understand that but I'm using the prerequisites in the publish properties and I've selected SQL Server Compact 3.5 and SQL Server 2005 Express Edition, isnt that suppose to sort that out for me?
|
|
|
|
|
Aaaa. It should. You didn't mention it in first post Maybe firewall is blocking access to the server?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Sorry , but its not going to a server, let me explain in detail...
after you installed the app from the network you login on the program then a mdf is saved to that users's pc, so the program reads from that mdf file on that users's c drive
|
|
|
|
|
This is starting to be interesting
The error message you get looks as if the application tried to connect to SQL Server (not using express edition).
Maybe your app.config has some error (for example you don't set provider or something like this).
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
No beleive me everything is in there, appconfig etc.
This is one of those things I cant get my head around
here is my appconfig : <add name="ConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Folder\Databse\File.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
|
|
|
|
|
You're using SQL Server. ./SQLEXPRESS in DataSource indicates instance of SQL Server. Check the firewall settings and if the SQL service is up. And if the instance of the SQL Server on the machine is named SQLEXPRESS.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
1, caculate th EPF in basic salary,
2, reduction in the salary,
3, up to 75% working day count the per month bonus ruppess 90,
4, less to 75% working day count the per month bonus ruppess 90,
5, in form include the attentance
finaly calculate th enet salary..........
|
|
|
|
|
Ok, this is what you need, but what are you expecting here? Nobody will do the work for you!
|
|
|
|
|
Well, you have the basics of a design there. You need to flesh it out a bit.
"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
|
|
|
|
|
What have you tried so far?
|
|
|
|
|
Real programmers don't work for ruppess.
|
|
|
|
|
I disagree.
I work to pay for games.
I like Zelda.
So I work to pay to get Zelda.
The currency in Zelda games is usually rupees.
Ergo I do work for rupees.
|
|
|
|
|
Ummm... oookaaayyy... what does that have to do with ruppesses?
|
|
|
|
|
Hi,
How can i change color for statusbar????? winform app.
krishna
|
|
|
|
|
statusStrip1.BackColor = Color.Red;
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi,
I am wondering, is there any technique available to copy an object to another object when the objects are of different class but the signature of these classes are same (100% identical) ? For example, if I have
class A
{
public string Name;
public string EmailAddress;
}
and
class B
{
public string Name;
public string EmailAddress;
}
Now, in my code, I have a::A , b::B .
I want to copy all property values from b to a, but I have to do it manually by iterating all properties of b to a one by one like this.
a.Name = b.Name;
a.EmailAddress = b.EmailAddress;
I wish if there were any techniq to automate this task!! I know about Copy/Cloning techniques where the objects are from same class. But as you see my objects are from different class. If my class were so simply like this, I would not have worried, but my class A and B has around 50 properties which is hard to maintain. So, I would appreciate any idea.
Regards.
|
|
|
|
|
1) you could inherit from the class that has all your properties then still would be able to use reflection or cloning or etc.
2) in each class have the same sub class which will have the same properties so then pass from one to the other either by using reflection or cloning or etc.
3) one way is to use an interface. implement each property that would exist in each class and use reflection to pass the information by going after the interface in both classes.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
modified on Thursday, August 5, 2010 9:03 PM
|
|
|
|
|
Hi,
Thanks for your reply. Actually, my classes are auto generated and I dont have control over them. I mean, my class A is a LINQ to SQL model generated from the dbml file, and class B is a proxy class for a WCF Service. Yeah, I can manipulate those classes manually but it will be hard to maintain when I will update my service reference or dbml file. So, I was looking for some other technique that can take an object of class A and return object of class B where all properties of A is copied to B.
|
|
|
|
|
ah. i would just use reflection then. get all the properites available from class A and then go through all the properties of class B. if there is a match then copy the data from A to B.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
Thanks again. I am not familiar with Reflection. Would you please give me any example snippet Or point me to an article which shows how to do this task as you mentioned ?
|
|
|
|