Ace Master Posted December 23, 2003 Posted December 23, 2003 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. Quote
Voca Posted December 23, 2003 Posted December 23, 2003 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 Quote
Ace Master Posted December 23, 2003 Author Posted December 23, 2003 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 Quote
Voca Posted December 23, 2003 Posted December 23, 2003 Ok, slightly different but all at all similar to my proposal. Voca Merry Xmas to all out there Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.