[thelist] WebMatrix Datagrid only loads onPageLoad

Casey Crookston caseyc at internetopus.com
Mon Aug 15 19:02:45 CDT 2005


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 fast
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 page.
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 is
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 and
remove all panels and shove the datagrid back on the original page load, it
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 only
from that state.  I can choose another state, and HEY!  I see the docs from
that state.  All day long.

So, you are of course asking, "What's the issue?  Just use your own datagrid
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
very easy.  I've looked into making sorting and paging work on my own grid,
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!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: doctors2.txt
URL: <http://lists.evolt.org/pipermail/thelist/attachments/20050815/6a5b47da/attachment.txt>


More information about the thelist mailing list