[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRIDVIEW color and size


On 4/17/24 13:54, Mayost Sharon wrote:
Hello

You say this:
Public Sub GridView1_Data(Row As Integer, Column As Integer)
    GridView1.Rows[Row].Text = " "
End

But this causes two problems:
1. If there are many records for example (500000) it does not change the
  width of the column header because it calculates the size of the width
of the column header according to the size that "500000" occupies

2. It causes all the time to enter the Data event endlessly

Thanks

I did not say to set the Row.Text in the Data event. The Data event is for filling the content of a GridView *cell*. The row header is not a cell.

Perhaps try, after you have filled the cell data with the data event, doing this:
For x As Integer = 0 To GridView1.Rows.Max
  GridView1.Rows[x].Text = " "
Next


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: GRIDVIEW color and size"Mayost Sharon" <sharon@xxxxxxxxx>
Null value into an integer variable"Mayost Sharon" <sharon@xxxxxxxxx>
References:
GRIDVIEW color and size"Mayost Sharon" <sharon@xxxxxxxxx>
Re: GRIDVIEW color and sizeT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: GRIDVIEW color and sizeT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: GRIDVIEW color and size"Mayost Sharon" <sharon@xxxxxxxxx>