[Gambas-user] Gridview - alignment

Zoltan Biro office.zolano at ...626...
Thu Mar 11 11:15:30 CET 2010


HI everybody,

   I have the folowing strange problem: I filled a grid with data from an
sql command result as you can see in the code:

PUBLIC SUB Button_click
 hrex = Proced.$db.Exec(miex)
 GridView1.Columns.count = 6
 GridView1.rows.count = hrex.count
END

PUBLIC SUB GridView1_Data(Row AS Integer, Column AS Integer)
 DIM i AS Integer
  hrex.MoveTo(row)
  GridView1.Data.Text = Str(hrex[GridView1.Columns[Column].Text])
  GridView1.data.Alignment = Align.Left   'I can use align.right -
everithing work okay
END

In this situation everythink works okay.. but I need to align the first
colum to right. I completed the gridview1_data with:
 GridView1[row, 3].Alignment = Align.right
and the grid will show me an empty cell!
If I put in button_click the:
 GridView1[1, 3].Alignment = Align.right
the data in grid is okay but the cell [1,3] is empty..

Can tell me somebody how can I align a colum to right, and the rest of
colums to left?
 I can mention that if I fill the grid directly with commands like
gridview1[1,1].text="something" and i align this to right..this works
fine..but If I try to align a cell to right based on data from an array or
result-table it not works.

Thanks in advance,
Zoli B.



More information about the User mailing list