Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
149 views
Hi,
       I am using the following code to get the selectedValue of radComboBox in javascript to pass values to the parent page:

<script language="javascript" type="text/javascript">

        function passValues() {
            var combo = $find("<%= cmbBranch.ClientID %>");
            var comboValue = document.getElementById(combo.UniqueID + "_value").value;
            window.opener.document.getElementById('txtFindBrid').innerText = comboValue;
           }
 
    </script>
 I have placed the above code inside <head> </head> tag.  When I run the project I get the following error:
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).  Please help me by giving a solution.

Joseph

Joseph Ambattu
Top achievements
Rank 1
 answered on 18 Jan 2010
1 answer
136 views

Hi,

I am having a radgrid(with detailtables) and a radcombobox with checkboxes in it. Initially on pageload, all the items in the radcombobox are clicked and the detail table shows all the columns in it. When the user unselects any of the item in the combo box, the column in the detail table should become invisible. 

 <telerik:RadComboBox ID="RadComboBox1" runat="server"  HighlightTemplatedItems="true" EmptyMessage="select display columns"
                    Skin="Office2007" AllowCustomText="true" Width="240px">
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="chk1" Checked="true" OnCheckedChanged="chk1_CheckedChanged" AutoPostBack="true"/>
                        <asp:Label runat="server" ID="Label1" Text='<%# Eval("menuitem_gridname") %>' AssociatedControlID="chk1">
                        </asp:Label>
                    </ItemTemplate>
                </telerik:RadComboBox>

codebehind

 

 

 

 

protected void chk1_CheckedChanged(object sender, EventArgs e)  
{
string str = ""; 
for (int i = 0; i < RadComboBox1.Items.Count; i++) 
{
CheckBox chk = (CheckBox)RadComboBox1.Items[i].FindControl("chk1"); 
if (chk.Checked == false) {
str = str + "," + RadComboBox1.Items[i].Value;  
}
}
RadGrid2.Rebind();

}

 

 protected void RadGrid2_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
        {

            //string str = Request.QueryString["Cols"].ToString();
            string str = "";
            for (int i = 0; i <  RadComboBox1.Items.Count;i++) 
            {
                CheckBox chk = (CheckBox)RadComboBox1.Items[i].FindControl("chk1");                
                if (chk.Checked == false)
                {
                    str = str + "," + RadComboBox1.Items[i].Value;
                }
            }
            e.DetailTableView.DataSource = dsSwitch.Tables[1];
          
            //string str = Request.QueryString["Cols"].ToString();

            string[] cols = str.Split(',');
            for (int i = 0; i < cols.Length; i++)
            {
                if (cols[i].ToString().Equals(string.Empty))
                    continue;
                int j = int.Parse(cols[i].ToString());
                e.DetailTableView.Columns[j].Visible = false;
            }
            //e.DetailTableView.Columns[3].Visible = false;
        }

Now the problem is it is not remembering the state of the radgrid. For example, If we expand a particular row in the mastergrid and unselect an item in the combobox, none of the rows are in expanded state. It is not remember the state of the radgrid.
How to remeber the state of the grid on selecting and unselectiong the items in a combobox to hide the columns of a detail table in an ajax way?

Thank you.

 

 

 

Princy
Top achievements
Rank 2
 answered on 18 Jan 2010
3 answers
94 views
We are trying to add a filtered RadComboBox control that behaves as follows:
-  When you start typing, filter the list with the Contains filter
-  If you leave the control (blur), and your current text doesn't match an existing item in the list, revert to the item that was selected when the page was loaded (the current value before the user started typing the filter key)

Our current attempt is close, but doesn't quite get there.  On blur, the combobox retains the value of whatever the user typed in, even though AllowCustomText is false.  If we set MarkFirstMatch to true, we prevent the user from leaving any text in the dropdown that doesn't match an existing item, however we would prefer to clear it out to its original value if an item wasn't selected directly:

<telerik:RadComboBox ID="_sicCode" runat="server" AllowCustomText="false" MarkFirstMatch="false" EmptyMessage="-- Select --" Filter="Contains" MaxHeight="150" /> 

Is there any way to achieve this behavior without extending the control?
Veselin Vasilev
Telerik team
 answered on 18 Jan 2010
5 answers
203 views
hi

