• Making a DGrid "refresh"
    4 replies, posted
What would be an efficient refreshing items on a DGrid? I'm currently attempting to make something where once you purchase an item, the item has to be wiped from the DGrid and added to a different DGrid. The issue is that currently the net message and the function are not connected in anyway, and the DGrid is a local item in the function. What would be a good way, clean way of accomplishing this?
bump.
Make a global variable though which you can call a custom method on your menu to rebuild the inventories, call that from your net message. ( After receiving the new data )
[QUOTE=Robotboy655;50263984]Make a global variable though which you can call a custom method on your menu to rebuild the inventories, call that from your net message. ( After receiving the new data )[/QUOTE] Alright, I did that, thanks. When I attempt to clear the grid, I get this error: [code][ERROR] lua/vgui/dgrid.lua:96: Tried to use invalid object (type Panel) (Object was NULL or not of the right type) 1. SetPos - [C]:-1 2. unknown - lua/vgui/dgrid.lua:96 [/code] Here is the code im using to clear the grid: [code] grid:Clear(); [/code] It clears the grid, but when I attempt to re-add stuff to the grid, it errors out.
You are probably trying to add the removed panels back, create new ones.
Sorry, you need to Log In to post a reply to this thread.