I've got an existing Gridview, GLGV, works fine, with a complex custom built row structure. In the page code behind, the GLGV_RowDataBound routine calls a couple of non-code behind class functions that do all the work.
In another part of this story, I use callback technology in lots of ways, including for context-specific popup menus, and for building and inserting "in table" GLGV add rows. The callback tells the server code to create a control, render the control, and send back the string, which the client javascript then inserts into the appropriate <div> or Gridview <td>. I've even implemented this cycle for a highly complex diagram with several dozen elements. Again, all works fine.
Now I'm going to convert the entire GLGV gridview to do the same type of callback refresh. Just to be clear, Update Panels will not be part of this solution.
I've wired up a test cycle in which this happens:
client
JS - send callback to initiate GLGV refresh
page codebehind - route callback request to custom class (non-codebehind module) for processing
custom class -
- instantiate the page in a local variable,
- find GLGV on the page, put it into a local variable = wrkGLGV as GridView
- databind wrkGLGV
- render wrkGLGV to string
- set up the render string for sending back to the client in the callback return
client
JS - take the received callback string of the rendered GLGV and put it in the appropriate <div>
All works fine, except: the rendered wrkGLGV string consists of only "<div></div>". And, the page codebehind GLGV_RowDataBound event is not triggered during the custom class wrkGLGV.databind (which does happen just fine on postback).
I don't understand how the databind in the custom class relates to the page codebehind, however, I can imagine that there's some background wiring which just isn't evoked when the control databind occurs in a custom class, even if it is the "same" control.
So, I'm looking for help in understanding one or more of:
1) how to evoke the GLGV_RowDataBound event that's in the page codebehind,
2) how to create the same effect as calling the GLGV_RowDataBound event, but do it all in the custom class
> Is there some "RowDataBound" event that can be associated with my "wrkGLGV.databind" instruction in the custom class?
3) do I have to move the callback processing for this type of GridView refresh (there will be 3 more of these) back into the codebehind?
4) something else to get the effect I want
My preference would be to NOT do 3).
Any help with this would be appreciated.
Thanks!