how do i capture the document path into DB? for example, if after upload the path to the document is C:\somefolder\somefolder\somefile.pdf, the DB should have a row value C:\somefolder\somefolder\somefile.pdf.

Thanks
Genady Sergeev
Telerik team
 answered on 18 Jan 2010
4 answers
142 views
Hello,
I have Rad editor webpart  in my Sharepoint page. Clicking on the document manager is not showing the PPTX files. Also i am not able to upload the other extensions file using the document manager.

Please let me know what is the issue.

Regards,
Sudeep
Stanimir
Telerik team
 answered on 18 Jan 2010
1 answer
109 views
Hi,
I'm trying to update the RadSchedule.MonthView.VisibleAppointmentsPerDay property in the ScheduleDataBound event. When I do this, the schedule displays the appointments correctly, however none of the client side appointment clicked events work. If i set the property at design time, the appointment click events work.

Below is the settings for the scheduler

protected void Page_Load(object sender, EventArgs e) 
    {        
        GuardSchedule.DataKeyField = "ID"
        GuardSchedule.DataSubjectField = "Subject"
        GuardSchedule.DataStartField = "StartDateTime"
        GuardSchedule.DataEndField = "EndDateTime"
        GuardSchedule.SelectedView = SchedulerViewType.MonthView; 
        GuardSchedule.ShowViewTabs = false
        GuardSchedule.OverflowBehavior = OverflowBehavior.Expand; 
        GuardSchedule.ShowNavigationPane = false
        GuardSchedule.AllowDelete = false
        GuardSchedule.AllowEdit = false
        GuardSchedule.AllowInsert = false
        GuardSchedule.OnClientAppointmentClick = "AppointmentClicked";
        GuardSchedule.DataBound += new EventHandler(GuardSchedule_DataBound);
    }

void GuardSchedule_DataBound(object sender, EventArgs e)
    {
        DateTime viewStartDateTime = GuardSchedule.VisibleRangeStart;
        DateTime viewEndDateTime = GuardSchedule.VisibleRangeEnd;
        _appMax = 2;
        int numApps = 0;
        DateTime startTime = viewStartDateTime;
        DateTime endTime = viewStartDateTime.AddDays(1);
        while (startTime <= viewEndDateTime)
        {
            numApps = GuardSchedule.Appointments.GetAppointmentsInRange(startTime, endTime).Count;
            if (numApps > _appMax)
                _appMax = numApps;
            startTime = startTime.AddDays(1);
            endTime = endTime.AddDays(1);
        }
    
        GuardSchedule.MonthView.VisibleAppointmentsPerDay = _appMax;
    }

    <scipt> 
 
        function AppointmentClicked(sender, eventArgs) { 
            var apt = eventArgs.get_appointment(); 
            var aptID = apt.get_id(); 
          //Do stuff with the id 
            
        } 
    </script>
 <telerik:RadScheduler ID="GuardSchedule" runat="server" SelectedView="MonthView"
                    ShowViewTabs="false">
                </telerik:RadScheduler>

T. Tsonev
Telerik team
 answered on 18 Jan 2010
1 answer
103 views

I am using nested user controls and web controls in my PanelBar Items.  They are reused outside of my Panelbar in other parts of the app.  They already have style sheets and css classes assigned to them.  When I drop the controls into the panel bar they no longer use those but inherit from the PanelBars default stylesheet.  How to do I reference the other stylesheet? Is there a way to use a custom skin for the Panelbar but still have the nested controls use their own style sheet?

