Jump to content
Software FX Community

Refresh Items Button


jvwiv
 Share

Recommended Posts

The client-side javascript is different for grids depending on their ID.  So, we include a server-side method that generates the javascript for you.  In VB, just enter: 

Grid1.Commands.RefreshData.GetExecuteScript()

Grid1 in that case is the grid in question.  It will spit out javascript like:

GridFX.Grid.get_grids().Grid1.refreshData();That will do the trick.

Link to comment
Share on other sites

Hi Stephen,

I've added the Grid1.commands.refreshdata.getExecuteScript() in the executecustomcommand for the grid method in the code behind.  The line gets executed, but no post back occurs during the firing of the event.  The event does not generate the Java code on the page.  (view source after firing the event)

Here's what I'm trying to do.  I have 2 grids on the form.  When the user clicks a button on grid 1, the record from that grid is put into a table that is mapped to grid 2.  So, I have vb code associated with that custom command button.  The record gets added but the grid doesn't refresh until I manually click on the gridfx refresh button. 

 

Link to comment
Share on other sites

Okay, so you are trying to update 2 "sibling" grids.  That's another story.  Unfortunately at this time, a grid that initiates a callback can only update within itself.  ASP.NET provides basically no support for more advanced updating within callbacks (UpdatePanels actually use postbacks, not callbacks, and are very heavy things).  We are in the process of improving this, and in upcoming releases of our products you will be able to update many separate controls during a callback.  Until then, you are best off just using a regular <asp:Button and handling its click event.  This will use a postback and although the flickering will occur, your problem should be solved.

You may need to call DataBind on the second grid, because it has no official way to know that its data depends on another.

Hope this helps!

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...