function LoadCombo2(combo, eventArqs) {
var item = eventArqs.get_item();
_Combo2.set_text(
"Loading...");
The above funtion gets fired during combo1's fired OnClientSelectedIndexChanging event, which works fine when the page is initially rendered. But after a 'CancelAll' or cancel command, I get the an error on _Combo2.set_text("Loading...");
In fact, no matter what property or method I try to use for combo2, I get the following javascript error...
this.get_element() is null or not an object
Any ideas what is causing this error? I'm using IE7, RadControls for ASP.NET AJAX Q3 2009
Thanks,
weezie
My Default.CS File
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Data;
using
System.Data.SqlClient;
using
Telerik.Web.UI;
namespace
Combotry
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.RadComboBox1.DataBind();
this.RadComboBox1.Text = String.Empty;
//fill the continents combo
LoadCustomerName();
this.Label4.Text = this.RadComboBox1.Text;
}
}
protected void LoadCustomerName()
{
SqlConnection connection = new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True");
SqlDataAdapter adapter = new SqlDataAdapter("usp_GetCustomers", connection);
DataTable dt = new DataTable();
adapter.Fill(dt);
RadComboBox1.DataTextField =
"customerName";
RadComboBox1.DataValueField =
"customerid";
RadComboBox1.DataSource = dt;
RadComboBox1.DataBind();
//insert the first item
RadComboBox1.Items.Insert(0,
new RadComboBoxItem("- Select Customer -"));
this.Label4.Text = this.RadComboBox1.Text;
this.Label4.Text = this.comboValue.Value;
}
protected void LoadStoreID(string customerid)
{
this.Label4.Text = this.RadComboBox1.Text;
this.Label4.Text = this.comboValue.Value;
SqlCommand cmd = new SqlCommand("dbo.StoreID", new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True"));
//select a StoreID based on the CustomerID
//SqlDataAdapter adapter = new SqlDataAdapter("dbo.StoreID", cmd);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
cmd.CommandType =
CommandType.StoredProcedure;
//adapter.SelectCommand.Parameters.AddWithValue("@CustomerID", customerid);
cmd.Parameters.Add(
new SqlParameter("@CustomerID", customerid ));
DataTable dt = new DataTable();
adapter.Fill(dt);
cmd.Connection.Open();
RadComboBox2.DataTextField =
"storeid";
RadComboBox2.DataValueField =
"storeid";
RadComboBox2.DataSource = dt;
RadComboBox2.DataBind();
}
protected void LoadStoreName(string storeid)
{
SqlConnection connection = new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True");
//select a StoreID based on the CustomerID
SqlDataAdapter adapter = new SqlDataAdapter("SELECT name FROM StoreMaster WHERE storeid=@storeid", connection);
adapter.SelectCommand.Parameters.AddWithValue(
"@storeid", storeid);
DataTable dt = new DataTable();
adapter.Fill(dt);
RadComboBox3.DataTextField =
"Name";
RadComboBox3.DataValueField =
"name";
RadComboBox3.DataSource = dt;
RadComboBox3.DataBind();
}
protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
LoadCustomerName();
}
protected void RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
// e.Text is the first parameter of the requestItems method
// invoked in LoadStoreID method
LoadStoreID(e.Text );
}
protected void RadComboBox3_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
// e.Text is the first parameter of the requestItems method
// invoked in LoadStoreName method
LoadStoreName(e.Text);
}
protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
}
}
}
My .ASPX File
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Combotry._Default" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title = "ComboBox"></title>
</
head>
<
body >
<form runat="server" id="mainForm" method="post" style="width: 100%">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<script type="text/javascript">
var supressDropDownClosing = false;
function OnClientDropDownClosing(sender, eventArgs) {
eventArgs.set_cancel(supressDropDownClosing);
}
function OnClientSelectedIndexChanging(sender, eventArgs) {
eventArgs.set_cancel(supressDropDownClosing);
}
function OnClientDropDownOpening(sender, eventArgs) {
supressDropDownClosing =
true;
}
function OnClientBlur(sender) {
supressDropDownClosing =
false;
sender.toggleDropDown();
}
function checkboxClick() {
collectSelectedItems();
}
function getItemCheckBox(item) {
//Get the 'div' representing the current RadComboBox Item.
var itemDiv = item.get_element();
//Get the collection of all 'input' elements in the 'div' (which are contained in the Item).
var inputs = itemDiv.getElementsByTagName("input");
for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {
var input = inputs[inputIndex];
//Check the type of the current 'input' element.
if (input.type == "checkbox") {
return input;
}
}
return null;
}
function collectSelectedItems() {
var combo = $find("<%= RadComboBox1.ClientID %>");
var items = combo.get_items();
var selectedItemsTexts = "";
var selectedItemsValues = "";
var itemsCount = items.get_count();
for (var itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
var item = items.getItem(itemIndex);
var checkbox = getItemCheckBox(item);
//Check whether the Item's CheckBox) is checked.
if (checkbox.checked) {
selectedItemsTexts += item.get_text() +
", ";
selectedItemsValues += item.get_value() +
", ";
}
}
selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);
selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);
//Set the text of the RadComboBox with the texts of the selected Items, separated by ','.
combo.set_text(selectedItemsTexts);
//Set the comboValue hidden field value with values of the selected Items, separated by ','.
//document.getElementById("comboValue").value = selectedItemsValues;
//Clear the selection that RadComboBox has made internally.
if (selectedItemsValues == "") {
combo.clearSelection();
}
}
</script>
<div>
<asp:Label ID="Label1" runat="server"
style="z-index: 1; left: 162px; top: 38px; position: absolute; height: 20px; width: 112px">
CustomerID
</asp:Label>
<input type="hidden" id="comboValue" value="" runat="server" />
<telerik:RadComboBox ID="RadComboBox1"
runat="server"
OnClientSelectedIndexChanging="LoadCustomerName"
OnItemsRequested="RadComboBox1_ItemsRequested"
style="z-index: 1; left: 284px; top: 38px; position: absolute; height: 20px; width: 160px"
AllowCustomText="True" HighlightTemplatedItems="True"
onclientdropdownopening="OnClientDropDownOpening"
OnClientDropDownClosing="OnClientDropDownClosing"
OnClientBlur="OnClientBlur" DataTextField="CustomerName"
DataValueField="CustomerID" Skin="Web20">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" onclick="checkboxClick();" Text='<%# DataBinder.Eval(Container, "Text") %>' />
</ItemTemplate>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<asp:SqlDataSource ID="DataSourceforCustomers" runat="server"
ConnectionString="<%$ ConnectionStrings:ULTIMATE_NEWConnectionString %>"
SelectCommand="usp_GetCustomers" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<asp:Label ID="Label2" runat="server"
style="z-index: 1; left: 537px; top: 38px; position: absolute; height: 20px; width: 83px">
StoreID:
</asp:Label>
<telerik:RadComboBox ID="RadComboBox2"
runat="server"
Width="186px"
OnClientSelectedIndexChanging="LoadStoreName"
OnClientItemsRequested="ItemsLoaded"
OnItemsRequested="RadComboBox2_ItemsRequested"
style="z-index: 1; left: 634px; top: 38px; position: absolute; height: 20px; width: 160px"
DataTextField="StoreID" DataValueField="StoreID" Skin="Web20">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" onclick="checkboxClick();" Text='<%# DataBinder.Eval(Container, "Text") %>' />
</ItemTemplate>
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<asp:SqlDataSource ID="DataSourceforStoreID" runat="server"
ConnectionString="<%$ ConnectionStrings:ULTIMATE_NEWConnectionString %>"
SelectCommand="StoreID" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="RadComboBox1" Name="CustomerID"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label3" runat="server"
style="z-index: 1; left: 907px; top: 38px; position: absolute; height: 20px; width: 103px; right: 599px;">
StoreName:
</asp:Label>
<telerik:RadComboBox ID="RadComboBox3"
runat="server"
Width="186px"
OnClientItemsRequested="ItemsLoaded"
OnItemsRequested="RadComboBox3_ItemsRequested"
style="z-index: 1; left: 1024px; top: 38px; position: absolute; height: 20px; width: 160px" Skin="Web20">
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
</div>
<script type="text/javascript">
//global variables for the countries and cities comboboxes
var StoreIDCombo;
var StoreNameCombo;
function pageLoad() {
// initialize the global variables
// in this event all client objects
// are already created and initialized
StoreIDCombo = $find(
"<%= RadComboBox2.ClientID %>");
StoreNameCombo = $find(
"<%= RadComboBox3.ClientID %>");
}
function LoadCustomerName(combo, eventArqs) {
var item = eventArqs.get_item();
StoreIDCombo.set_text(
"Loading...");
StoreNameCombo.clearSelection();
// if a continent is selected
if (item.get_index() > 0) {
// this will fire the ItemsRequested event of the
// StoreID combobox passing the CustomerName as a parameter
StoreIDCombo.requestItems(item.get_value(), checkboxClick);
}
if (checkbox.checked) {
selectedItemsTexts += item.get_text() +
", ";
selectedItemsValues += item.get_value() +
", ";
}
}
function LoadStoreName(combo, eventArqs) {
var item = eventArqs.get_item();
StoreNameCombo.set_text(
"Loading...");
// this will fire the ItemsRequested event of the
// StoreName combobox passing the StoreID as a parameter
StoreNameCombo.requestItems(item.get_value(),
false );
}
function ItemsLoaded(combo, eventArqs) {
if (combo.get_items().get_count() > 0) {
// pre-select the first item
combo.set_text(combo.get_items().getItem(0).get_text());
combo.get_items().getItem(0).highlight();
}
combo.showDropDown();
}
function collectSelectedItems() {
var combo =$find ("<%= RadComboBox1.ClientID %>");
var items = combo.get_items();
var selectedItemsTexts = "";
var selectedItemsValues = "";
var itemsCount = items.get_count();
for (var itemIndex = 0; itemIndex < itemsCount; itemIndex++) {
var item = items.getItem(itemIndex);
var checkbox = getItemCheckBox(item);
//Check whether the Item's CheckBox) is checked.
if (checkbox.checked) {
selectedItemsTexts += item.get_text() +
", ";
selectedItemsValues += item.get_value() +
", ";
}
}
selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);
selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);
//Set the text of the RadComboBox with the texts of the selected Items, separated by ','.
combo.set_text(selectedItemsTexts);
//Set the comboValue hidden field value with values of the selected Items, separated by ','.
}
</script>
<p>
</p>
<asp:Label ID="Label4" runat="server"
style="z-index: 1; left: 10px; top: 95px; position: absolute; height: 149px; width: 418px"
Text="Label"></asp:Label>
</form>
</
body>
</
html>

private
void DefineRadGridMarketsStructure()
{
object objDbId = SessionManager.GetSessionObject("INSTR_ID");
if (objDbId != null)
{
_dbId = (
int)objDbId;
}
grid =
new RadGrid();
grid.ID =
"radGridMarkets";
//grid.DataSourceID = "objContDSMarkets";
grid.AutoGenerateColumns =
false;
grid.AllowSorting =
true;
grid.AllowMultiRowSelection =
true;
grid.AllowMultiRowEdit =
true;
grid.GridLines =
GridLines.None;
grid.Height =
Unit.Pixel(400);
grid.Width =
Unit.Percentage(100);
grid.AllowPaging =
true;
grid.PageSize = 1000;
grid.GroupingSettings.CaseSensitive =
false;
grid.EnableLinqExpressions =
false;
String htmlColor = "#EDEFF1";
Color backColor = ColorTranslator.FromHtml(htmlColor);
grid.AlternatingItemStyle.BackColor = backColor;
String editColor = "#A2A2A2";
Color editbackColor = ColorTranslator.FromHtml(editColor);
grid.EditItemStyle.BackColor = editbackColor;
grid.EditItemStyle.Font.Name =
"arial";
grid.EditItemStyle.Font.Size =
new FontUnit("11px");
//grid.BorderColor = Color.Blue;
grid.MasterTableView.Width =
Unit.Percentage(100);
grid.MasterTableView.AllowFilteringByColumn =
true;
grid.MasterTableView.AllowPaging =
true;
grid.MasterTableView.PagerStyle.AlwaysVisible =
true;
grid.MasterTableView.PagerStyle.Position =
GridPagerPosition.TopAndBottom;
grid.MasterTableView.PagerStyle.Mode =
GridPagerMode.NextPrevNumericAndAdvanced;
grid.ClientSettings.AllowKeyboardNavigation =
true;
grid.ClientSettings.Selecting.AllowRowSelect =
true;
grid.ClientSettings.Scrolling.AllowScroll =
true;
grid.ClientSettings.Scrolling.UseStaticHeaders =
true;
grid.ClientSettings.Resizing.AllowColumnResize =
true;
grid.ClientSettings.Resizing.AllowRowResize =
true;
grid.ClientSettings.Resizing.ResizeGridOnColumnResize =
true;
grid.ClientSettings.Resizing.EnableRealTimeResize =
true;
grid.ClientSettings.Scrolling.ScrollHeight =
Unit.Pixel(320);
grid.FilterMenu.EnableTheming =
true;
grid.FilterMenu.CollapseAnimation.Duration = 200;
grid.FilterMenu.CollapseAnimation.Type =
AnimationType.OutQuint;
//Add Master table
grid.MasterTableView.Name =
"Market";
grid.MasterTableView.PageSize = 1000;
grid.MasterTableView.EditMode =
GridEditMode.InPlace;
grid.MasterTableView.TableLayout =
GridTableLayout.Fixed;
GridClientSelectColumn col0 = new GridClientSelectColumn();
col0.UniqueName =
"marketcheckBoxColumn";
grid.MasterTableView.Columns.Add(col0);
grid.MasterTableView.Columns[0].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[0].ItemStyle.Width =
Unit.Percentage(10);
//grid.MasterTableView.Columns[0].HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
//grid.MasterTableView.Columns[0].ItemStyle.HorizontalAlign = HorizontalAlign.Center;
GridEditCommandColumn col1 = new GridEditCommandColumn();
col1.ButtonType =
GridButtonColumnType.ImageButton;
col1.UpdateImageUrl =
"../images/Update.gif";
col1.EditImageUrl =
"../images/Edit.gif";
col1.InsertImageUrl =
"../images/Insert.gif";
col1.CancelImageUrl =
"../images/Cancel.gif";
col1.UniqueName =
"EditCommandColumn";
grid.MasterTableView.Columns.Add(col1);
grid.MasterTableView.Columns[1].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[1].ItemStyle.Width =
Unit.Percentage(10);
GridButtonColumn col2 = new GridButtonColumn();
col2.Text =
"Delete";
col2.ConfirmText =
"Delete this product?";
col2.ButtonType =
GridButtonColumnType.ImageButton;
col2.ImageUrl =
"../images/Delete.gif";
col2.CommandName =
"Delete";
col2.UniqueName =
"DeleteColumn";
grid.MasterTableView.Columns.Add(col2);
grid.MasterTableView.Columns[2].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[2].ItemStyle.Width =
Unit.Percentage(10);
GridCheckBoxColumn col3 = new GridCheckBoxColumn();
col3.UniqueName =
"colActive";
col3.HeaderText =
"Active";
col3.AllowFiltering =
false;
grid.MasterTableView.Columns.Add(col3);
grid.MasterTableView.Columns[3].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[3].ItemStyle.Width =
Unit.Percentage(10);
GridBoundColumn col4 = new GridBoundColumn();
//col4.DataField = "Tag";
col4.DataField =
"mkt_tag";
col4.UniqueName =
"colTag";
col4.HeaderText =
"Tag";
//col3.ReadOnly = true;
grid.MasterTableView.Columns.Add(col4);
grid.MasterTableView.Columns[4].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[4].ItemStyle.Width =
Unit.Percentage(10);
string templateColumnName = "Country";
GridTemplateColumn col5 = new GridTemplateColumn();
col5.ItemTemplate =
new ItemTemplate(templateColumnName);
col5.EditItemTemplate =
new EditItemTemplate(templateColumnName,_dbId);
col5.HeaderText =
"Country";
col5.UniqueName =
"colCountry";
grid.MasterTableView.Columns.Add(col5);
grid.MasterTableView.Columns[5].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[5].ItemStyle.Width =
Unit.Percentage(10);
GridBoundColumn col6 = new GridBoundColumn();
//col6.DataField = "ShortDescription";
col6.DataField =
"mkt_sdesc";
col6.UniqueName =
"colShortDescription";
col6.HeaderText =
"Short Description";
col6.MaxLength = 40;
grid.MasterTableView.Columns.Add(col6);
grid.MasterTableView.Columns[6].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[6].ItemStyle.Width =
Unit.Percentage(10);
GridBoundColumn col7 = new GridBoundColumn();
col7.DataField =
"mkt_sdesc2";
col7.UniqueName =
"colShortDescription2";
col7.HeaderText =
"Short Description 2";
col7.MaxLength = 40;
grid.MasterTableView.Columns.Add(col7);
grid.MasterTableView.Columns[7].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[7].ItemStyle.Width =
Unit.Percentage(10);
GridBoundColumn col8 = new GridBoundColumn();
//col8.DataField = "LongDescription";
col8.DataField =
"mkt_ldesc";
col8.UniqueName =
"colLongDescription";
col8.HeaderText =
"Long Description";
col8.MaxLength = 80;
grid.MasterTableView.Columns.Add(col8);
grid.MasterTableView.Columns[8].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[8].ItemStyle.Width =
Unit.Percentage(10);
templateColumnName =
"QCInstructions";
GridTemplateColumn col9 = new GridTemplateColumn();
col9.DataField =
"QCInstructions";
col9.ItemTemplate =
new ItemTemplate(templateColumnName);
col9.EditItemTemplate =
new EditItemTemplate(templateColumnName, _dbId);
col9.HeaderText =
"QC Instructions";
col9.UniqueName =
"colQCInstructions";
grid.MasterTableView.Columns.Add(col9);
grid.MasterTableView.Columns[9].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[9].ItemStyle.Width =
Unit.Percentage(10);
GridBoundColumn col11 = new GridBoundColumn();
col11.DataField =
"nshops";
col11.UniqueName =
"colNShops";
col11.HeaderText =
"NShops";
col11.MaxLength = 5;
grid.MasterTableView.Columns.Add(col11);
grid.MasterTableView.Columns[10].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[10].ItemStyle.Width =
Unit.Percentage(10);
GridTemplateColumn col12 = new GridTemplateColumn();
col12.ItemTemplate =
new ItemTemplate("PeriodLength");
col12.EditItemTemplate =
new EditItemTemplate("PeriodLength", _dbId);
col12.UniqueName =
"colPeriodLength";
col12.HeaderText =
"Period Length";
grid.MasterTableView.Columns.Add(col12);
grid.MasterTableView.Columns[11].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[11].ItemStyle.Width =
Unit.Percentage(10);
DataSet ds = new DataSet();
DBConnectionUtility dbcon = new DBConnectionUtility();
ds = dbcon.GetDataTable(
"Select db_char_name_id , 'Char_' || char_name as Char_name from axnadmin.gs_clt_db_char_names where clt_db_id= " + _dbId +
" and dimension_id = 1");
_noOfChars = ds.Tables[0].Rows.Count;
_dtCharNames = ds.Tables[0];
StringBuilder sb = new StringBuilder();
sb.Append(
"clt_db_id,mkt_id,mkt_tag,country,qcinstructions,periodlength,Active");
for (int i = 0; i < _noOfChars ; i++)
{
GridTemplateColumn col13 = new GridTemplateColumn();
col13.ItemTemplate =
new ItemTemplate(ds.Tables[0].Rows[i]["Char_Name"].ToString());
col13.EditItemTemplate =
new EditItemTemplate(ds.Tables[0].Rows[i]["Char_Name"].ToString(),_dbId);
col13.HeaderText = ds.Tables[0].Rows[i][
"Char_Name"].ToString();
col13.UniqueName =
"colChar" + ds.Tables[0].Rows[i]["Char_Name"];
sb.Append(
",");
sb.Append(ds.Tables[0].Rows[i][
"Char_Name"].ToString());
grid.MasterTableView.Columns.Add(col13);
grid.MasterTableView.Columns[i + 12].HeaderStyle.Width =
Unit.Percentage(10);
grid.MasterTableView.Columns[i + 12].ItemStyle.Width =
Unit.Percentage(10);
}
string dataKeyNames = sb.ToString();
grid.MasterTableView.DataKeyNames = dataKeyNames.Split(
',');
grid.NeedDataSource +=
new GridNeedDataSourceEventHandler(this.RadGridMarkets_NeedDataSource);
//grid.DeleteCommand += new GridCommandEventHandler(this.RadGridMarkets_DeleteCommand);
//grid.UpdateCommand += new GridCommandEventHandler(this.RadGridMarkets_UpdateCommand);
//grid.InsertCommand += new GridCommandEventHandler(this.RadGridMarkets_InsertCommand);
grid.ItemDataBound +=
new GridItemEventHandler(this.RadGridMarkets_ItemDataBound);
grid.ItemCommand +=
new GridCommandEventHandler(this.RadGridMarkets_ItemCommand);
MessageControl MessageUserControl = (MessageControl)LoadControl("~/Common/CommonUI/MessageControl/MessageControl.ascx");
MessageUserControl.ID =
"lblMessageUserControl";
//objContainer.Selecting += new EventHandler<ObjectContainerDataSourceSelectingEventArgs>(this.objContDSMarkets_Selecting);
grid.MasterTableView.CommandItemTemplate =
new MarketCommandItemTemplate();
grid.MasterTableView.CommandItemDisplay =
GridCommandItemDisplay.Top;
// Add the grid to the placeholder
this.radAjaxPanelMarkets.Controls.Add(MessageUserControl);
this.radAjaxPanelMarkets.Controls.Add(grid);
//this.radAjaxPanelMarkets.Controls.Add(objContainer);
}
Thanks and Regards
V.Balamurali