<div id="ICEmploymentRole" runat="server">  
       <telerik:RadPanelBar runat="server" ID="RadPanelBarICE" Width="1024px" ExpandMode="SingleExpandedItem" AllowCollapseAllItems="true">  
        <Items> 
        <telerik:RadPanelItem Text="My Internal Controls Criteria" runat="server" > 
        <Items> 
        <telerik:RadPanelItem runat="server" Value="templateHolder" > 
            <ItemTemplate>   
             <div class="notificationcontainer">       
             <asp:Label ID="lblICEConfirmationMsg" runat="server" Visible="False" CssClass="notification"></asp:Label> 
             <asp:Label ID="lblICEErrMsg" runat="server" CssClass="error" Visible="False"></asp:Label></div>  
             <asp:GridView ID="grdIceCriteriaList" runat="server"   
                OnRowDeleting="grdUserCriteriaList_RowDeleting"   
                OnRowEditing="grdUserCriteriaList_RowEditing"   
                OnRowDataBound="grdICECriteriaList_RowDataBound"   
                AutoGenerateColumns="False"   
                SkinID="gridviewContentSkin"   
                CssClass="contentTable">  
                    <Columns> 
                    <asp:BoundField DataField="CriteriaName" HeaderText="Name" /> 
                    <asp:BoundField DataField="VPAreaDesc" HeaderText="VP Area" SortExpression="VPAreaDesc" /> 
                    <asp:BoundField DataField="OrgGrpDesc" HeaderText="Sch/Coll/Dept Grp" /> 
                    <asp:BoundField DataField="DeptIDDesc" HeaderText="Dept" SortExpression="DeptIDDesc" /> 
                    <asp:TemplateField HeaderText="Default">  
                        <ItemTemplate> 
                            <asp:Literal ID="RadioButtonMarkup" runat="server" ></asp:Literal>&nbsp;  
                        </ItemTemplate> 
                    </asp:TemplateField> 
                        <asp:TemplateField> 
                            <EditItemTemplate> 
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" 
                                    Text="Update"></asp:LinkButton> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:LinkButton ID="lnkbtnEdit" runat="server" CausesValidation="False" CommandName="Edit" 
                                    Text="Edit"></asp:LinkButton> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                        <asp:TemplateField> 
                            <ItemTemplate> 
                                <asp:LinkButton ID="lnkbtnDel" runat="server" CausesValidation="False" CommandName="Delete" 
                                    OnClientClick="return DeleteDataConfirmation(this)" Text="Delete"></asp:LinkButton> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                       </Columns> 
                    </asp:GridView> 
                    <div class="centered">  
                   <asp:LinkButton ID="lnkbtnAddICECriteria" runat="server" OnClick="lnkbtnAddICECriteria_Click" CssClass="contentlink">Click to add new criteria</asp:LinkButton></div>  
                <div class="mysettingsfloat">  
               <uc2:ParamBar ID="ParamBar1" runat="server" Visible="false" /> 
               </div> 
            </ItemTemplate> 
            </telerik:RadPanelItem> 
            </Items> 
            </telerik:RadPanelItem> 
            </Items> 
            </telerik:RadPanelBar> 
 </div> 

 

 

Yana
Telerik team
 answered on 18 Jan 2010
2 answers
118 views
i'm using dnn 5.2.1 and the telerik editor but the editor doesn't load the german resource files.

i put the language files to App_GlobalResources and at the webconfig i put the language:

<add name="RadEditorProvider" type="Telerik.DNN.Providers.RadEditorProvider" providerPath="~/DesktopModules/TelerikWebUI" SyncDBOnSubmit="True" AutoCreatePaths="False" ImagesPaths="*PortalRoot*" DocumentsPaths="*PortalRoot*" MediaPaths="*PortalRoot*" FlashPaths="*PortalRoot*" CssFiles="*PortalRoot*/editor.css" TemplatePaths="template" Language="de-DE" />

my portal is set to german as default language, my account an my browser too.

or should i write the language settings into the ConfigFile.xml file?

thanks

regards

michael
dnn
Top achievements
Rank 1
 answered on 18 Jan 2010
1 answer
143 views
hi
I have created one custom.aspx page without any cs file .i am using radfileexplorer  in my aspx page but when I run asp.net  it is working fine and it displays the file but as soon as i integrate with the sharepoint it doesnot display the file in the  control and is shown without any files in that.The code which i used it as follow
<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="520px" Height="520px" OnClientItemSelected="select"
      ><Configuration ViewPaths="~sitecollection/_layouts/"  />   
                </telerik:RadFileExplorer>
i don't understand the error.I have the copied this aspx page in layouts folder and directly invoking the page.Can you please suggest any approach  or what mistake I am doing in this?


Lini
Telerik team
 answered on 18 Jan 2010
1 answer
151 views
I am looking to use Docking for the first time in a new project.

Is it possible to create a 'Maximize' button that will set the size of the window?

How easy would it be implement a system to drag & drop items between dock objects?  For example, one dock object contains files which can be dragged over to another dock object which is a Folder view.
Pero
Telerik team
 answered on 18 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?