OneMansQuestToLearnDotNet

I'm writing a web .net 2.0 application and would like a datagrid that behaves more like a listbox.
Does anyone know of a datagrid that would. I fooled around with the gridview a bit and cannot seem to get the GridView1_SelectedIndexChanged event to fire. Any help or suggestions would be much appreciated.


Re: Windows Forms General Datagrid like Listbox control

H. Tony

you mean datagridview

what you mean by behave more like a listbox

SelectionMode = DataGridViewSelectionMode.FullRowSelect;

GridView1_SelectedIndexChanged event will fire when the selectedIndexChanged happens, what did you try to do






Re: Windows Forms General Datagrid like Listbox control

OneMansQuestToLearnDotNet

gridview system.web.ui.webcontrols.gridview is what the properties indicate.

I created a sqldatasource bound it to the control. The control fills with data and when I select a row nothing happens. I added the code below to capture the change event. I don't have a DataGridView control. I do have a datagrid. I have coded winforms for years. This is my first attempt at a web app.

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)

{

Label1.Text = "Selected indexed changed";

}





Re: Windows Forms General Datagrid like Listbox control

OneMansQuestToLearnDotNet



Found the problem.