set src in oview(1)
world << "<b><font color=yellow>[usr] is not in posession of the Hogyoku!"
usr.got_hogyoku = 1
src.loc = usr.contents

var/row = 0
for(var/obj/V in src.contents)
src << output(V,"Inv_Grid:1,[row]")

Problem description:
When I view the inventory grid, it didn't change.
Did you call the update grid procedure? You should make it be called whenever you pick up and drop an item (via mob/Entered() and mob/Exited())... of course, they will be called when you Move() the items out, not force location change it if I recall correctly

Also, you should clear the grid before outputting the items again:
winset(X, "ID", "cells=0x0")
output(..., "...:1,[++row]") // ++row adds 1 and then returns the #. row++ returns the current # then adds 1
src.loc = usr.contents

This is wrong. You don't set loc to contents, you set loc to another atom, and it gets added to contents. Instead, this should be src.loc = usr
In response to Garthor
Thanks it is working fine now, and I updated the inventory everytime you opened it (It's like a pop up window).