Versions des environnements
>>Hi,
>>
>>My grid has an "Amount" column which I want to display its total.
>>Currently, I use a readonly textbox to display that total right below the "Amount" column.
>>
>>My concern is when user adjust the grid, say change a column size, that means the "total amount" textbox must be moved so that it always aligned to the "Amount" column.
>>Am I right that I will have to calculate on-the-fly to find out the left pos of the "Amount" column every time? (I mean summing up the width of all columns before the "Amount" col)
>>
>>I was thinking it is possible to display the total amount as footer of the "Amount" column. Is it possible to also add a footer to a grid column (besides its header)? If so how do I add that footer?
>
>
> > "total amount" textbox
>> left pos of the "Amount" column every time? (I mean summing up the width of all columns before the "Amount" col)
>
>(1)
>The left and the width of the amount column can be determined using objToClient(ColumnObject, 2) and objToClient(ColumnObject, 3)
>Be aware that objToClient returns form coordinates - so you will need to get the objToClient() of the parent of the grid (form, page, container) and adjust the column's obtToClient to the coordinates of the parent of the grid
>
>(2)
>> when user adjust the grid, say change a column size
>
>
>You can use bindEvent ( with nFlags = 1: call delegate after event code ) to bind to
>- column.Moved event
>- column Resize event
>
>You may also have to bind to column.Visible
>
>To test is what happens when the grid is scrolled horizontally. Does that trigger the Moved event ? Also, the column may not be visible any more
>
>And if you start working with panels - that may be interesting since the column can appear twice !
>
>(3)
>> footer
>
>Nothing comes to mind
Thanks!
OBJTOCLIENT is a good function, I will bear that in mind!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement