Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
258 views
Hi,

I added a RadCombobox to a page with Datasource pointed to a LINQDataSource. Then I add a Javascript to set its value on load:

<script type="text/javascript">
       var combox = $find("<%=dfDocuments.clientID %>");
       combox.set_value('3');
   </script>

It works fine, but then I add the following code to add a blank line to the Combobox:

Protected Sub dfDocuments_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles dfDocuments.DataBound
        Dim li As New RadComboBoxItem
        li.Value = "0"
        li.Text = "--Select--"
        li.Selected = False
        dfDocuments.Items.Insert(0, li)
    End Sub

Then the set_value script doesn't works anymore.

Any advice? Thanks.

Andy
Kalina
Telerik team
 answered on 08 Mar 2011
3 answers
41 views
After installing the RadEditor, in order to make it the default editor in SharePoint, I would have to Active the features on all site collections or sites themselves?  If so, how far down the hierarchy does enabling these features make them the default editor?

Thanks
Henrik
Top achievements
Rank 1
 answered on 08 Mar 2011
1 answer
32 views
How modify other control on node expanding event with TreeNodeExpandMode.ServerSideCallBack?
Kate
Telerik team
 answered on 08 Mar 2011
3 answers
86 views
pls i am new in telerik radgrid,
i want to set a value to the first cell whenever someone clicks add new records on my radgrid. i want a default of  "3000" in the first column thanks
Princy
Top achievements
Rank 2
 answered on 08 Mar 2011
7 answers
661 views

Hi.  I have a Radgrid with a MasterTableView and 2 Detail Tables (total of 3 levels).  I have each GridTableView set to

 

 

HierarchyLoadMode

 

="Client" and I am binding the tables in my code-behind.  I have an OnNeedDataSource method as well as an OnDetailTableDataBind method to do all the binding.  On the first page load, the grids/tables all bind correctly.  In the 3rd level detail table, I have a button that will call a server-side OnClick method that will remove that row from the data in the database.  I then want to refresh the entire RadGrid to show that the row was removed, which may affect the upper 2 levels if it was the last row removed.  So, at the end of the OnClick method in the code-behind, I try calling the Rebind() method on my RadGrid.  Both the OnNeedDataSource and the OnDetailTableBind methods get fired and my screen seems to refresh (meaning it blinks and goes back to its original state of only the first level grid is expanded), however the data is not freshed and when I expand to the 3rd leve, the row I just deleted is still showing.  When I refresh the browser, however, the data does refresh and the row is gone. 

Even though the HierarchyLoadMode is set to Client, meaning that the data is kept in viewstate, I thought that by calling the Rebind method it would reload the data to viewstate and to the screen.  Is that not correct?  It seems to call the same methods when I refresh the browser page as when I call the .Rebind() method.  What am I missing here?  

By the way, I've got the Q3 2010 version of the RadControls and I'm using I.E. 6  (sad as it is) for my browser.  I also have the ClientSettings for AllowExandCollapse = true (since the documentation I found said I should have that set when using HierarchyLoadMode of Client), however this doesn't seem to have any impact for my app. 

Thanks for any help,
Shawna

 

Daniel
Telerik team
 answered on 08 Mar 2011
3 answers
109 views
I am getting the following compiler error on this page with the RadEditor: The type or namespace name 'EditorExportingArgs' does not exist in the namespace 'Telerik.Web.UI' (are you missing an assembly reference?)

My aspx page looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TaskExport.aspx.cs" Inherits="EncControl.TaskExport" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <EncEventViewer:Title ID="ucTitle" runat="server" /> 
    <link href="Styles.css" rel="stylesheet" type="text/css" /> 
