[thelist] Re: WebMatrix Datagrid only loads onPageLoad

Casey aspnet at thecrookstons.com
Mon Aug 15 19:35:58 CDT 2005

Maybe this is the simple version of my question: How do you force a web
matrix datagrid to do a manual databind?

> Been beating my head against the wall for hours on this one... starting to
> get a lump on my forehead.
> I created a datagrid with Web Matrix... I was so very pleased with how
> and easy it was to do!  Then, I tried to make a few modifications to the
> page on which my handy little datagrid lives, and it stopped working.  :-(
> The grid grabs a list of doctors from a database and spits it onto the
> Cool enough.  But, the client wants to be able to select only doctors who
> practice in one state.
> So, I add a dropdown list of all fifty states. I put the dropdown list in
> one panel.  I put the datagrid in a second panel.  On page load, panel_1
> visible and panel_2 is hidden.  The user selects a state.  Panel_1 stays
> visible (in case they want to select another state again later).  Panel_2
> also becomes visible and shows the datagrid of docs in the selected state.
> Problem: No matter how I try and work it, that bloody datagrid will not
> display.  (I even tried asking it real nice like.)  BUT, if I roll back
> remove all panels and shove the datagrid back on the original page load,
> works.
> AND, if I create my own datagrid w/o Matirx, everything works just as it
> should.  I can choose a state, and BAMB!  Out comes the grid with docs
> from that state.  I can choose another state, and HEY!  I see the docs
> that state.  All day long.
> So, you are of course asking, "What's the issue?  Just use your own
> and scrap the one from Matrix."  Well, yes.  But, the really cool thing
> about the Matrix grid is that it makes sorting and paging so very very
> very easy.  I've looked into making sorting and paging work on my own
> and I got scared.
> So what gives?  Why won't that blasted Matrix DataGrid work? I EVEN turned
> AutoDataBind to OFF and did the bind manually.  Still, no love.  I've not
> yet tried a candle light dinner with champaign, but that's next.
> If someone out there is feeling generous with their time, I even attached
> text versions of the two docs.  (2 much code to paste).  Docs2.txt is the
> webmatrix version.  doc2.txt is mine.
> Any advice?
> TIA!

More information about the thelist mailing list