|
No, it still makes no sense. You add an extra column to your table and then you say you need to store information in extra rows. Choose one or the other.
|
|
|
|
|
"No, it still makes no sense. You add an extra column to your table and then you say you need to store information in extra rows. Choose one or the other."
I've added an extra ret column
DataColumn^rt_col=gcnew DataColumn();
rt_col->ColumnName = "Ret";
rt_col->DataType=System::Type::GetType("System.Double");
dbdataset->Columns->Add(rt_col);
Then I need to fill the rows of this new column "Ret" based on the values held in "Population" column.
1st value of "Ret" should equal = log( 1st value of Population / 2nd value of Population)
2nd value of "Ret" = log (3rd value of Population / 4th value of Population)
....
ps: please let me reiterate that both "Ret" and "Population" are columns from the datable object dbdataset.
Cheers
** in vba it will take me <3 minutes to perform it but I am stuck in c++ (part of the learning process I suppose ) Again thanks for the help
modified 24-Nov-14 6:57am.
|
|
|
|
|
I showed you how to fill it in my previous answer, but I do not know what it is that you want to fill it with.
|
|
|
|
|
Please Richard a quick look at my previous post (also copied below)
"No, it still makes no sense. You add an extra column to your table and then you say you need to store information in extra rows. Choose one or the other."
I've added an extra ret column
DataColumn^rt_col=gcnew DataColumn();
rt_col->ColumnName = "Ret";
rt_col->DataType=System::Type::GetType("System.Double");
dbdataset->Columns->Add(rt_col);
Then I need to fill the rows of this new column "Ret" based on the values held in "Population" column.
1st value of "Ret" should equal = log( 1st value of Population / 2nd value of Population)
2nd value of "Ret" = log (3rd value of Population / 4th value of Population)
....
ps: please let me reiterate that both "Ret" and "Population" are columns from the datable object dbdataset.
Cheers
** in vba it will take me <3 minutes to perform it but I am stuck in c++ (part of the learning process I suppose ) Again thanks for the help
|
|
|
|
|
And once again, I repeat, I have already shown you how to fill these columns. You just iterate through the rows of your datatable inserting the values (however you calculate them) into the Ret column of each row.
|
|
|
|
|
Thanks again Richard.
Could this suggestion be translated into codes for implementation? then I will surely learn from your post as this is much more concrete.
cheers
|
|
|
|
|
|
Hi Richard,
First and foremost, sincere apologies for a naivety mainly attributable to inexperience Yet. I acknowledge that the code posted is perfectly fine. While adapting to my needs, performing the loop before the below piece of code has resulted in blank "Ret" columns, confused me, and triggered some skepticism.
sda->Fill(dbdataset);<pre>
Now all look fine, and I'd like to thank you very much for your assistance. I spent the weekend on this mater whereas it took you barely few minutes from your side to bring a concrete solution. Hence I am indeed impressed, and hope to become a day a c++ pundit like you so as to give back by helping others on forums too.
Cheers
Member 11230372
|
|
|
|
|
Hey guys, I'm learning c++ and I've got a question,
I have a class called <<test (name,="" id)="">>
and I want to store a list of the objects in another class called <<testlist>>
How can I do it properly?
Thanx
|
|
|
|
|
|
Hi,
I am facing problem while calling a dialog, which contains multiple radio buttons and "OK" and "Cancel" buttons.
But number of radio buttons came to know while runtime only, for this scenario, i tried to make using "Easysize" but it works only if number of radio buttons are fixed.
Can anyone suggest how to handle this situation ?
~Kris
|
|
|
|
|
You will need to add some code to iterate through all the controls in the dialog. Using the location and dimensions of each item you can calculate the maximum width and height required. Use that information to resize the dialog window.
|
|
|
|
|
Here is one of many examples that can be found on the web.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I would design the UI for such a requirement by embedding the radio button is some sort of a list.
Here is an example - CQuickList[^]
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
1. User login (Admin, Broker or Client)
2. Stock Trading. Clients can view shares prices and submit orders to brokers for
buying or selling
3. Brokers can issue the order; manage client’s finance and billings and offer
recommendations based on current prices and client history.
4. Stocks Activity Reports (By day, month or year)
please help me in this basic project and diagram
please
|
|
|
|
|
|
|
|
i need little help not someone work for me i need little project link to do good diagram
and thanks
|
|
|
|
|
Then you need to do some research into the different parts of the project: database, transactions, UI etc. There is no simple answer that can be posted in a forum such as this.
|
|
|
|
|
You haven't asked for help, you asked for a full solution.
If you want help, then you first need to do as much as possible by yourself, up to the point where you don't know how to proceed. Then tell us why you can't proceed and what, precisely, it is that you don't understand or don't know how to solve.
There's no point for us to provide a full fledged answer if we don't know what you already know - we might just be wasting our time telling you what you already know!
You may be unsure on how to start, maybe you believe if your design isn't perfect right from the start then you will ultimately fail. But that is not how software development works: software development never starts with a perfect design! Instead you start with what you think works best, and go on until you realize that you can't go on, or some detalis of your design are impractical. Then, based on what you've just learned, you correct your design. If all else fails, start new from scratch.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Hi, it's for MT4 plattform?
|
|
|
|
|
Is there any way to insert some icons to an CTreeCtrl, but only on some icons, and other one's not ? If yes, how can I do that ?
|
|
|
|
|
you set the icon group via CTreeCtrl::SetImageList[^], and then use the offset into the list to set the icon for individual tree items. If you use an invalid offset then no icon will be displayed.
|
|
|
|
|
Yes, I try that, but remain there an ugly empty space (between tree line and tree text) ...
|
|
|
|