Jump to content
Software FX Community

Questions about increasing grid timeout and updating grid without losing current view


klimekt
 Share

Recommended Posts

Is there a way to set the timeout during grid load? My grid is reading from a list of files that can take longer then 10 seconds to complete. Once in a while I get the "Continue Waiting?" popup. I'd like to increase the timeout so this popup doesn't show so quickly. How can I do this?

Also, how can I update the grid values (databind the grid) without losing the current view? If I call the databind() method the grid gets redrawn in it's original view, if I had any groups expanded or rows selected, these selections are lost. Is there another update method that would let me keep the current grid view?

Thanks,

Tomasz

Link to comment
Share on other sites

Sorry about the lack of response.  It's vacation time around here.  What you are asking for is, unfortunately, not possible without some serious hacking.  The # of seconds of hard coded in the grid's JavaScript library.  We can provide a property on the grid to customize it; however, it will not be available immediately.  I'll happily provide you with an update when a build is ready with that functionality.  Does that work for you?

Link to comment
Share on other sites

Thanks Stephen, that works for me. Hardcoding is bad, mmmkay? ;)

How about being able to refresh the grid without losing the current view? I have a custom command button that changes one the values in the current row but the row doesn't update until I bind it again, at which point the groups collapse back to the default state. Is there a better way to do this?

Link to comment
Share on other sites

I agree hardcoding is bad.  However, exposing properties publicly is quite a bit of work - server-side API, client-side API, change notification (sync server/client state when value changes), documentation, etc.  Due to constraints, we didn't expose certain things, such as the property in question.  I have a ton of stuff on my list that I'd like to expose.  For now, these things will generally be customer driven, so you'll have a shiny new property waiting for you.  Alongside it might be a property to disable that box altogether, as well visual customizations.

Regarding your request to maintain the expansion of groups between databinds:

There is currently no simple way to maintain the expanded groups before and after data binding.  The main reason is that the underlying data source can change, making it necessary to recreate groups.  That's why they get closed, because technically they are totally separate groups.  However, if the underlying data source is guaranteed not to change in a way that would affect grouping - no records added or deleted and no fields that are related to sorting or grouping change - then the groups should remain.  For normal grid operations, like sorting, paging, updating, etc...this situation doesn't occur.  So it never got into the product.

You are not the first person to request this ability.  So we need to give serious consideration to building it into the product.  As far as an API, would you expect something like: bool Grid1.Grouping.KeepExpansion { get; set; } or something similar? 

You can do it now by making a List<int> that stores the index of each expanded group during the DataBinding event.  Then in the DataBound event, you can just cruise through that list and set the Expanded property in the new groups to true.  Would you like the code for that?

post-4681-13922403183999_thumb.png

Link to comment
Share on other sites

That might work, I could set KeepExpansion=true whenever I update the row values and set KeepExpantion=false whenever a record is added, removed or modified in a way that would affect its grouping. Actually, now that I think about it I don't really need all the groups to remain in the same state, I just need the group that contains the current row to remain expanded so that the row remains visible. If you can send me the sample code I can modify it to suit my needs. Thanks!

Tomasz

Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

You can check whether or not you have the latest service pack by checking the release date on the download page (http://support.softwarefx.com/ProductBase.aspx?Product=GridFX10). In your case, I believe what you are looking for is not out yet. If this is something you really need and would like a hotfix, please contact support (support at softwarefx dot com). Note that hotfixes are not tested as rigorously as a service pack, so backup your current dlls before experimenting with the hotfix.

Link to comment
Share on other sites

  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...