Gridbag : howto - Forum - OpenEdge Development - Progress Community
 Forum

Gridbag : howto

  • Hmmm. I've even tried to do

    Ultragrid1:Rows:Refresh(RefreshRow:RefreshDisplay).

    when the timer ticks, to no avail.

    I wonder if there is something about the grid that is preventing this. Is there an option to make the grid read-only ?

  • jmls schrieb:

    Is there an option to make the grid read-only ?

    Hi Julian,

    there are a number of properties you may want to check:

            ultraGrid1:DisplayLayout:Override:AllowAddNew = AllowAddNew:No.

            ultraGrid1:DisplayLayout:Override:AllowDelete = DefaultableBoolean:False.

            ultraGrid1:DisplayLayout:Override:AllowUpdate = DefaultableBoolean:False.

    and for the cells:

    :CellActivation = Infragistics.Win.UltraWinGrid.Activation:NoEdit .

  • What is really bizzare is that I have just tried the form on a 2003 server and the display is updated automatically as I expected. Same program on windows 7 does not. Interesting.

  • jmls schrieb:

    Heh, don't know if that is a "lovely" as in "very nice" or a sarcastic "lovely" as in "oh my god, that's awful" ...

    More in the form of "nice" or "not bad" :-)

  • jmls wrote:

    Hmmm. I've even tried to do

    Ultragrid1:Rows:Refresh(RefreshRow:RefreshDisplay).

    when the timer ticks, to no avail.

    I wonder if there is something about the grid that is preventing this. Is there an option to make the grid read-only ?

    I see the same behavior when using refresh directly on the grid as in UltraGrid1:Refresh().  (Windows XP).

    I can workaround the problem by refreshing the Progress bindingsource also:

      cast(ultraGrid1:DataSource,Progress.Data.BindingSource):Refresh().

    or instead:

      cast(ultraGrid1:DataSource,Progress.Data.BindingSource):RefreshAll().

    I suggest you report it to Support (even if it not necessarily is a bug in the ABL).

  • hdaniels wrote:

    I see the same behavior when using refresh directly on the grid as in UltraGrid1:Refresh().  (Windows XP).

    I can workaround the problem by refreshing the Progress bindingsource also:

      cast(ultraGrid1:DataSource,Progress.Data.BindingSource):Refresh().

    or instead:

      cast(ultraGrid1:DataSource,Progress.Data.BindingSource):RefreshAll().

    I suggest you report it to Support (even if it not necessarily is a bug in the ABL).

    After I've added the suggestion from Mike

    ultraGrid1:DisplayLayout:Override:AllowAddNew = AllowAddNew:No. 
            ultraGrid1:DisplayLayout:Override:AllowDelete = DefaultableBoolean:False.
            ultraGrid1:DisplayLayout:Override:AllowUpdate = DefaultableBoolean:False.


    and some other changes, the thing has started to work. I suspect that it is something to do with the update of the cell - if there is some editing taking place, it's not going to be refreshed.

  • After I've added the suggestion from Mike

    ultraGrid1:DisplayLayout:Override:AllowAddNew = AllowAddNew:No. 
            ultraGrid1:DisplayLayout:Override:AllowDelete = DefaultableBoolean:False.
            ultraGrid1:DisplayLayout:Override:AllowUpdate = DefaultableBoolean:False.





    and some other changes, the thing has started to work. I suspect that it is something to do with the update of the cell - if there is some editing taking place, it's not going to be refreshed.


    What are those other changes? (Setting those properties does not help in my sample).

    What strategy to use for refresh of edited data is a challenge in a component framework, so this could possibly be expected behavior. (but your claim that it worked in a different environment suggests otherwise)

  • hdaniels wrote:

    What are those other changes? (Setting those properties does not help in my sample).

    What strategy to use for refresh of edited data is a challenge in a component framework, so this could possibly be expected behavior. (but your claim that it worked in a different environment suggests otherwise)

    Hmm. I also added

    ExitEditModeOnLeave=false

    UpdateMode=OnUpdate

    CausesValidation=false

    in the properties of the grid

    HTH

  • Hmm. I also added

    ExitEditModeOnLeave=false

    UpdateMode=OnUpdate

    CausesValidation=false

    in the properties of the grid

    HTH

    None of these seems to fix the problem in the "next" version of Progress.

    I have reported this as issue OE00185963 based on my findings that all rows are refreshed if the grid is using an IList DataSource.

  • I eventually gave up on this. No matter which control I used, I ran into problems. The final straw was the huge memory leaks from DevXpress. After 30 minutes, the prowin32 app reached 400MB

    However, there is some good news. I started from scratch, and rather than using a grid control, I created a user control with the picture and fields that I wanted. I then put this user control into a flowlayoutpanel control, and it works !

    See the attached screenshot for an idea of how it looks.

    Each "card" can be collapsed and expanded. The caption colours change based on the Agent status (user-defined colours, I hasten to add) and the cards flow around the screen when the window changes size.

    I also found a way of sorting the cards based on any criteria I liked, using the SetChildIndex() method of the flowlayoutpanel

    A great example of the power of user controls.