Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
I have an example:

If I address the link http://domain.com/index.aspx, RadComboBox works fine and everything is smooth. But I implement the URL Rewrite and browse the link http://domain.com/home-page.html, RadComboBox shows javascript error message when I type the chracter ('). It shows "Incorrect syntax near 's'. Unclosed quotation mark...".

Please see an attachment and help me fix this issue.

P/S: I am using RewriteModule (written by C# DEV) not use IIS Rewrite module.

Thanks
Helen
Telerik team
 answered on 02 Jan 2013
6 answers
821 views
Hello,

I have implemented RadTreeList client side selection functionality, which does as follows: 

1. When i select Parent, it select all child.
2. When I deselect Parent, it deselect all child.
3. When I deselect child, No effect occurs. All selection remains as it is except current selection.
4. When I select the child, It should select parent item of that child not all child.

Now I using this script I can get first 3 rules but cannot get 4th one.

Here I have created Script as bellow:

Script:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function OnClientNodeClicked(sender, args) {
            var currNode = args.get_item();
            var childNodes = currNode.get_childItems();
            var nodeCount = currNode.get_childItems().length;
            if (nodeCount > 0) {
                var isChecked = currNode.get_selected();
                UpdateAllChildren(currNode, childNodes, nodeCount, isChecked);
            }
        }
 
        function UpdateAllChildren(currNode, nodes, nodecount, checked) {
            var i;
            for (i = 0; i < nodecount; i++) {
                if (checked) {
                    nodes[i].set_selected(true);
                }
                else {
                    nodes[i].set_selected(false);
                }
            }
        }
    </script>
</telerik:RadCodeBlock>


RadTreeList HTML:

<telerik:RadTreeList ID="rtlBusinessUnit" runat="server" DataKeyNames="Business_Unit_ID"
                    ClientSettings-AllowPostBackOnItemClick="false" OnNeedDataSource="rtlBusinessUnit_OnNeedDataSource"
                    ParentDataKeyNames="ParentBUID" OnItemCreated="rtlBusinessUnit_OnItemCreated"
                    OnItemDataBound="rtlBusinessUnit_OnItemDataBound" AutoGenerateColumns="false"
                    AllowMultiItemSelection="true">
                    <Columns>
                        <telerik:TreeListSelectColumn HeaderStyle-Width="38px" UniqueName="BussinessUnitCheckboxes">
                        </telerik:TreeListSelectColumn>
                        <telerik:TreeListBoundColumn DataField="Business_Unit_ID" HeaderText="Business_Unit_ID"
                            Visible="false" UniqueName="Business_Unit_ID" />
                        <telerik:TreeListBoundColumn DataField="LegalName" HeaderText="Name" UniqueName="LegalName" />
                        <telerik:TreeListBoundColumn DataField="Business_Unit_ID" HeaderText="Business_Unit_ID"
                            Visible="false" UniqueName="Business_Unit_ID" HeaderStyle-Width="80px" />
                    </Columns>
                    <ClientSettings>
                        <ClientEvents OnItemSelected="OnClientNodeClicked" OnItemDeselected="OnClientNodeClicked" />
                        <Selecting AllowItemSelection="true" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="300" />
                    </ClientSettings>
                </telerik:RadTreeList>

Marin
Telerik team
 answered on 02 Jan 2013
2 answers
176 views
I have a number of combo boxes on a web page that are all defined the same.

<telerik:RadComboBox   
ID="ListingState"   
TabIndex="4"   
EnableEmbeddedSkins="true"   
Skin="Black"   
runat="server"   
Width="250px"   
MarkFirstMatch="true"   
Height="200px"   
ToolTip="Select your state/province."   
OnClientSelectedIndexChanging="LoadCities"   
OnItemsRequested="ListingState_ItemsRequested" 
OnClientItemsRequested="ItemsLoaded" 
> 
</telerik:RadComboBox> 

Basically, all the combo boxes are setup to allow the user to key in their desired selection and have the combo box  move to that item.
When these combo boxes are populated, the "text" is populated using a string (such as Province/State name as in the above) and the "value" is populated using an Integer value that is the key to the database record represented in the combo box.

If the user keys in the desired value and, when the combo box locates the desired item, then the user tabs out of the field, the "combobox.selected value" is not being set and the cannot be retrieved (the code behind "blows up" because there is no integer value obtained from the selected value).  The "selected value" property returns a null value.

However, if the user mouse clicks on a specific item in the combo box, then the :selectedvalue" property returns the integer value and the code behind works fine.

Why?  If the user locates an item by keying and then tabs out, how do I pick up the value of the item that is displayed in the combo box and how do I know that this event has occurred?

Thanks in advance!

Lynn
Amjad
Top achievements
Rank 1
 answered on 02 Jan 2013
0 answers
92 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.5K+ 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
252 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
232 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
140 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
212 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
94 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?