</head> 
<body> 
    <form id="frmMain" runat="server">  
    <telerik:RadScriptManager ID="radScriptMgr" runat="server">  
    </telerik:RadScriptManager> 
 
    <script type="text/javascript" src="focus.js"></script> 
 
    <telerik:RadFormDecorator ID="decoratorMain" runat="server" DecoratedControls="all" 
        Skin="WebBlue"></telerik:RadFormDecorator> 
    <table cellpadding="0" cellspacing="0" align="center" class="MainTable">  
        <EncEventViewer:Header ID="ucHeader" runat="server" /> 
        <tr> 
            <td class="MainMenu">  
                <EncEventViewer:Menu ID="ucMenu" runat="server" /> 
            </td> 
            <td class="MainWorkArea">  
                <!-- This is the main work area customized for each page --> 
                <telerik:RadAjaxPanel ID="radAjaxPanel" runat="server">  
                    <table cellpadding="2px" cellspacing="0" align="center" class="PageText">  
                        <tr> 
                            <td> 
                                <br /> 
                                <asp:Label ID="lblPageHeader" runat="server" CssClass="ParagraphHeader" Text="Export Issue"></asp:Label><br /> 
                                <asp:Label ID="lblPageText" runat="server" CssClass="ParagraphBody" Text="This export may take a few minutes and will include the following components.  You may remove any unwanted items from the Export."></asp:Label> 
                            </td> 
                        </tr> 
                    </table> 
                    <br /> 
                    <asp:Panel ID="pnlAddIssue" runat="server" Visible="true" DefaultButton="btnSave">  
                        <table cellpadding="2px" cellspacing="0" align="center" class="FormTable">  
                            <tr> 
                                <td class="FormHeader" colspan="2">  
                                    <asp:Label ID="lblFormHeader" runat="server" CssClass="FormHeaderLabel" Text="Export Issue"></asp:Label> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="Label1" runat="server" CssClass="ControlLabel" Text="Default Data: "></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkDefault" runat="server" Checked="true" Enabled="false" Text="Export Default Data" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label2" runat="server" CssClass="ControlLabel" Text="Next Steps:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkNextSteps" runat="server" Checked="true" Text="Export Next Steps" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="Label3" runat="server" CssClass="ControlLabel" Text="Resolutions:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkResolutions" runat="server" Checked="true" Text="Export Resolutions" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label4" runat="server" CssClass="ControlLabel" Text="Notes:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkExportNotes" runat="server" Checked="true" Text="Export Notes" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="lblAttachmentsLabel" runat="server" CssClass="ControlLabel" Text="Attachments:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkAttachments" runat="server" Checked="true" Text="Export Attachments" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label5" runat="server" CssClass="ControlLabel" Text="Notifications:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkNotifications" runat="server" Checked="true" Text="Export Email Notifications" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="Label6" runat="server" CssClass="ControlLabel" Text="Business Units:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkBusinessUnits" runat="server" Checked="true" Text="Export Associated Business Units" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label7" runat="server" CssClass="ControlLabel" Text="User Groups:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkUserGroups" runat="server" Checked="true" Text="Export Associated User Groups" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="Label8" runat="server" CssClass="ControlLabel" Text="Associated Issues:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkAssociatedIssues" runat="server" Checked="true" Text="Export Associated Issues" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label9" runat="server" CssClass="ControlLabel" Text="Events:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkEvents" runat="server" Checked="true" Text="Export Associated Events" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormPrimary" width="200px">  
                                    <asp:Label ID="Label10" runat="server" CssClass="ControlLabel" Text="Associated Tasks:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormPrimary" width="350px">  
                                    <asp:CheckBox ID="chkRelatedTasks" runat="server" Checked="true" Text="Export Associated Tasks" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" class="FormSecondary" width="200px">  
                                    <asp:Label ID="Label11" runat="server" CssClass="ControlLabel" Text="Issue History:"></asp:Label> 
                                </td> 
                                <td align="left" class="FormSecondary" width="350px">  
                                    <asp:CheckBox ID="chkIssueHistory" runat="server" Checked="true" Text="Export Issue History" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td class="FormFooter" colspan="2" height="25px">  
                                    <asp:Button ID="btnExport" runat="server" Text="Export" CssClass="Control" OnClick="btnExport_Click" 
                                        Width="125px" /> 
                                    <asp:Button ID="btnCancel" runat="server" Text="&lt;Back" CssClass="Control" OnClick="btnCancel_Click" 
                                        CausesValidation="false" Width="125px" /> 
                                </td> 
                            </tr> 
                        </table> 
                        <table> 
                            <tr> 
                                <td> 
                                    <telerik:RadEditor ID="TaskExportEditor" runat="server" SkinID="DefaultSetOfTools" 
                                        OnExportContent="TaskExportEditor_ExportContent">  
                                        <ExportSettings OpenInNewWindow="true" /> 
                                    </telerik:RadEditor> 
                                </td> 
                            </tr> 
                        </table> 
                    </asp:Panel> 
                </telerik:RadAjaxPanel> 
                <!-- This is the end of the main work area --> 
                <br /> 
            </td> 
        </tr> 
        <EncEventViewer:Footer ID="ucFooter" runat="server" /> 
    </table> 
    </form> 
