protected void grdErrors_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e) { try { } catch (IndException ex) { ShowError(ex); return; } catch (Exception ex) { ShowError(new IndException(ex)); return; } }
protected void RadGrid1_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e) { //Populate the Radgrid dtTable = new DataTable(); //Open the SqlConnection SqlConnection.Open(); try { //Select Query to populate the RadGrid with data from table Employees. string selectQuery = "SELECT * FROM Employees"; SqlDataAdapter.SelectCommand = new SqlCommand(selectQuery, SqlConnection); SqlDataAdapter.Fill(dtTable); RadGrid1.DataSource = dtTable; } finally { //Close the SqlConnection SqlConnection.Close(); } }