Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
177 views
Hi All,
 I am facing so much problem in Rad  Tab.Actually master page is not getting updated.so i used update panel.After adding Update Panel i got this type of error which is dedefined below. while click on any module which is used telerik rad tab,i am getting this below error in pop up window.
  
Please help me to fix this issue.


Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element. 

              This is code--
 <body scroll="no">
    <form id="thisMainform" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

  <%--  Added UpdatePanel to refresh the page  for opening proper Help Docs--%>
    <asp:UpdatePanel ID ="Updatecontrols" runat="server" >
    <ContentTemplate>
    <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"
        bgcolor="#ffffff">
        <tbody>
            <tr>
                <td align="center" valign="middle" class="headerbg" height="14%">
                    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="left" valign="middle" class="logo" style="padding-left: 10px">
                                <img runat="server" src="~/images/Client_Logo.png" />
                            </td>
                            <td align="right" valign="top">
                                <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td align="right" valign="top">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td colspan="7" align="right" style="padding-right: 10px;" height="45">
                                                        <img runat="server" src="~/images/adaptive_logo.gif" width="246" height="37" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="75%" align="left" valign="top">
                                                        <asp:Label ID="lblUserName" runat="server" Text="Label"></asp:Label>
                                                    </td>
                                                    <td width="24" align="left" valign="middle">
                                                        <img runat="server" src="~/images/Home_icon.gif" width="14" height="14" hspace="5" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkBtnHome" runat="server" Text="Home" PostBackUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx"
                                                            CausesValidation="false" />
                                                    </td>
                                                    <td width="25" align="left" valign="top">
                                                        <img runat="server" src="~/images/Help_icon.gif" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnHelp" runat="server" Text="Help" CausesValidation="false" />
                                                    </td>
 
                                                      <td width="25" align="left" valign="top">
                                                        <img id="ImgVLink" runat="server" src="~/images/video.png" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                  
                                                        <asp:LinkButton ID="lnkBtnVLink"  runat="server" Text="Video"  CausesValidation="false" /> 
                                                       <%--  OnClick="ShowVLink()"--%> 
                                                    </td>



                                                    <td width="25" align="left" valign="top">
                                                        <img id="imgLogout" runat="server" src="~/images/Loigout_icon.gif" width="18" height="20" />
                                                    </td>
                                                    <td width="133" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnLogout" runat="server" OnClick="lnkbtnLogout_Click" Text="Logout"
                                                            CausesValidation="false" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="6" colspan="2" align="left" valign="top" bgcolor="#4DA5CF">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top" height="77%">
                    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <telerik:radtabstrip runat="server" id="RadTabMain" width="100%" skin="Office2007"
                                    selectedindex="0">
                                    <Tabs>
                                        <telerik:RadTab runat="server" Text="Adaptive Portfolio System" Value="portfolio"
                                            NavigateUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx" />
                                        <telerik:RadTab runat="server" Text="Adaptive Management System" Value="Management"
                                            NavigateUrl="~/AdaptiveManagement/bin-release/AMSHome.aspx" />
                                    </Tabs>
                                </telerik:radtabstrip>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" height="100%">
                                <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server">
                                </asp:ContentPlaceHolder>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
</tbody>
    </table>
   
   </ContentTemplate>
 </asp:UpdatePanel>
Nencho
Telerik team
 answered on 13 Mar 2013
0 answers
96 views
Hi,

I am using RadGrid in my webpage.

I want to use the Export to Excel option for my criteria.

If I am having 1000 rows in a grid , that should be exported to 10 sheets in a same Excel workbook.

that is 1000 rows split into 10 sheets each having 100 rows in that.(Row Count is variable)

Please anyone help me in this.

Thanks in advance.
---------
AGMRAJA
Agm
Top achievements
Rank 1
 asked on 13 Mar 2013
2 answers
204 views
Hi.. I need to add drop down list for LeaveType to Choose the available Leavetype.. Can i know how to insert the drop drown box in leavetype column.. 


<telerik:RadGrid ID="dgLeaveDetails" ShowFooter="true" PageSize="10" runat="server"
       AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="True">
       <MasterTableView CommandItemDisplay="Top" GridLines="None" AutoGenerateColumns="false"
           DataKeyNames="EmployeeID" AllowMultiColumnSorting="true">
           <CommandItemSettings ShowAddNewRecordButton="true" />
           <Columns>
               <telerik:GridBoundColumn SortExpression="EmployeeID" HeaderText="Employee ID" HeaderButtonType="TextButton"
                   Visible="false" UniqueName="EmployeeID" DataField="EmployeeID">
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn SortExpression="EmpName" HeaderText="Employee Name" HeaderButtonType="TextButton"
                   DataField="Name" UniqueName="EmpName" Visible="True" >
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn SortExpression="LeaveType" HeaderText="Leave Type" HeaderButtonType="TextButton"
                   Visible="True" DataField="CodeHRLeaveType" UniqueName = "LeaveType">
               </telerik:GridBoundColumn>                     
               <telerik:GridBoundColumn SortExpression="Entitlement" HeaderText="Entitlement" HeaderButtonType="TextButton"
                   DataField="LeaveBalance">
               </telerik:GridBoundColumn>
               <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="myEditColumn" />
               <telerik:GridButtonColumn UniqueName="myDeleteColumn" ConfirmText="Are You Sure Delete This Record?"
                   ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"
                   CommandName="Delete" ConfirmDialogHeight="100px" ConfirmDialogWidth="320px" />
           </Columns>
           <FooterStyle Font-Bold="true" Font-Italic="true" HorizontalAlign="Right" />
       </MasterTableView>
   </telerik:RadGrid>
