473,839 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on data in datagrid /listbox and looping?

Greets All,

Question on data in datagrid /listbox and looping?

Iím trying to decide the best way to write this code.
1 would like the user to make several selections from one listbox/combo box that would
Populate another Listbox/datagrid. Then it would cycle through the selections made in the populated listbox/datagrid and do some calculations. The calculations made would have to add the first two numbers in the populated listbox/datagrid then divide by 25 then divide by 2. Then take that answer and add it to the next populated number in the listbox/datagrid then divide by 25 the divide by 2.

Example: Variable List of Numbers in populated Listbox/combo Box

Example of Calculation formula:
1) (((10+20) /25) /2) =.6
2) (((.6+30)/25)/2) =.612
3) Next number in populated listbox/datagrid
1) Should I use a listbox/datagrid to populate the data with?
2) Is this possible? :-)
3) Any ideas how to write this array loop if possible?


Nov 21 '05 #1
0 1539

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: me | last post by:
I've included a picture below to show what I am trying to accomplish. It is best to copy/paste into notepad to get the spacing correct. I have a dataset that contains 3 tables. Two of the tables contain data and the third links them together. The dataset has a constraint setup as well. The first listbox and the first and last name text box are bound to the Person DataTable. As you select a name in the listbox, the textbox will be...
by: Giulio | last post by:
Hello, I have a continuous form with a combo box inside. From the combo box I can pick some values which, by the "after-update" event, change some other combo box values determined by a query. (i.e. I have some tree names and depending on what tree I pick on the other combo box I can pick its fruits and other properties) Now, mine is a continous form, and whenever I pick a value from the first combo box the second one correctly shows...
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all selected items of that listbox and display it. can anyone help? Thanks
by: hlam | last post by:
Help - Calculating the total of a column in a data grid -- when data grid is part of Master-Detail set-up I have setup a Master-Detail form using Visual Studio.Net. A ListBox is the (Master) and contains a list of dates. The data grid (Details portion) contains the details for a selected date (namely, a list of work codes and hours spent). I am trying to total the number of hours in the datagrid
by: Graham Blandford | last post by:
Hi all, Well I abandoned the use of a datagrid in my windows form and have opted to use a listbox instead. I have, following a helpful article created an item class and loaded it with values from an ADO recordset. Now, if I read the data I get a field (clientid) looking like this;
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? Iím trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box that would Populate another Listbox/datagrid. Then it would cycle through the selections made in the populated listbox/datagrid and do some calculations. The calculations made would have to add the first two numbers in the populated...
by: Michael C | last post by:
Hi all, I have a listbox bound to a table in a database and a grid control bound to another related table in the same database. When I select an item in the listbox (in this case a name), the datagrid populates with the related information correctly. Everything works fine to that point... Now for the problem - I have to count the number of rows in the datagrid and sum a column in the datagrid. I tried to do this on the listbox...
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql query: OleDbDataAdapter1.SelectCommand.CommandText = & _ "Select illNameE From tblIllness" OleDbDataAdapter1.Fill(DsIllness1) But in my datagrid, I get (null) for other ccolumns instead
by: Arch Stanton | last post by:
I'm trying to bind data in a dataset (obtained from an Access DB) to a listbox in ASP.net. I know my dataset is being created properly because it displays fine in a datagrid, but I can't get it to display in a listbox. Here's what I'm trying: dgrDataGrid.DataSource = dstData.Tables("Manufacturer") lstMake.datasource = dstData.Tables("Manufacturer") Page.DataBind There is only one column in the dataset's table, and the datagrid
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.