Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
221 views
We are using the snippets dropdown to add custom values to html based letters/emails.  The Names text in the dropdowns are getting long and I would like to increase the width of the dropdown to accommodate the longer names.  Here is our usage. 

<td valign="middle" colspan="2">
<AesopControls:AesopRadEditor runat="server" ID="E"
Content='<%# Bind("LetterHtml") %>' 
SkinID="LetterEditor" Height="400px"
ImageCatalogDefaultDirectory="Client"
>
<Snippets>
<telerik:EditorSnippet Name="<span style='color:red;'>---Project---</span>" Value="" />
<telerik:EditorSnippet Name="Project Name" Value="{ProjectName}" />
<telerik:EditorSnippet Name="Project Date" Value="{ProjectDate}" />
Cori
Top achievements
Rank 2
 answered on 18 Aug 2010
2 answers
382 views
This could just be my ignorance on how the RadAjaxManager/client-side action works, but I'm having a problem getting the Combo Box selected value to change in a specific scenario using the RadAjaxManager.

In this demo, I'm just trying to set the third combo to whatever index the second one is set to.  This is not a desired production action, just a way to test whether the index is actually changing or not.  In all cases, the third combo includes more than the number of items in the second combo.

Using this code, the third combo box refreshes correctly, but I'm having the whole page refresh each time, as a result of the AutoPostBack's:

Default4.aspx.vb
Partial Class Default4
    Inherits System.Web.UI.Page
  
    Protected Sub cboInterventionTools_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles cboInterventionTools.SelectedIndexChanged
  
        cboInterventionDurations.SelectedIndex = cboInterventionTools.SelectedIndex
  
    End Sub
  
End Class


Default4.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default4.aspx.vb" Inherits="Default4" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
  
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
  
  
        <div>
  
            <asp:Panel ID="pnlMain" runat="server">
  
                Areas of Concern<br />
                <asp:SqlDataSource ID="sqlAreasOfConcern" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:RTIDesktop %>" 
                    SelectCommand="AreasOfConcern_List" SelectCommandType="StoredProcedure">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="ContentAreaID" />
                    </SelectParameters>
                </asp:SqlDataSource>                                        
                <telerik:RadComboBox AutoPostBack="true" Height="300px" Width="200px" runat="server"
                    ID="cboAreasOfConcern" 
                    DataSourceID="sqlAreasOfConcern" DataTextField="AreaOfConcernName" 
                    DataValueField="AreaOfConcernID" ExpandDelay="0">
                </telerik:RadComboBox>
                <br />
              
                Intervention Tool<br />
                <asp:SqlDataSource ID="sqlInterventionTools" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:RTIDesktop %>" 
                    SelectCommand="InterventionTools_List" SelectCommandType="StoredProcedure">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="28172" Name="PersonID" />
                        <asp:ControlParameter ControlID="cboAreasOfConcern" Name="AreaOfConcernID" 
                            PropertyName="SelectedValue" />
                        <asp:Parameter DefaultValue="8" Name="GradeLevelID" />
                        <asp:Parameter DefaultValue="1" Name="DummyParameter" />
                    </SelectParameters>
                </asp:SqlDataSource>                                        
                <telerik:RadComboBox AutoPostBack="true" Height="300px" Width="200px" runat="server"
                    ID="cboInterventionTools" 
                    DataSourceID="sqlInterventionTools" DataTextField="InterventionToolName" 
                    DataValueField="InterventionToolID" ExpandDelay="0">
                </telerik:RadComboBox>
                <br />
  
                Intervention Duration<br />
                <asp:SqlDataSource ID="sqlInterventionDurations" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:RTIDesktop %>" 
                    SelectCommand="InterventionDurations_List" SelectCommandType="StoredProcedure">
                </asp:SqlDataSource>                                        
                <telerik:RadComboBox Height="300px" Width="200px" runat="server"
                    ID="cboInterventionDurations" 
                    DataSourceID="sqlInterventionDurations" DataTextField="InterventionDurationName" 
                    DataValueField="InterventionDurationID" ExpandDelay="0">
                </telerik:RadComboBox>
                <br />
          
            </asp:Panel>
              
        </div>
  
    </form>
</body>
</html>

Everything works great, the cboInterventionTools_SelectedIndexChanged() routine runs, and the cboInterventionDurations.SelectedIndex gets changed correctly.

If I add RadAjaxManager functionality, so that the screen doesn't refresh, the routine runs, but the combo control does not refresh:

Code added to Default4.aspx:
(right after the ScriptManager)
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="cboAreasOfConcern">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="cboInterventionTools" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

The idea is that any change to "Areas of Concern" automatically refreshes the "Intervention Tool", client-side. 

I need to be able to change the "Intervention Duration" to reflect a specific default duration time per tool.  It needs to make a call to SQL to determine that information.  If I embed that code into the cboInterventionTools_SelectedIndexChanged() routine, it all runs, and it even SETS the index correctly... but the control never changes visually on the screen.

Is there something I need to do to trigger that combo refresh, client-side, once the routine has completed?
Cartoon Head
Top achievements
Rank 1
 answered on 18 Aug 2010
2 answers
123 views
Hi,
I need to create a number of simple pages to display grid-like data, and using a Declarative Data Source (with SqlDataSource) seems like a good idea to save time. But I cannot be sure that the data source is ready at all times. In that case I'd like to simply display an empty grid.

