Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

I have a table to display some values.

 

This is the code:

 

For i As Integer = 0 To count_doze - 1

                   ' Populate the table.
                   Dim grid_data(5) As Object
                   grid_data(0) = info_total(j, i, 0)
                   grid_data(1) = status1(i, 1)
                   grid_data(2) = info_total(j, i, 1) ' this is the value
                   grid_data(3) = status1(i, 2)
                   grid_data(4) = status1(i, 3)
                   grid_data(5) = ziua + "." + month + "." + year
                   gridul.Rows.Add(grid_data)

               Next

 

 

I want to make a trick here. Many of the displayed values will be �0�. When the value is �0� is not important so I don�t want to see that value.

 

Let�s say that I have the grid for the last 7 days for a unit. But that unit has only two good values : 0.5 and 0.9 ..the rest of them are �0�.

 

So all I want is when I press the table button to see all the values except �0�.

 

Ex:

 

This table results:

0.5 23.12.2003

0 22.12.2003

0 21.12.2003

0.9 20.12.2003

0 19.12.2003

0 18.12.2003

0 17.12.2003

 

To this table:

 

0.5 23.12.2003

0.9 20.12.2003

 

 

 

I really don�t know how to do that.

Posted

Hi Acemaster,

 

Why don't you just fill in the values you need?

 

Something like:

 

For ...
  If myValue <> 0 then
     'Add Values
     ...
  End if
  'Add row
  ...
Next

 

Voca

 

Merry Xmas to all out there

Posted

Hi.

 

I just write this...and is working.

 

 If info_total(j, unit, 1) = 0 Then

               Else



                   'MsgBox(info_total(j, unit, 1))
                   ' Populate the History table.
                   Dim grid_data(5) As Object
                   grid_data(0) = info_total(0, unit, 0)
                   grid_data(1) = status1(unit, 1)
                   grid_data(2) = info_total(j, unit, 1)
                   grid_data(3) = status1(unit, 2)
                   grid_data(4) = status1(unit, 3)
                   grid_data(5) = ziua + "." + month + "." + year

                   gridul.Rows.Add(grid_data)

               End If

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...