Hello All,
I am using RadGrid and binding data dynamically in code behind file.
Code Behind:
I have also attached image file of result.
Thanks in Advanced...
I am using RadGrid and binding data dynamically in code behind file.
Code Behind:
RadGrid grSampleWorkSheet =
new
RadGrid();
grSampleWorkSheet.ID = WSheet.Name +
"-"
+ m_LoopCount.ToString();
//grSampleWorkSheet.Columns.Remove(0);// = false;
grSampleWorkSheet.ShowGroupPanel = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings[
"ShowGroupPanel"
]);
grSampleWorkSheet.AllowPaging = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings[
"AllowPaging"
]);
grSampleWorkSheet.ShowFooter = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings[
"ShowFooter"
]);
grSampleWorkSheet.ShowStatusBar = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings[
"ShowStatusBar"
]);
grSampleWorkSheet.Skin = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings[
"TelerikSkin"
]);
grSampleWorkSheet.MasterTableView.PagerStyle.Mode = GridPagerMode.NumericPages;
WorkSheetID = WSheet.ID;
strWorkSheetID = objWorkSheet[0].Name;
//if (ddlWorkSheets.SelectedValue == strWorkSheetID)
//{
dtworksheet = GenerateNormalizedRateSheet.GenerateDomesticSampleData(objRateSheet, WorkSheetID,
out
ErrorCode);
if
(
string
.IsNullOrEmpty(ErrorCode))
{
if
(dtworksheet !=
null
&& dtworksheet.Rows.Count > 0)
{
grSampleWorkSheet.DataSource = dtworksheet;
grSampleWorkSheet.Columns.Remove(0);
grSampleWorkSheet.DataBind();
grSampleWorkSheet.MasterTableView.DataSource = dtworksheet;
grSampleWorkSheet.MasterTableView.Columns.Remove(0);
grSampleWorkSheet.MasterTableView.DataBind();
Label lblDomesticTitle =
new
Label();
lblDomesticTitle.ID =
"lbl-"
+ WorkSheetID;
lblDomesticTitle.Text =
"<h5>"
+ strWorkSheetID +
"</h5>"
;
PhSampleData.Controls.Add(lblDomesticTitle);
PhSampleData.Controls.Add(grSampleWorkSheet);
btnNextStep.Enabled =
true
;
}
}
I have also attached image file of result.
Thanks in Advanced...