</body> 
</html> 
 

and my .cs file:
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.IO;  
using Telerik.Web.UI;  
 
namespace EncControl  
{  
    public partial class TaskExport : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            TaskExportEditor.Content = "Some content to export to a PDF";  
        }  
 
// the following line is generating a compile error
        protected void TaskExportEditor_ExportContent(object sender, Telerik.Web.UI.EditorExportingArgs e)  
        {  
            TaskExportEditor.ExportSettings.FileName = "TaskExport";  
            string url = String.Format("~/{0}.pdf", TaskExportEditor.ExportSettings.FileName);  
            string path = Server.MapPath(url);  
 
            if (File.Exists(path))  
            {  
                File.Delete(path);  
            }  
 
            using (FileStream fs = File.Create(path))  
            {  
                Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);  
                fs.Write(info, 0, info.Length);  
            }  
        }  
 
        protected void btnExport_Click(object sender, EventArgs e)  
        {  
            TaskExportEditor.ExportToPdf();  
        }  
    }  
}  
 

This page is in a project where other pages are using the Telerik.web.ui dl and they are working fine.  Can anyone tell me why the compiler can't find the Telerik.Web.UI.EditorExportingArgs?

Thanks
Rumen
Telerik team
 answered on 08 Mar 2011
16 answers
817 views

Hello,

I have ComboBox:

<telerik:RadComboBox ID="RadComboBox_Branze" runat="server" DataTextField="NAZWA_BRANZA" DataValueField="idTB_BRANZA" EnableLoadOnDemand="True" OnItemsRequested="RadComboBox_Branze_ItemsRequested" Width="300px" ><CollapseAnimation Duration="200" Type="OutQuint" /></telerik:RadComboBox>

In properties of RadComboBox I set:

DataTextField="businesslinename"
DataValueField="id_businessline"

where businesslinename is string value and id_businessline is int value, both retrieved from database

C# method to fill combo:

protected

void RadComboBox_Branze_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

{

if (e.Text.Length > 3)

{

RadComboBox combo = (RadComboBox)o;

combo.Items.Clear();

string sql = "select * from tb_branza where nazwa_branza like '%" + e.Text + "%' AND idTB_JEZYK=1";

//SqlDataSource1

 

SqlDataAdapter adapter = new SqlDataAdapter(sql, SqlDataSource1.ConnectionString.ToString());

DataTable data = new DataTable();

adapter.Fill(data);

try

 

{

int itemsPerRequest = 100;

int itemOffset = e.NumberOfItems;

int endOffset = itemOffset + itemsPerRequest;

if (endOffset > data.Rows.Count)

{

endOffset = data.Rows.Count;

}

if (endOffset == data.Rows.Count)

{

e.EndOfItems =

true;

}

else

 

{

e.EndOfItems =

false;

}

for (int i = itemOffset; i < endOffset; i++)

{

RadComboBox_Branze.Items.Add(

new RadComboBoxItem(data.Rows[i]["nazwa_branza"].ToString(), data.Rows[i]["nazwa_branza"].ToString()));

}

if (data.Rows.Count > 0)

{

e.Message =

String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString());

}

else

 

{

e.Message =

"No matches";

}

}

catch

{

e.Message =

"No matches";

}

}

}

