473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sum data in a column of msflexgrid

hello...
i have this code
Expand|Select|Wrap|Line Numbers
  1. Private Function TotalColumn(Grid As MSFlexGrid, ByVal ColIndex As Integer) As Integer
  2.   Dim R As Long
  3.   Dim Total As Integer
  4.  
  5.   For R = 0 To Grid.Rows - 1
  6.     If IsNumeric(Grid.TextMatrix(R, ColIndex)) Then
  7.       Total = Total + Grid.TextMatrix(R, ColIndex)
  8.     End If
  9.   Next R
  10.  
  11.   TotalColumn = Total
  12.  
  13. End Function
  14.  
my problem is..this code is summing the entire column
what i need is to sum a column for selected rows only..
for example:column 30;
row 1-20

Any help is greatly appreciated
Feb 26 '13 #1
0 1278

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marco | last post by:
Hi all, as I'll unfortunately always be a newbie, I need your help on this issue. I need to suggest to our customers a way to crate partitions on our tables, without having to add any new...
4
by: alederer | last post by:
Hallo! I need to convert the values of a varchar (..) for bit data column to a string which can be stored in a normal varchar column (with additional information). Is there a function in db2...
1
by: Grey | last post by:
how to sort the specified data column when user click the column header dynamically in datagrid. million thanks
2
by: Sean | last post by:
How can I go about masking the data in a DataGrid Data column? For example, I load a DataSet with somebody's contact information. How can I make the phone number data, which is stored as: ...
0
by: Gilgamesh | last post by:
I'm retrieving a data column from SQL Server 2000 which has the type Varchar with length set to 10. The MaxLength method of DataColumn object returns -1 instead of the correct size which is 10....
1
by: neeraj | last post by:
Hi All Can any give me the code for convert "DataColumn" data type of "DataTable". Even if data table already populated (have data) Actually I am creating one search module which searches the...
4
by: uprakash14 | last post by:
i have import excel data in MSflexgrid.. Now i want to count the data for particulars fields... Like Data have four column A, B, C and D while using A column, i have to calculate the data of B...
0
by: gurusshetty | last post by:
Hi Is there any way to find previous value of data column or text in c#. Regards, Guru
0
by: Alexandre Brisebois | last post by:
I have been trying to use Linq o SQL to query an XML data column I currently have in my DB, but it seems that Linq to SQL sees a typed xml column as an XElement, I don't want to get the full...
2
by: JuAn2226 | last post by:
hi,I got few question here. Hope some one can me. plz help me i running out of time 1. how to make my msflexgrid to display data for every 5 min(especially the number car and average speed. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.