Testing
Top achievements
Rank 1
 answered on 13 Mar 2013
12 answers
674 views
Hi All,

As per my requirement, I need the Edit mode to be 'In place'  for a radgrid where the columns are added dynamically to the grid and the binding data to grid  is also dynamic

In this ,most peculiar requirement is adding the controls dynamically based on the datatype of a field.

forexample:
suppose i need to add a combobox or  dropdownlist for a particular datatypeId in the datatype table
Inorder to have a dropdown , i need to go for dropdown template column..
In the normal mode i need to see it in the form of a norma text or the Label template.But on edit(In edit mode) it should be a Dropdown column

For this.. i tried the below code:

//Code used to add the template column.

GridTemplateColumn column1 = new GridTemplateColumn();
gridPreview.MasterTableView.Columns.Add(column1);
column1.DataFeild = "CreatedBy";
column1.ItemTempalte = new CreateTemplateLabel("templataName","templateText");
column1.HeaderText = "CreatedBy";
column1.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
column1.EditItemTemplate = new CreateRadComboTemplate("templateName");


//code for template creations

public class CreateTemplateLabel:ITemplate
{
    private string tempName;
    private string tempText;

    Public CreateTemplateLabel(string templateName,string templateText)
    {
        tempName = templateName;
        tempText = templateText;   
    }
    
     public void InstantiateIn(System.Web.UI.Control container)
      {
          Label lbl = new Label();
         lbl.Text=tempText;
         lbl.ID = tempName;
         lbl.CssClass ="Label";
         lbl.Width = 150;
         container.Controls.Add(lbl);
      }
}

public class CreateRadComboTemplate:ITemplate
{
    private string tempName;

    Public CreateRadComboTemplate(string templateName)
    {
            tempName = templateName;   
    }
    
     public void InstantiateIn(System.Web.UI.Control container)
      {
          RadComboBox rcBox = new RadComboBox ();
        rcBox.ID="tempName";
        for(int i=0;i<2;i++)
        {
            RadComboBoxItem rcbItem = new RadComboBoxItem();
            rcbItem.Text= "Text"+i;
            rcbItem.Value = i;
            rcBox.Items.Add(rcbItem);
        }
        rcBox.Width = 150;
        container.Controls.Add(rcBox);
      }
}

Suggest me whether the code written above is correct or not?
But using this , i am not able to view the RadComboBox in the editmode.I mean to say it is not created in the edit mode... I am able to get the reason why it is like...... Am i missing something in the code... ?

So,As i am not able to have the RadComboBox in the edit mode... i implemented the WindowEditing Concept that is there in the Grid Demo Examples...

Using this i acheived it but it is not the InPlace Edit mode(my requirement is InPlace Edit Mode)
Here also i am facing one Probelm ,and the problem is ,
I am Using a RadDatePicker inside a Page which is opened through a RadWindow.....
While the page is opened ,it is thowing an Exception  ' Missing : '
I am not able to get the reason for this and even i am not able to debugg the exception also.

Please i need a solution for the both queries asap

Thanks in Advance,
Chaitanya.E
chaitany.elluru@cosmonetsolutions.com
Sharan
Top achievements
Rank 1
 answered on 13 Mar 2013
3 answers
75 views
Hello All,
I have a rad ribbon bar having Application menu. Some of the menu items are disabled on page load(in client side). We can change the disabled menu to an enabled one in client side using fire bugger (remove rmDisabled from class="rmLink rmDisabled rmDisabled").My question is - Is there any possible way to enable a menu item which is actually in disabled mode and perform its server action.

Thank you
Abhilash
Bozhidar
Telerik team
 answered on 13 Mar 2013
12 answers
320 views

Hi all,
To save a round trip to the database, I would like to be able to filter radgrid items client side for speed purposes. I have a grid that will contain anywhere from 500-2500 items in  columns representing Departments in a database. The grid has client paging on as well as drag and drop columns. I would prefer to keep the paging at least.

<telerik:RadCodeBlock runat="server" ID="radCodeBlock">
            <script type="text/javascript">
