|
|
You beat me to it, great answer.
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!"
— Hunter S. Thompson
|
|
|
|
|
One other thing to try is to have readily instantiated controls at hand positioning them dynamically as needed filling them with data and the making them visible.
Just a thought.
Cheers!
|
|
|
|
|
You can try using virtual mode:
http://msdn.microsoft.com/en-us/library/ms171622.aspx[^]
At my previous company it was a requirement for DataGridView's due to performance reasons.
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!"
— Hunter S. Thompson
|
|
|
|
|
Is there any better way in c# to check items in a collection contains common property
besides looping through with a flag and finding out?
say for example, a text item collection contains fontweight bold for all text item
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Not really. You may be able to do it with Linq, but how to do that will depend on the items you are talking about.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
|
Add a break :
textBold.Checked = true;
foreach (Item item in Items)
{
if (item.FontWeight == FontWeights.Normal)
{
textBold.Checked = false;
break;
}
} As I said, you could do it with Linq:
int normal = Items.Count(item => item.FontWeight == FontWeights.Normal);
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
thanks a lot.
implemented by storing the item properties in a list
and list.contains(FontWeights.Normal). it worked.
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Now the solution doesn't make much sense because you've removed a link in the chain. Other people might have found this useful, but you've made it hard for them.
Never, ever, remove a message that's been replied to.
|
|
|
|
|
I agree, however IMO you're asking the wrong person. It is Chris who simply shouldn't present a "Delete" widget for messages that have replies. I have asked him many times, he eventually fixed half of it (the top level message).
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I know. I was going to post a request and then thought, what's the point - it's been asked for before and still isn't here.
|
|
|
|
|
I've asked for it on Q&A as well a few times - it really annoys me when you answer a question and it gets deleted because they (presumably) don't want the answer to help anyone else...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
I remember some sites where it was expected to remove a problem once it got solved.
CP however doesn't expect that; it does offer a "Delete" widget, and when used, you're bound to get "don't do that" comments. Pretty confusing if you ask me.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Yes, and I have no problem with it's existence. If you post a stupid question, and that makes you realise just how dumb you have been, then deleting it before anyone notices or answers is fine by me.
But, when it is a complicated answer that can take half an hour to get right, and the OP deletes it as soon as he reads it, that does annoy me, I admit.
If nothing else, it doesn't appear in any list I can access to copy it or refer anyone else to next time...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
sorry, not intended to remove. it was a mistake.
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
im using c#.net to create a system, then the problem is i want to connect in online mysql database to store data through internet but i ddnt know how to do it.. there's someone how to do it?.. pls help me.. give some link or sample code.. thnx...
|
|
|
|
|
Assuming the database is on the webserver, just connect to it as if it was your local machine in the codebehind.
using (MySqlConnection con = new MySqlConnection(connectionString))
{
con.Open();
using (MySqlCommand com = new MySqlCommand("SELECT * FROM Customers ORDER BY Year(date), Month(date), Day(date)", con))
{
MySqlDataReader r = com.ExecuteReader();
while (r.Read())
{
}
}
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
nEar_mO wrote: i want to connect in online mysql database
You want to store data from an app that's running local, in the database of a webhost? Those databases are often behind a firewall, it might not be possible to connect to it directly.
An alternative would be using webservices
I are Troll
|
|
|
|
|
how to use web services?...
|
|
|
|
|
|
You'll have to write them. The w3schools[^] website has a good explanation on what it is and how you build them
I are Troll
|
|
|
|
|
|
i wanted to create a system for the server that can manipulate multiple computers through network.. it is possible that the server can manipulate the users computer without a system software for the users?...
|
|
|
|
|
No.
Security concerns prohibit that - as do firewalls, etc., etc.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|