|
What benefit would a DataSet be?
|
|
|
|
|
monu_khan wrote: axPivotTable1.DataSource=(msdatasrc.DataSource)(object)dt;
You can't cast an object to something that it isn't. You can only cast an object to it's actual class, any of it's base classes, or any of the interfaces that it implements.
C# is type safe, so the object contains information about it's actual type. When you do a cast, you cast the reference, but the object still remains the same type. Therefore, when you cast the DataTable reference to object, you get an object reference pointing to a DataTable object. You can't then cast this to msdatasrc.DataSource, as the actual type of the object does not inherit that class.
If the control can't use a DataTable as data source, you have to copy the data from the DataTable into something that the control can use.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Good day,
Any help with writing the code to set up a browser that chooses a file that will later on be used to update a database.
|
|
|
|
|
1: we dont Post like that on a Forum
2: i See its your First day, let me not be hard on you.
3:Did you make any research on google before you post?
4: Lets see what you have done soe far, We cannot do your Job for you.
Hope this help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
System.Windows.Forms.OpenFileDialog?
|
|
|
|
|
How to find out ip address of a listening port.
|
|
|
|
|
lol what?
I know the human being and fish can coexist peacefully. -George Dubya Bush
Don't believe me?
http://politicalhumor.about.com/library/blbushism-fish.htm
|
|
|
|
|
|
I got this from a chat application here on codeproject, there are other ways. Try to download applications in the site.
String GetIP()
{
String strHostName = Dns.GetHostName();
// Find host by name
IPHostEntry iphostentry = Dns.GetHostByName(strHostName);
// Grab the first IP addresses
String IPStr = "";
foreach (IPAddress ipaddress in iphostentry.AddressList)
{
IPStr = ipaddress.ToString();
return IPStr;
}
return IPStr;
}
Good luck
|
|
|
|
|
Hi,
I found this SO dependent solution. Is there a C# native solution to block all keyboard and mouse input?
[DllImport("User32.dll")]
public static extern bool BlockInput(bool enabled);
Thanks,
Dirso
|
|
|
|
|
|
Hi,
I think they all show exactly the same solution I have... did I miss anything? I'll use BlockInput, but I really would like to have a C# native solution instead (so I could also test it under Mono)
Thanks,
Dirso
|
|
|
|
|
My goal is to have a combo box for genders. I need the combo box to display the selected gender. Currently I have a class that has one of it's properties as gender. 1 is supposed to be male and 2 is female. However I am willing to do it however is best. I would like to incorporate binding since that is how I am doing the rest of my app. i.e. text boxes and datepickers etc
|
|
|
|
|
So what is your problem?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
My problem is that the only thing I really know how to do in data binding is to drag an item from the data sources menu to a text box or a date time picker. Here the most important thing is the selection be the selection that has been chosen in the object. Ideally I can just use objects but if I have to I can go with xml, but either way I really need some direction.
|
|
|
|
|
hi
You need to work a little bit on your English,Do it in XML then, but realy i did not understand what you wanted to do.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
In the most simplest form, I want a combobox that will load on a form that will have have a item selected already. In other words lets say it's a male. So in my object it will have gender equal to 1. I want my form to know that when gender = 1, then it will automatically select male. I want to use data binding because thats how I have the rest o my project set up, and I feel that I will just be asking for trouble, if I use databinding for only half. I already know I can do it with if statements.
|
|
|
|
|
I am making a simple reaction game. When the player clicks "Start", i want to display a label that acts as a count down.
Eg:
label.Text = "Ready";<br />
Thread.Sleep(1000);<br />
label.Text = "Steady";<br />
Thread.Sleep(1000);<br />
label.Text = "GO!";
I could do it like the above but I'd rather not use Thread.Sleep .
Does anyone know how I'd go about this?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Use a timer with an interval of 1000 and increment a counter on each tick event, display the correct message depending on the counter value?
Dave
|
|
|
|
|
DaveyM69,
Cheers, i had thought about using a timer, but not the way you suggested.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Writing C# program to search through network for existing listening server's ip addresses and port numbers assuming that ip address and port number for the server was not known.
|
|
|
|
|
loke6258038,
And what help do you need? or do you want someone to give you a complete program?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
system.net namespace will be helpful for you
you can use tcpclient and tcplistner class for your purpose
tips: also use socket,networkstream classes
|
|
|
|
|
General idea...
bool success;
try
{
success = true;
break;
}
catch
{
}
try
{
success = true;
break;
}
catch
{
}
if(success) break;
NB: This will take forever to run unless you're VERY lucky!
Dave
|
|
|
|
|
Search all the web for servers? of what kind? what is your goal?
|
|
|
|