I have got Button to submit method:


protected void btn_DodajBranze_Click(object sender, EventArgs e)

{

TextBox1.Text = RadComboBox_Branze.SelectedValue;

//DodajBranze(id_zamowienie_dns);

}

The problem is that I get DataTextField="businesslinename" instead DataValueField="id_businessline" into my TextBox1. How to retrieve a value from RadComboBox instead of text.

Best Regards

Dariusz Tomoń

Kalina
Telerik team
 answered on 08 Mar 2011
11 answers
153 views
Hello,

I installed the Q3 update this morning and I am getting the below error now.  After some investigating, I found that it is because my StartDate and EndDate values were set to the same date and time (I am running on converted data so the dates and times were set the same...i.e. 08/25/2005 08:30 AM for both start date and end date).  When the scheduler tried to display this on the screen it gave the error.  The previous release seemed to handle this scenario ok.  It's not a big deal for us since I know the solution and we can set our data up properly.  But I wanted to make sure to point it out if this is indeed a new bug with the Q3 release.

Thanks!

Server Error in '/' Application.

Height must be non negative.
Parameter name: value

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Height must be non negative.
Parameter name: value

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Height must be non negative.
Parameter name: value]
   System.Web.UI.WebControls.Style.set_Height(Unit value) +8694900
   System.Web.UI.WebControls.WebControl.set_Height(Unit value) +30
   Telerik.Web.UI.AppointmentControl.CalculateSize() +234
   Telerik.Web.UI.DayViewAppointmentControl.CalculateSize() +45
   Telerik.Web.UI.Scheduler.Views.RowBuilder..ctor(IList`1 slotList, Int32 maxColumnWidth) +709
   Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateViewRows(IList`1 slotLists) +161
   Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateInnerContentTable(Control container, IList`1 slotLists) +101
   Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetInnerContent() +144
   Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetContent() +93
   Telerik.Web.UI.RadScheduler.CreateContent() +122
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +106
   Telerik.Web.UI.RadScheduler.CreateChildControls() +10
   System.Web.UI.Control.EnsureChildControls() +102
   Telerik.Web.UI.RadScheduler.SaveViewState() +20
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +50
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Page.SaveAllState() +194
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Janani
Top achievements
Rank 1
 answered on 08 Mar 2011
1 answer
131 views
Hi I am using Telerik Rad Combo Box, Telerik Rad Grid, Telerik Ajax Loading Panel, and Telerik Ajax Manager on a Page

With the help of Ajax Manager and Ajax Loading Panel I am successfully reloading the grid without reloading the whole page based on the selection Index change of ComboBox(Using AuotPostBack=True property) without any code behind. Now I want to make the AutoPostBack property false because I don't want to postback every time, I will do postback only for particular selection. So I set Autopost back false and I tried to do the postback in Javascript, but now whole page is reloading when ever post back appears. So please help me to postback just the combo box and reload just the grid (not whole page) through javascript 

Note : Here I put the combobox in a user control for some additional functionalities and then using that user control on the page with all other controls I mentioned above 


Thanks
Kalina
Telerik team
 answered on 08 Mar 2011
3 answers
77 views
I have created a new Skin using the online tool but  it does not display the same in Iexplorer (8)
I have uploaded a test project showing the menu
http://www.mediafire.com/file/r5q8se4ttzias4t/TestMenu.zip
also I have added a screenshot as how it should be.

please help me fix the css to look as it is in online style builder.

Thanks in advance
Kate
Telerik team
 answered on 08 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?