Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid highlighter issue
Message
From
05/01/2003 20:27:27
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00737984
Message ID:
00738235
Views:
14
Hi,

Thank. My application will be run on a touch screen system on Win2k.
Actually, the record is add on the fly by selecting it and the column 3 value will be initially 0. There might be numerous record in the grid.

When my user click any of the row on the grid, it should be highlighted, remain in the same row when user click another button to increase/decrease
the count value in the third column.

When user click the first and second columns and click the increase button to
increase the third column value, it does not refresh or update it value count. But this cause does not happen when we click the first or third column of the grid.

Please advise and help. Thank you

Below is part of my code


Grid.When and Grid.Click method code
************************************
WITH THISFORM
SELECT Payment
.RecNo = RECNO('Payment')
.ResetTimer()
ENDWITH


On activation, I set it to following code to open and display the grid record
*****************************************************
THISFORM.grdhighlighter

.RecordSourceType = 1
.RecordSource = ''
.RecordSource = 'Payment'

ENDWITH


THISFORM.RefreshGrid method which will be called after increase/decrease
the third column value
*************************************************************************

.ForeColor = RGB(0,0,255)
.BackColor = RGB(192,192,192)
.HeaderHeight = 55
.ReadOnly = .T.
.FontBold = .T.
.RecordSourceType = 1
.RecordSource = ''
.RecordSource = 'Payment'
.ColumnCount = 3
.Width = 607
.Height = 218

.Column1.FontSize = 20
.Column1.Width = 330
.Column1.Header1.FontBold = .T.
.Column1.Header1.FontSize = 14
.Column1.Header1.ForeColor = RGB(255,255,255)
.Column1.Header1.BackColor = RGB(128,64,64)
.Column1.Header1.Caption = "Description"
.Column1.ControlSource = 'payment->desc'

.Column2.FontSize = 20
.Column2.Width = 169
.Column2.Header1.Caption = "Price"
.Column2.Header1.FontBold = .T.
.Column2.Header1.FontSize = 14
.Column2.Header1.ForeColor = RGB(255,255,255)
.Column2.Header1.BackColor = RGB(128,64,64)
.Column2.ControlSource = 'payment->Price'

.Column3.FontSize = 20
.Column3.Width = 217
.Column3.Header1.Caption = "Qty"
.Column3.Header1.FontBold = .T.
.Column3.Header1.FontSize = 14
.Column3.Header1.ForeColor = RGB(255,255,255)
.Column3.Header1.BackColor = RGB(128,64,64)
.Column3.ControlSource = 'payment->Qty'

* default set the active column and row to 1,1
WITH THISFORM.grdHighlighter
.GridHighlighter
.SetDynamicColor()
ENDWITH
ENDWITH




>Hi Virusim,
>
>I still don't quite understand what you are doing in the grid.
>Do you add the records to the grid RecordSource cursor?
>Do you increase the value in the selected column by clicking the button?
>What is the ControlSource for the 3rd column - is it calculated value?
>Could you send me your form and all realted files so I could take a look?
>
>>Hi
>>
>>Sorry for my poor english.
>>What I mean for increasing column is actually the grid
>>had 03 columns. The last columns is holding the individual
>>display item total count.
>>
>>When I select any of the item on the grid by clicking
>>on the first or second columns and then click my other
>>button to increase that selected column, the selected and
>>highlighted row must remain, without the active row going to the
>>first row after the third columns value changes.
>>
>>The strange thing is when I select the row by clicking
>>the third column and clicking the button to increase the
>>count, the third columns value remain unchanged, only
>>clicking other column, the third column value will be
>>updated. But, I had all the 3 column having the same
>>code, why the third column is having this problem when
>>the other 02 column is okay ?
>>
>>Please advise. Thank you
>>
>>
>>
>>
>>
>>
>>>Hi Virusim,
>>>
>>>It's hard to grasp, what do you mean by increasing column. Anyway, try to set focus on the grid after your manipulations or invoke Grid.AfterRowColChange method. This should refresh Grid Highlighter...
>>>
>>>>Hi,
>>>>
>>>>The grid highligher is great. But I had this problem that allow
>>>>user to select the item on the grid and user can click
>>>>another button to increase the count, but the grid
>>>>must remain in the same place/location selection on the grid
>>>>. For my grid, I had 03 columns
>>>>
>>>>However, for the third column, when I click it, and
>>>>click the button to increase it, it does not refresh
>>>>like the other 02 columns does. Only when I change to
>>>>another column, the third column will be updated. This
>>>> problem does not happen on the first and second
>>>>columns.
>>>>
>>>>For all the 03 columns, I had the same code listed
>>>>below for the following 02 methods in
>>>>
>>>>Grid.When and Grid.Click
>>>>
>>>>WITH THISFORM
>>>>
>>>>SELECT Payment
>>>>.RecNo = RECNO('Payment')
>>>>.ResetTimer()
>>>>
>>>>ENDWITH
>>>>
>>>>Please advise. Thank you
Best Regards
Virusim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform