Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
102 views
hi,

i am new in telerik world, i have rad grid, whose first column as a check box, and another as rad numeric text box, which is disabled by default and got enabled only when the check box is checked. And i have one check box in the header template of the first column to check all. my scenario is like this.
i checked the header checkbox and changed one text box value, after that i unchecked the checkbox of that row, i need to rebind that row only, meaning i have to get back the old value in the rad numeric text box, is it possible? pls help.
am pasting my code below
protected void SelectAll_CheckedChangedEvent(object sender, EventArgs e)
        {
           CheckBox SelectAll = sender as CheckBox;
           foreach (GridItem item in grdOnDSelection.Items)
           {
             if (SelectAll.Checked == true)
               {
                  CheckBox chk = (CheckBox)item.Cells[2].FindControl("chkOnDSelection");
                   chk.Checked = true;
                    RadNumericTextBox txtDsicountPercent = (RadNumericTextBox)item.Cells[7].FindControl("txtDsicountPercent");
                        txtDsicountPercent.Enabled = true;
                    }
                    else
                    {
                        RadNumericTextBox txtDsicountPercent = (RadNumericTextBox)item.Cells[7].FindControl("txtDsicountPercent");
                        txtDsicountPercent.Enabled = false;
 
                        grdOnDSelection.Rebind();
                    }
                }
           
        }
 
protected void chkOnDSelection_checkedChangedEvent(object sender, EventArgs e)
 {
((sender as CheckBox).NamingContainer as GridItem).Selected = (sender as CheckBox).Checked;
                CheckBox chk = sender as CheckBox;
                GridItem item = chk.NamingContainer as GridItem;
                if (chk.Checked && item.Cells[7].FindControl("txtDsicountPercent") is RadNumericTextBox)
                {
                    RadNumericTextBox txtDsicountPercent = (RadNumericTextBox)item.Cells[7].FindControl("txtDsicountPercent");
                    txtDsicountPercent.Enabled = true;
                }
                if (chk.Checked == false && item.Cells[7].FindControl("txtDsicountPercent") is RadNumericTextBox)
                {
                    RadNumericTextBox txtDsicountPercent = (RadNumericTextBox)item.Cells[7].FindControl("txtDsicountPercent");
                    txtDsicountPercent.Enabled = false;
                    //grdOnDSelection.Rebind();//all chkboxes will be deselected
                }
}
Ami
Top achievements
Rank 1
 asked on 02 Jan 2013
11 answers
1.8K+ views
Does anyone know where to get or how to make the ConfiguratorPanel that is shown on many of the demo pages of the telerik controls? Is this a control that is available? Or something we can get? I need something EXACTLY like it! (A sliding/expanding panel?)

See "Configure Rotator Type":
http://demos.telerik.com/aspnet-ajax/rotator/examples/rotatortypes/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/rotator/examples/default/defaultcs.aspx

See "Configurator"
http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/mainareacustomization/defaultcs.aspx

Thanks,
~bg
Maria Ilieva
Telerik team
 answered on 02 Jan 2013
11 answers
279 views
I have tried several possibilities, none of which seem to work.  I need the "Variable" column to be editable on an Insert, but not editable on an edit.  The "Value" column has to be editable in both cases.

The first and third possibilities both leave the "Variable" column editable always.  The middle leaves the "Variable" column never editable.  What am I missing?

BTW the examples on how to do the first possibility leave out exactly how to set the readonly property.

        protected void SubstitutionVariables_OnItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                if (e.Item.OwnerTableView.IsItemInserted)
                {
                    Telerik.Web.UI.RadTextBox tb = (Telerik.Web.UI.RadTextBox)e.Item.FindControl("rtbSubstVarEdit");
                    tb.Visible = true;
                    tb.ReadOnly = false;
                    tb.Enabled = true;
                }
                else
                {
                    Telerik.Web.UI.RadTextBox tb = (Telerik.Web.UI.RadTextBox)e.Item.FindControl("rtbSubstVarEdit");
                    tb.Visible = true;
                    tb.ReadOnly = true;
                    tb.Enabled = false;
                }
            }
        }

        protected void SubstitutionVariables_OnColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
        {
            if (e.Column.UniqueName == "Variable")
            {
                GridBoundColumn Column = (GridBoundColumn)e.Column;
                Column.ReadOnly = !e.OwnerTableView.IsItemInserted;
            }
        }

            <telerik:RadGrid ID="RadGrid1" runat="server"
                AllowMultiRowSelection="true"
                AllowAutomaticDeletes="false"
                AllowAutomaticInserts="true"
                AllowAutomaticUpdates="true"
                AllowFilteringByColumn="false"
                AllowMultiRowEdit="false"
                AllowPaging="false"
                AllowSorting="false"
                OnNeedDataSource="SubstitutionVariables_OnNeedDataSource"
                OnColumnCreated="SubstitutionVariables_OnColumnCreated"
                OnItemCreated="SubstitutionVariables_OnItemCreated"
                OnUpdateCommand="SubstitutionVariables_OnUpdate"
                OnInsertCommand="SubstitutionVariables_OnInsert"
                OnDeleteCommand="SubstitutionVariables_OnDelete">

                <ClientSettings><Selecting AllowRowSelect="true" /></ClientSettings>
                <MasterTableView InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="InPlace" >
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
                        <telerik:GridTemplateColumn DataField="Variable" HeaderText="Variable" UniqueName="SubstitutionVariable"
                            Visible="false" >
                            <ItemTemplate>
                                <asp:Label ID="lblSubstVar" runat="server" ClientIDMode="Static"
                                    Width="150px" />
                            </ItemTemplate>
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="rtbSubstVarEdit" runat="server" ClientIDMode="Static"
                                    Width="150px" />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="rtbSubstVarEdit" runat="server" ClientIDMode="Static" ReadOnly="true"
                                    Width="150px" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Value" HeaderText="Value" UniqueName="SubstitutionValue"
                            Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblSubstValue" runat="server" ClientIDMode="Static"
                                    Width="150px" />
                            </ItemTemplate>
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="rtbSubstValueEdit" runat="server" ClientIDMode="Static"
                                    Width="150px" />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="rtbSubstValueEdit" runat="server" ClientIDMode="Static"
                                    Width="150px" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <CommandItemTemplate>
                    </CommandItemTemplate>
                </MasterTableView>
            </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 02 Jan 2013
2 answers
253 views
Hi,

I want to set the default image url for my command columns(Edit/Delete/Update/Cancel) like what I did for add new record or refresh button. Is that possible? I can change the caption using RadGrid.Main.resx in App_GlobalResources but no luck for image url.


Thanks for your concern
Shinu
Top achievements
Rank 2
 answered on 02 Jan 2013
0 answers
160 views
I 'm doing some customization on an existing page which uses a RadAjaxManager to update some controls.
I have a check box "chkEndUser" which on checking  updates other controls (ddlenduser,....).
When you checks the code,you will find that each control updates the others,so I added an Ajax setting for each control.
When I check the chkEndUser  the RadAjaxLoadingPanel appears on this control,but the control still disabled(not updated).
When I remove RadAjaxManag every thing goes right.


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>          
           <telerik:AjaxSetting AjaxControlID="btnReturnBack">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridDeliveryInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="error" LoadingPanelID="RadAjaxLoadingPanel1" />                                                          
                </UpdatedControls>
            </telerik:AjaxSetting>              
           <telerik:AjaxSetting AjaxControlID="btnApplyVendorToAllItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPOInfo" LoadingPanelID="RadAjaxLoadingPanel1" />                                      
                </UpdatedControls>
            </telerik:AjaxSetting>    
           <telerik:AjaxSetting AjaxControlID="grdItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="error" LoadingPanelID="RadAjaxLoadingPanel1" />                   
                </UpdatedControls>
            </telerik:AjaxSetting>           
            <telerik:AjaxSetting AjaxControlID="grdPOInfo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPOInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridDeliveryInfo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridDeliveryInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkEndUser">
                <UpdatedControls>
                
                    <telerik:AjaxUpdatedControl ControlID="ddlEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />                    
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />
                                      
                </UpdatedControls>
            </telerik:AjaxSetting>

            <telerik:AjaxSetting AjaxControlID="ddlEndUser">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />
                      <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />
                      <telerik:AjaxUpdatedControl ControlID="chkEndUser" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    
                </UpdatedControls>
            </telerik:AjaxSetting>

            <telerik:AjaxSetting AjaxControlID="grdVendorInfo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdVendorInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlSSJustification" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lblSSJustification" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="txtSSJustification" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlSSJustification">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblSSJustification" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="txtSSJustification" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkResearchProjectBudget">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />                    
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkBudget">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />                    
                </UpdatedControls>
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="ddlResearchProjectBudget">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="ddlBudgets" LoadingPanelID="RadAjaxLoadingPanel1" />
                                                            
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlBudgets">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItems" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkBudget" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="ddlResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    <telerik:AjaxUpdatedControl ControlID="chkResearchProjectBudget" LoadingPanelID="RadAjaxLoadingPanel1" />
                                                           
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSaveCurrentStatus">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtCurrentStatus" LoadingPanelID="RadAjaxLoadingPanel1" />                                         
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnClearCurrentStatus">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="txtCurrentStatus" LoadingPanelID="RadAjaxLoadingPanel1" />                                         
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="optMultiVendors">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnl_poTab_vendorOptein_details" LoadingPanelID="RadAjaxLoadingPanel1" />   
                    <telerik:AjaxUpdatedControl ControlID="optMultiVendors" />
                    <telerik:AjaxUpdatedControl ControlID="optSingleVendor" />                                                           
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="optSingleVendor">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnl_poTab_vendorOptein_details" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="optMultiVendors"  />
                    <telerik:AjaxUpdatedControl ControlID="optSingleVendor" />                                         
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="0">
        <table style="width: 100%; height: 100%;">
            <tr style="height: 100%;">
                <td style="width: 100%; text-align: center; vertical-align: middle;">
                    <img alt="Loading..." src="../Images/6.gif" style="border-right: 0px; border-left: 0px;
                        border-top: 0px; border-bottom: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
