|
Luc Pattyn wrote: And I never understood the advantage, if any, of the banker's rounding.
The advantage is that in the long run it will round up just as many times as down. If you are doing millions of transactions, and the roundings doesn't even out in the end, you may loose a lot of money.
For us non-bankers, consistency makes more sense.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I see. thanks.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I am creating DataGridView dynamically could anybody tell me how to set
tab order for the same.
Truth Is The Simplest !!!!
|
|
|
|
|
tab order of DataGirdView!!!
AFAIK i know you are talking about column order of DGV, if yes then you can not change column order in one line, you need to delete all columns then add in the required order
Becoming Programmer...
|
|
|
|
|
i try the code,
<;asp:buttonfield buttontype="image" imageurl="~/Image/Blue hills.jpg" commandname="Select" />
but it accept single image .i want image folder or '<%# Eval("exe")%>'
|
|
|
|
|
you can't set imageUrl to a folder...
i think you should look at Repeater or adrotator control for that
|
|
|
|
|
i set image in my folder,
<asp:ImageButton ID="Image1" runat="server" ImageUrl='<%# Eval("filename")%>;'OnCommand="ImageButtonCommandHandler" Width="150px"/>
i show all image in grid view but how to show particular related .exe file in image click event.
|
|
|
|
|
Morning,
I've spent ages trying to sort this problem and I've got nowhere. I was just wondering if anyone here had some across it before.
The best way to describe it is with picutres
with problem[^]
As you can see on the above picutre the display is "mangled", showing through to the window below and generally looking corupt.
If I force a refresh (this.Refresh()) then it renders correctly as shown on:
without problem[^]
As the problem seems to occure everytime the data on the form is changed in anyway (add to table, resize form etc) I don't really want to manually force refreshes all the time in order to sort it.
At first I thought this problem was due to graphics card/driver issue on my development machine but after testing this on 4 other machines (all different specs) I'm not so sure as the problem was present on those machines as well.
Any ideas would be very welcome.
Thanks
Sam
|
|
|
|
|
Just a bit more info.
The DataGridView on the form is one that I have subclassed from System.Windows.Forms.DataGridView
It has the following handler declared in its ctor.
this.CellFormatting +=new DataGridViewCellFormattingEventHandler(DGVEnhanced_CellFormatting);
If I comment this out then the problem goes away. If I leave it in (even if the DGVEnhanced_CellFormatting function is empty and does nothing, then the fault resurfaces. Very strange...
|
|
|
|
|
Now i am working gridview so convert this code and replay to me..
modified on Saturday, February 16, 2008 7:19 AM
|
|
|
|
|
I have wizard kind of Windows Application with Forms having Prev and Next buttons. Currently i have set the Location for all the Forms on Form_Load() method using this.Location = new Point(100, 100);
Now my requirement is that when using "Extend my Windows desktop onto this monitor” setting in Display/Settings Properties, the form should stay in the user’s selected monitor. When i go to the Next form it defaults to the main monitor.
I tried removed the size setting on Form_Load but when i navigate to the next/prev forms the location of the form is not properly set. It randomly positions itself.
How can i do this?
|
|
|
|
|
I'm not sure if I'm understanding you fully, do you mean you're using dual screens and you want the form to load on the screen it did last time?
There are a number of types of default form position.
Look at the form's StartPosition property.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Yes that right. I'm using dual screens and i want the next form to load on the screen as how the previous form occupied 2 screens. How can i do that?
|
|
|
|
|
Hi,
Below you see the string array which I am populating BUT I would like to populate dynamically becuase the dataset where the data is coming from may have different number of records each time.
Could you please correct the preferred method mentioned below as it seems I can not use .Add to add into the string array.
p.s. I do not want to use an arraylist
Thanks
Present method:
private string[] _securities = null;
_securities = new string[]
{
"XS0166639566 corp cusip","XS0184546371 corp cusip", "XS0307767474 corp cusip"
};
Preferred method:
private string[] _securities = null;
foreach (DataRow row in dsSecuritiesDetails.Tables[0].Rows)
{
//something to add here to add to the string array...
//i.e. _securities.Add(row["field2"].ToString()) + " corp cusip";
}
|
|
|
|
|
|
string[] _securities = null;
_securities = new string[]
{
"XS0166639566 corp cusip","XS0184546371 corp cusip", "XS0307767474 corp cusip"
}; And then, whenever you need to add a string:
Array.Resize<string>(ref _securities, _securities.Length + 1);
_securities[_securities.Length - 1] = "The new string";
</string>
SkyWalker
|
|
|
|
|
No, please don't do that.
There is no way of resizing an array in .NET. What the Resize method does is to create a new array with the desired size and copy all the data from the old array.
If you do this in a loop, the performace degrades exponentially to the number of items.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
It was not about performance, why are you so upset?
He could use the StringCollection , but he simply wanted to use the string[] (I don't know why, ask him for that ). I just offered a solution to what he wanted.
Peace
SkyWalker
|
|
|
|
|
Mircea Puiu wrote: It was not about performance, why are you so upset?
I'm not upset. I just wanted to point out that the solution is generally a bad method to use.
Eventhough the question didn't mention performance, some solutions scale so badly that they should never be suggested without explaining what happens when you use it with more than a minimal set of data.
Mircea Puiu wrote: I just offered a solution to what he wanted.
No, you offered a solution to what he thought that he wanted.
Just because he asked for it doesn't mean that it's the method that he should use.
People often don't know what to ask for. It's quite common that they ask for the solution that they think that they should use rather than a solution to the actual problem that they have.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
You are right again ...
Have a nice weekend!
SkyWalker
|
|
|
|
|
voted 5 to even up the low-brain low-voters and because your advise was good.
|
|
|
|
|
Yes, his point is well taken!
SkyWalker
|
|
|
|
|
Use a list instead of an array:
private List<string> _securities = new List<string>();
foreach (DataRow row in dsSecuritiesDetails.Tables[0].Rows) {
_securities.Add(row["field2"].ToString() + " corp cusip");
}
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi,
use a collection (StringCollection, ArrayList, or generic List< string>) as others
indicated.
Then convert it to an array if you really need an array. ArrayList and generic List
have a ToArray() method for that purpose.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
hi,
i have selected a camera for a live view through vlc i want to draw a rectangle in the certain areas of vlc.Is there any solutions for this problem.
Thanks in advance
Aparna
|
|
|
|