I have a simple rad grid as follows:
But this grid is not visible!
I can see that the grid is populated but still not visible. On debugging i see the grid being rendered as follows:
<div class="RadGrid RadGrid_WebBlue" id="OrderBaseCtrl_GXHyperLinkTab_ctl00_FsMain_ProposalDealBANCtrl_FsMain__RadGrid1" style="width: 100%;">
On comparision with other grids, i noticed that this <div> does not have a <table>.
PLease help me.
class AssignBanGridCtrl : WebControl { #region Fields private RadAjaxLoadingPanel _RadLoadingPanel = new RadAjaxLoadingPanel(); private UpdatePanel _UpdatePanel = new UpdatePanel(); private RadGrid _RadGrid1 = new RadGrid(); private PriceDealProductBanTable _PriceDealProductBanTable = new PriceDealProductBanTable(); private PriceDealProposal _Proposal = null; private bool _HasOrderRequest = false; #endregion #region Constructors public AssignBanGridCtrl(PriceDealProposal proposal, bool hasOrderRequest) : base() { } #endregion #region Overrides protected override void OnInit(EventArgs e) { base.OnInit(e); this._RadLoadingPanel.ID = "_RadLoadingPanel"; this._RadLoadingPanel.Transparency = 30; this._RadLoadingPanel.Skin = "WebBlue"; this._RadLoadingPanel.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center; #region Grid1 this._RadGrid1.ID = "_RadGrid1"; this._RadGrid1.Skin = "WebBlue"; this._RadGrid1.Width = Unit.Percentage(100); this._RadGrid1.GridLines = GridLines.None; this._RadGrid1.PageSize = 20; this._RadGrid1.AllowPaging = false; this._RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; this._RadGrid1.AllowSorting = true; this._RadGrid1.AutoGenerateColumns = false; this._RadGrid1.EnableLinqExpressions = false; this._RadGrid1.ShowGroupPanel = false; this._RadGrid1.ShowStatusBar = true; this._RadGrid1.GroupingEnabled = true; this._RadGrid1.ClientSettings.DataBinding.EnableCaching = true; this._RadGrid1.MasterTableView.Width = Unit.Percentage(100); this._RadGrid1.MasterTableView.Caption = "BAN List"; this._RadGrid1.MasterTableView.EnableHeaderContextMenu = true; this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Locations found"; this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource; this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this.xyz.ColumnName }; #region Columns GridBoundColumn boundColumn = new GridBoundColumn(); this._RadGrid1.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = this.xyz.ColumnName;; boundColumn.HeaderText = "Product"; boundColumn = new GridBoundColumn(); this._RadGrid1.MasterTableView.Columns.Add(boundColumn); boundColumn.DataField = this.xyz.ColumnName; boundColumn.HeaderText = "Location"; #endregion #endregion this._UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional; this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadLoadingPanel); this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadGrid1); this.Controls.Add(this._UpdatePanel); } #endregion void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { this.xyz= new DealId().ExecuteTypedDataTable(this._Proposal.PriceDealId); } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); } }But this grid is not visible!
I can see that the grid is populated but still not visible. On debugging i see the grid being rendered as follows:
<div class="RadGrid RadGrid_WebBlue" id="OrderBaseCtrl_GXHyperLinkTab_ctl00_FsMain_ProposalDealBANCtrl_FsMain__RadGrid1" style="width: 100%;">
On comparision with other grids, i noticed that this <div> does not have a <table>.
PLease help me.