Amer
Top achievements
Rank 1
 asked on 02 Jan 2013
2 answers
227 views

Hi,

I have an issue on rad html chart; I have a page with rad html pie charts (more than one) inside the rad grid. In grid we have button to select the line and will click on that display the rad pop up window.
 
My issue is when opening that rad window main page rad html pie charts are disappearing. After I close that rad window and refresh page, it will load correctly.
 
need an answer as soon as possible

cheers
Waruni

waruni
Top achievements
Rank 1
 answered on 02 Jan 2013
0 answers
115 views

This is how I set up my AjaxManager:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>


I also have this at the top of my page:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                var ajaxManager;
                function pageLoad()
                {
                    ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");               
                }
    
                function refreshGrid(arg) {
                    if (ajaxManager != null) {
                        ajaxManager.ajaxRequest(arg);
                    }
                    else
                        alert('no element');
                 }                
            </script>
        </telerik:RadCodeBlock>

In the code behind I am getting the data to the control the first time using the Need Data Source. It is pulling from an object that generates xml which I convert to a datatset.

XmlDocument response = request.Send();
XmlReader xmlReader = new XmlNodeReader(response.SelectSingleNode("response/content/readbyquery/collection"));
dsCatalog.ReadXml(xmlReader);
RadGrid1.DataSource = dsCatalog;

This seems to work fine. The data is populated. I have a treelist and a radgrid on the page. Both are generated just fine. I set the tree list to use a javascript function when you click on the element which calls refreshGrid with an ID.

The refresh calls the function in the code behind, which pulls down my xml again with different results but the data is never updated in the RadGrid.

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
...
XmlDocument response = request.Send();
XmlReader xmlReader = new XmlNodeReader(response.SelectSingleNode("response/content/readbyquery/collection"));
dsCatalog.ReadXml(xmlReader);
RadGrid1.Rebind();
}

Does the rebinding only work with the same dataset? Can it be completely different? Do you see anything in my code that would cause the data not to change?
           
Kyle
Top achievements
Rank 1
 asked on 02 Jan 2013
9 answers
455 views
Hello,

I am having hard time to code for RadTreeView in a RadComboBox. I am using VB.NET. I cannot see the RadTreeView instance at all
from the code behind. Even if I try the FindControl method! I have to dynamically populate the treenodes with data from SQL Server

ASPX code:
<span><telerik:RadComboBox ID="ddDocType" runat="server" Width="200px" ShowToggleImage="True" Style="vertical-align: middle;" >
    <ItemTemplate>
        <div id="div1">
    <telerik:RadTreeView ID="rtvDocType" runat="server" Width="300px" Height="250px">
        <DataBindings>
            <telerik:RadTreeNodeBinding Expanded="True" />
        </DataBindings>
    </telerik:RadTreeView>
        </div>
    </ItemTemplate>
</telerik:RadComboBox></span>

VB.NET code:

 

 

Dim tvDoc As RadTreeView = New RadTreeView()

 

tvDoc =

CType(FindControl("rtvDocType"), RadTreeView)

 

tvDoc.Nodes.Clear()

 

 


Here tvDoc gives a ERROR 'NullReferenceException'

How can I make it work. Is there any working example where the Nodes are dinamically added from code behind for the RadTreeView
in a RadComboBox?

Thanks,
Sanjay

 

Atul
Top achievements
Rank 1
 answered on 02 Jan 2013
5 answers
120 views
I can get the tree list working fine when I use attribute based xml.
<catalog>
<catalogitem id="1" name="test 1"/>
<catalogitem id="2" name="test 2"/>
</catalog>

but the xml I'm getting from a web service is doing this:
<catalog>
    <catalogitem>
        <id>1</id>
        <name>test 1</name>
    <catalogitem>
    <catalogitem>
        <id>2</id>
        <name>test 2</name>
    <catalogitem>
</catalog>

I have no problem binding the RadGrid to the xml like the latter but I can't seem to figure out how to do it for a treelist.

Also, is there any way to start the parent id as 0 instead of null/empty??
Kyle
Top achievements
Rank 1
 answered on 02 Jan 2013
0 answers
106 views
I've seen a similar post for this back in 2009, but it was not solved.

I'm receiving an error on the Grid / Editing with External Form demo when I created locally.

Object reference not set to an instance of an object


Line 88:         protected void Page_Load(object sender, System.EventArgs e)
Line 89:         {
Line 90:             RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1, PlaceHolder.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel);
Line 91:             //store the clientID of the grid to reference it later on the client
Line 92:             RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(string.Format("window['gridId'] = '{0}';", RadGrid1.ClientID));

When I debug, I notice that placeHolder is still returning a NULL value:

 private Control placeHolder;
        private Control PlaceHolder
        {
            get
            {
                if (placeHolder == null)
                {
                    placeHolder = this.Page.Master.FindControl("ContentPlaceHolder1");
                }
                return placeHolder;
            }

Any ideas?

Thanks, Trisha
Bohemi
Top achievements
Rank 1
 asked on 02 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?