function CustFilter() {
                    var chk = document.getElementById('<%=CheckBox1.ClientID %>');
  
                    if (chk.checked == true) {
                        var radG = $find("<%=RadGrid1.ClientID %>");
                        var DataItems = radG.get_masterTableView().get_dataItems();
                        var masterTableView = radG.get_masterTableView();
  
                        for (i = 0; i < DataItems.length; i++) {
                            var row = DataItems[i].get_element();
                            //var row = masterTableView.get_dataItems()[i];
                            var checkBox = row.children[5].children[0];
                            //var checkBox = row.get_cell("Approved")
  
                            if (!checkBox.checked) {
                                radG.get_masterTableView().hideItem(i);    
                            }
                            else {
                                radG.get_masterTableView().showItem(i);
                            }
                        }   
  
                    }
                    else {
                        alert("unchecked");
                    }
                }
</script>
 </telerik:RadCodeBlock>
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="50" Height="600px" AllowFilteringByColumn="True" 
        AllowPaging="True" AllowSorting="True" DataSourceID="SqlDsGetRetDepts" 
        GridLines="None" ShowGroupPanel="True" Skin="Windows7" 
        AutoGenerateColumns="false" EnableLinqExpressions="false">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" 
            ReorderColumnsOnClient="True">
            <ClientEvents OnRowContextMenu="RowContextMenu" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <MasterTableView DataSourceID="SqlDsGetRetDepts" ClientDataKeyNames="DeptID, CustomerID" DataKeyNames="DeptID">
            <Columns>
                <telerik:GridBoundColumn DataField="DeptID" FilterControlWidth="50px" ItemStyle-Width="100px" HeaderText="DeptID" SortExpression="DeptID" UniqueName="DeptID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustID" ItemStyle-Width="100px" AutoPostBackOnFilter="false" SortExpression="CustID" UniqueName="CustomerID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DeptName" FilterControlWidth="100px" ItemStyle-Width="100px" HeaderText="Name" SortExpression="Name" UniqueName="DeptName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DeptPhone" FilterControlWidth="50px" ItemStyle-Width="100px" HeaderText="DeptPhone" SortExpression="DeptPhone" UniqueName="DeptPhone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="BillDeptID" HeaderText="Bill DeptID" SortExpression="Bill DeptID" UniqueName="BillDeptID">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Approved" HeaderText="Approved" SortExpression="Approved" UniqueName="Approved">                
                </telerik:GridCheckBoxColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

One of those columns is a boolean field called "Approved" in a gridcheckboxcolumn . I woudl like the user to be able to check a checkbox and filter out all those that are not "Approved". I cant quite glean from other posts how to do this, my client-side code is not quite there. I am missing something, as I am hiding all the data on the page, and when I page the data is all there. Any help would be appreciated! Thanks in advance,

Nimesh Jagota

Shinu
Top achievements
Rank 2
 answered on 13 Mar 2013
0 answers
168 views
i am trying to use client template(from the< toolstipApperance/>) for my radhtmlchart (type:pie) but i am unable to do it because i am using a dataset from the DB.
i tried using this 
  //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
it is also not working.
please help me i have to submit the project and i have very less time

here is a piece of code :
 DataSet ds = DbHelper.ReadTable(sql1);
    
        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
        {
            //string[] arr = new string[15];
           
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                SeriesItem si = new SeriesItem();
                si.YValue = (decimal)ds.Tables[0].Rows[i]["VoteShare"];
                si.Name = (string)ds.Tables[0].Rows[i]["PartyName"];
                 
                si.BackgroundColor = System.Drawing.ColorTranslator.FromHtml((string)ds.Tables[0].Rows[i]["PartyColor"]);
                PieChart1.PlotArea.Series[0].Items.Add(si);
                //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = (string)ds.Tables[0].Rows[i]["PartyName"];
                //arr[i]=si.Name.ToString();
                
            }

            //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
            
        

attaching my project files

also there are other related columns in the db like fullnames of the abbreviation.
i want to display that through client template.
regards
@nnu shah
punjab lok sujag
Qurat
Top achievements
Rank 1
 asked on 13 Mar 2013
2 answers
107 views
Hi,
 I.m trying to load the RadAjaxLoadingPanel while waiting for data to be returned from db that has been queried through the autocompletebox.
  Any ideas on how to do this?
Regards
Richard
Top achievements
Rank 1
 answered on 12 Mar 2013
4 answers
878 views
This is probably very elementary question but I'm just starting using Telerik RadGrid and while it was very easy to deploy and setup, I'm having a problem to set the grid not to open the edit form the first time it loads. The form always opens up with the first record already in editing mode (file 1), while what I want to set it to is to display the data first and let the end user click on Edit when necessary (file 2). Thanks for any assistance I could get.

Martin
Top achievements
Rank 1
 answered on 12 Mar 2013
0 answers
180 views
I see to have an issue using a RadWindow, where by I set a S\session variable in PageA, then use javascript to call the RadWindow's .SetUrl() function to goto PageB (both pages are within the same application). When arriving at PageB the session variable set in PageA is no longer available... is this supposed to happen? If I redirect from PageA to PageB I get the session variable just fine, it's only after using .SetUrl() on the clientside that I seem to lose it.

Can anyone confirm this for me?


Edit - Oops, looks like I was just looking at the wrong data. The sessions do indeed persist. Sorry.
Xorcist
Top achievements
Rank 1
 asked on 12 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?