I had this beautiful datagrid on an ASP page (VB.Net as the code
behind). When I clicked on a Select Button, the row was selected and
the background color changed the way it was supposed to. The
SelectedIndexChanged event was called. It made me happy.
Alas, I did something to my datagrid and rows were no longer being
seleted. The SelectedIndexChanged event was ignored. Background
colors did not change for the selected row. Not being sure what it
was I did to cause this tragedy, I deleted and created another one.
And yet the problem persists.
I'm no longer sure what to even check for.
I'm almost positive that there is some little thing I did not do, some
setting that was not set properly. This is how I created the second
grid. Forgive me if I get too detailed...
I went to the ToolBox and clicked on the DataGrid control and dragged
it to the form. I named the dataGrid to dgDSR. I right clicked on
dgDSR and selected Property Builder. I went to the Columns tab
(though it's not a true tab, is it?) I went to the Available Columns
and expanded the Buttons Columns list. I picked "Select" and added it
to the Selected Columns. I changed the text to "+" and made it a
push-button. I next went to the Format "tab" and expanded Items in
the Objects list. I selected "Selected Items" and changed the
background color to a nice shade of blue.
I closed the Property Builder. I wrote some code to fill the grid.
The grid is filled with data. I would think that at this point, even
if I don't have any code in the SelectedIndexChanged event that the
row would at least be highlighted when the push-button is clicked.
Right? I don't see a AutoPostBack for the datagrid in the properties.
Is there one and do I need one? At this point I am frustrated and
confused and don't know what to do.
Another question - should this be posted on an ASP newgroup? I didn't
think so, since this really doesn't involve ASP code right now. BUt
if so, just let me know. Any response would be appreciated.
Does anyone have any suggestions? What did I miss?
Thanks,
Jennifer