Hello i need to convert from GridView to RadGrid, can anyone give me some suggestions on how to do this with RadGrid please?
IE, i basically would like to just loop thru each Grid Row and each Grid Column and if find that the Row.Cell approach is very intuitive, is there such an intuitive approach with the RadGrid?
Thanks very much for any pointers!
protected void dgColumns_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
SelectedColumn col = AllSelCols[e.Row.RowIndex];
(e.Row.Cells[2].FindControl(
"txtAlias") as System.Web.UI.WebControls.TextBox).Text = col.Alias;
(e.Row.Cells[3].FindControl(
"chkOutput") as CheckBox).Checked = col.Output;
if (col.SortType != string.Empty)
{
(e.Row.Cells[4].FindControl(
"ddlSortType") as DropDownList).Items.FindByText(col.SortType).Selected = true;
}
(e.Row.Cells[5].FindControl(
"txtSortOrder") as System.Web.UI.WebControls.TextBox).Text = col.SortOrder;
}
}
catch (Exception ex)
{
lblErrorScriptManager.Visible =
true;
lblErrorScriptManager.Text = ex.Message;
}
}