I've got a Grid I am customizing and adding to a place holder control on a page. It seems as though setting AllowMultiRowSelection to true is causing the grid events to not fire. When I comment out the RadGrid1.AllowMultiRowSelection = true; line my ItemCommand event fires properly.
Any thoughts?
Any thoughts?
| protected void Page_Load(object sender, EventArgs e) |
| { |
| RadGrid1 = new RadGrid(); |
| RadGrid1.AutoGenerateColumns = true; |
| RadGrid1.ItemCommand += new GridCommandEventHandler(LVRadGridView_ItemCommand); |
| RadGrid1.AllowMultiRowSelection = true; |
| RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; |
| RadGrid1.ClientSettings.Selecting.AllowRowSelect = true; |
| RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; |
| RadGrid1.MasterTableView.AutoGenerateColumns = true; |
| RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { "ID" }; |
| RadGrid1.MasterTableView.CommandItemTemplate = new FolderViewerCommandItemTemplate(); |
| GridClientSelectColumn checkBoxColumn = new GridClientSelectColumn(); |
| RadGrid1.Columns.Add(checkBoxColumn); |
| BindGrid(); |
| PlaceHolder1.Controls.Add(RadGrid1); |
| } |
| public void BindGrid() |
| { |
| DataTable tab = new DataTable(); |
| tab.Columns.Add("ID"); |
| tab.Columns.Add("Color"); |
| tab.Rows.Add(1, "Red"); |
| tab.Rows.Add(2, "Orange"); |
| tab.Rows.Add(3, "Yellow"); |
| tab.Rows.Add(4, "Green"); |
| tab.Rows.Add(5, "Blue"); |
| tab.AcceptChanges(); |
| RadGrid1.DataSource = tab; |
| RadGrid1.DataBind(); |
| } |
| void LVRadGridView_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| ... |
| } |