Any suggestions, can (login) errors easily be trapped at some point?
Thanks.

Best,
Olav
olav
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
163 views
Hi -

I have a column in the database that has repeating values.  I'm using that column to populate a ComboBox on my page.  I don't want the repeated values to show up, but just the one time. 

Example:

1940
1940
1940
1950
1950
1960
1970
1970
1970

So, I only want this to be populated in the ComboBox:
1940
1950
1960
1970

Is there a parameter or keyword that can be used on the aspx side or the c# side that can give me the outcome I need?

Here is my c#:
private void PopulateComboBox()
{
  IQueryable allSystemPlantAccount = system_PlantAccount.GetAllBindings();
  this.systemPlantAccountRadComboBox.DataSource = allSystemPlantAccount;
  this.systemPlantAccountRadComboBox.DataValueField = "ID";
  this.systemPlantAccountRadComboBox.DataTextField = "Year";
  this.systemPlantAccountRadComboBox.DataBind();
  this.systemPlantAccountRadComboBox.Filter = RadComboBoxFilter.Contains;
  this.systemPlantAccountRadComboBox.Sort = RadComboBoxSort.Ascending;
  this.systemPlantAccountRadComboBox.SortItems();
}

Here is my aspx:
<telerik:RadComboBox ID="systemPlantAccountRadComboBox" runat="server" Width="200px"
      style="left: 20px; top: 125px; position: absolute; text-align: right;"></telerik:RadComboBox>

Any help would be great.  Thanks!

wen
Cori
Top achievements
Rank 2
 answered on 18 Aug 2010
1 answer
183 views
Hello everybody!

i must admit that i started using telerik components just  recently. Right now i'm trying to use the GridAttachmentColumn to manage my attachments.

but i keep getting this error on insert "

Implicit conversion from data type sql_variant to varbinary(max) is not allowed. Use the CONVERT function to run this query

"
I use sqlserver 2005 .

so i ask, shouldnt  the GridAttachmentColumn suffice to work with the datasource? Or do i have to use a gridTemplateColumn?


thanx!
joao
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
167 views
In an older version of the RadMenu (v 3.6.4.0), I was able to load my xml data into a radmenu inside of a skin.

Skin syntax:

<telerik:RadMenu

    runat="server"

    SkinID="EditCommandMenu"

    Width="100%"

    ClickToOpen="true"

    CausesValidation="false"

    AccessibilityEnabled="True"

    AutoPostBack="false"

    ContentFile="~/PresentationLayer/Manifests/Menu/Edit/Commands.xml"

    ImagesBaseDir="~/PresentationLayer/Images/Menu/Default" />

I am in the process of upgrading to the latest version and this functionality seems to be removed.
Does anyone know how to inject my XML into a Menu via a Skin?

Thanks!

Schlurk
Top achievements
Rank 2
 answered on 18 Aug 2010
1 answer
139 views

Hello, I would like to add a node to the TreeView of the FileExplorer, and I was trying to do this in the Page_Load handler: 

RadFileExplorer1.TreeView.Nodes.Add(new RadTreeNode("Recycle bin"));

But this causes my "Recycle Bin" node to be the only one in the TreeView.  Is there a better way to do this?  I would prefer that this node would be at or above the root node, so that it could be used as a recycle bin where users could drag files to.
Aaron C
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
343 views
Hello,

I noticed that the RadGrid CardView demo (http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/cardview/defaultcs.aspx) the <Columns> and <telerik:GridBoundColumn> tags are no longer present once the <ItemTemplate> tag is used.

However, in the documentation for the RadGrid CardView (http://www.telerik.com/help/aspnet-ajax/grdcardview.html) <Columns> tag is used.  What is the reason for this?

In my own CardView project, when I remove the <Columns> tag (and child <telerik:GridBoundColumn> tags), my data within the <ItemTemplate> tag no longer appears.  What could be causing this?

Thanks,
David
Schlurk
Top achievements
Rank 2
 answered on 18 Aug 2010
2 answers
197 views
ho to find the Appointment in radSheuler Using  Appointment id

am trying following Code but it showing Null

ex : i have 4 appointments ids are{2,4,5,6}. in rad scheduler  Appointments Count showing 4.
 but  RadScheduler1.Appointments.FindByID(2) tin this time Showing null;

am using Following Code
protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
    {

       // Appointment info = (Appointment)RadScheduler1.Appointments.ToArray()[e.Value;
        int aptId;
        Appointment apt;
        if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string
            apt = RadScheduler1.Appointments.FindByID(e.Value);
        else //The appointment is not occurrence and FindByID expects an int
            apt = RadScheduler1.Appointments.FindByID(aptId);
     
       // Session["Apt"] = apt;
   
    }

could u plz help me any susses ion for this problem
Chris
Top achievements
Rank 1
 answered on 18 Aug 2010
1 answer
137 views
Hi,

I'm using RadAjaxManager_AjaxRequest to populate a combobox with data selected in another RadWindow. After the AjaxRequest the Combobox ist disabled and populated as it should, but the redering does work anymore (see attached screenshot).
Is there a solution for this problem? I'm working with RadControls 2009.2.826.20, the problem occurs in IE8, Firefox 3.6 and IE7 are rendering the control as expected but the font looks scary too.
Jasper
Top achievements
Rank 1
 answered on 18 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?