Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
120 views
Sorry I am a telerik nube user!

I am using the Q3 SkinManager control in my master page, but how to I get hyperlinks to be skinned?

I have a simple hyperlink like this:

<a href='www.google.com' target='_blank'>Google</a>

 

I would like the embedded Skins to apply their default style.

Thanks!

 

Niko
Telerik team
 answered on 13 Dec 2011
6 answers
140 views
I'm reading the appointments form a datatable. Here is my code:

           List<MyClass> myObjects = (from e in myEntities.Mytable where
                                  e.DateFrom >= schedulerInfo.ViewStart &&
                                  e.DateTo <= schedulerInfo.ViewEnd
                                  select e).ToList();


            List<Appointment> appointments = new List<Appointment>(myObjects.Count);
            foreach (MyClass e in myObjects) {
                Appointment a = new Appointment();
                a.ID = e.ID;
                a.Subject = e.Description;
                a.Start = e.DateFrom;
                a.End = e.DateTo;
                a.BackColor = System.Drawing.Color.Yellow;
                appointments.Add(a);


and when I run it, it isn't yellow!
Dani
Top achievements
Rank 1
 answered on 13 Dec 2011
1 answer
93 views
Using Telerik version 2011.3.1115.35, facing a problem when using DBContentProvider.cs, thats is
RadEditor1.ImageManager.ContentProviderTypeName = typeof(DBContentProvider).AssemblyQualifiedName;

On debug found that ResolveRootDirectoryAsTree is calling multiple times and files are not populating in ImageDailog list for ViewPaths = "Root", however returnValue contains the list of retreived files already uploaded.
Note:in old version same code working for IE8 in compatibility mode.

public override DirectoryItem ResolveRootDirectoryAsTree(string path)
{
      DirectoryItem returnValue =
                    new DirectoryItem(GetName(path), GetDirectoryPath(path), string.Empty, string.Empty, fullPermissions, GetChildFiles(path),
                    GetChildDirectories(path));
              
      return returnValue;
}

Why ImageDialog not showing the files and upload button also remains disabled
Dobromir
Telerik team
 answered on 13 Dec 2011
1 answer
103 views
Hi,

This is more of a theoretical question as I plan a page.  Here is the situation:

  1. I want a host page containing several Telerik controls, include RadAjaxManager.
  2. RadWindows will be launched from this page via button clicks and context menus.
  3. I like to launch my RadWindows via client side.

Now here is the gig:  Some of my windows themselves have some content that should be ajaxified within the window itself.  For example, if this was a stand alone page, I would add a RadAjaxManager to the page to control the interaction between controls.  In this context, I do not care about updating controls on the host page -- just controls contained on the RadWindow itself.

However, this being a page launched as a RadWindow (essentially an iFrame, I believe) I'm concerned with the best practice to do this.  Does it make sense to have a RadAjaxManager on the host page, and a second RadAjaxManager on the iFrame itself.  Will they fight?  I've noticed some posts where it says to have the RadWindow update itself via the RadAjaxManager on the host page, but that seems a little disconcerting in that I won't have a lot of control of the update order on the RadWindow.

So, what's the best practice here?

Thanks so much!!!!

Jim
Marin Bratanov
Telerik team
 answered on 13 Dec 2011
3 answers
169 views
Hi,

I'm displaying a RadNotification control from within an async postback.  The markup for the RadNotification looks like this:

<telerik:RadNotification ID="AddToCartNotification" runat="server" Animation="Fade" AutoCloseDelay="5000" ContentIcon="" Height="100px" Opacity="80" Position="Center" Skin="Forest" Width="300px" EnableRoundedCorners="True" EnableShadow="True" LoadContentOn="EveryShow" oncallbackupdate="AddToCartNotification_CallbackUpdate" Title="Add to Cart Result" />

My code behind looks like this:
protected void OnVideoRepeaterItemCommand(object source, RepeaterCommandEventArgs e)
{
    switch (e.CommandName)
    {
        case "AddToCart":
            {
                AddItemToCart((string)e.CommandArgument);
                break;
            }
    }
}
 
private void AddItemToCart(string productSku)
{
    ShoppingCartUtilities.AddToCartResult result = ShoppingCartUtilities.AddItemToCart(productSku, 1, 1);
    string caption = "";
    string msg = "";
    string icon = "";
 
    if (result == ShoppingCartUtilities.AddToCartResult.ItemAddSucceeded)
    {
        icon = "info";
        caption = "Item Added";
        msg = "Item successfully added to cart";
    }
 
    else if (result == ShoppingCartUtilities.AddToCartResult.ItemAddFailedMaxItemCountReached)
    {
        icon = "warning";
        caption = "Maximum Count for Item Reached";
        msg = "Only one copy of this video can be added to your cart";
    }
 
    else
    {
        icon = "deny";
        caption = "Unable to Add Item to Cart";
        msg = "Add to cart failed.  Sorry for the inconvenience";
    }
 
    string value = string.Format("{0}|{1}|{2}", icon, caption, msg);
    AddToCartNotification.Value = value;
             
    AddToCartNotification.Show();
}
 
protected void AddToCartNotification_CallbackUpdate(object sender, Telerik.Web.UI.RadNotificationEventArgs e)
{
    RadNotification notification = sender as RadNotification;
  
    if(notification == null)
        return;
 
    string[] vals = notification.Value.Split('|');
 
    if (vals == null || vals.Length < 3)
        return;
 
    AddToCartNotification.TitleIcon = vals[0];
    AddToCartNotification.Title = vals[1];
    //AddToCartNotification.ContentIcon = vals[0];
    AddToCartNotification.Text = vals[2];
}

I'm able to set the Text property but not able to set the Title and TitleIcon properties.  Am I missing something or is this not possible?

Thanks -- Steve

Marin Bratanov
Telerik team
 answered on 13 Dec 2011
5 answers
165 views
Hi,
My radwindow is inside userControl named "showDetails.ascx" and that same usercontrol I have a grid.
In code behind of " "showDetails.ascx" On "grv_OnItemCommand" I need to open RadWindow Without page referesh.

showDetails.ascx
<telerik:RadWindowManager runat="server" ID="RadWindowManager1">
    <Windows>
        <telerik:RadWindow ID="radWinInvoiceDetails" runat="server" ShowContentDuringLoad="false"
            Width="400px" Height="400px" Title="Invoice Details" DestroyOnClose="true"
            Behaviors="Default">
            <ContentTemplate>
                <uc:MakePaymentControl ID="AnotherControl" runat="server" />
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
 
 
 
<grid code----
<telerik:GridTemplateColumn HeaderText="Status">
                                    <ItemTemplate>
<asp:LinkButton ID="lnkStatus" runat="server" Text="Pay" CommandName="pay" CommandArgument='<%# Eval("PaymentID") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>

ShowDetails.ascx.cs
protected void grid_OnItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "pay")
            {
                string invoiceID = e.CommandArgument.ToString();
                ucMakePaymentControl.BindInvoiceDetails(Convert.ToInt64(invoiceID));
                radWinInvoiceDetails.VisibleOnPageLoad = true;
            }
        }

How can i open Radwindow on clientside/ without page refresh.
Thanks
Marin Bratanov
Telerik team
 answered on 13 Dec 2011
3 answers
245 views
Hello,

I have 2 dropdowns, 2 textboxes and two buttons in my form. OnClick the button does certain things. before that, I need to validate a condition. the condition is that if only the txtbox2 is clicked, and no other parameter is selected / entered, then I should show a pop up saying the "txtBox 2 alone can't be entered, and Please also select item from first dropdown!".. Logic needed is not complicated. I am having a problem in finding the object in my javascript function.

I ahve called IsTREmpty() on OnClientClick event for the button. I am getting the error saying object required. How can I access the form element in my javascript.?

function

IsTREmpty() {  

var tr = document.getElementById('rdCmbTR').value;  

var tt = document.getElementById('rdCmbTT').value;  

var tid = document.getElementById('rdTxtTId').value;  

var tDesc = document.getElementById('rdTxtTDesc').value; 
alert(tDesc.length); 

if (tDesc.length > 0) {  

if (tt == -1 && tid.length == 0 && tr == -1) {  

alert('Please Select T R'); }

}

}

Slav
Telerik team
 answered on 13 Dec 2011
1 answer
234 views
Hi,

   I want to  parse the recurrence rule to extract all occurrences in SQL server2008, by using user defined functions or stored procedures or any other way. I request you guys to help me out in this as early as possible if possible. Its very urgent requirement for me. Thanks in advance.

Regards,
Maddela
Peter
Telerik team
 answered on 13 Dec 2011
3 answers
68 views
Hi All,
In my application I want that if appointment subject is very long then it do not go to next line but in same line '....' should appear in the last. How it will be possible?
Peter
Telerik team
 answered on 13 Dec 2011
1 answer
69 views
I have a grid using GridBoundColumns.  The first column is a GridButtonColumn whose Text property is blank.  When the user clicks the button, the user's login Id is stored in a database table and the button's text is set to the user's login Id.  This all happens in the grid's ItemCommand event.  The code is:

        If e.CommandName = "Assign" Then
            Dim item As GridDataItem = CType(e.Item, GridDataItem)
            Dim strJobNumber As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Job_Number")
            Dim strButtonText As String = CType(item("button").Controls(0), Button).Text
            Dim NTLoginID As String = GetCurrentUser()
              
            If String.IsNullOrEmpty(strButtonText) Then
                Dim _db As New MyAssembly.DataContext(ConfigurationManager.ConnectionStrings("MyCNString").ConnectionString)
                Dim rslt = _db.TMSearchAssignments.Where(Function(x) x.JobNumber.Equals(strJobNumber)).FirstOrDefault
                If Not rslt Is Nothing Then
                    CType(item("button").Controls(0), Button).Text = rslt.NTLoginID
                    Exit Sub
                Else
                    db.StoredProcedureRepo.sp_Insert_TMSearchAssignment(strJobNumber, NTLoginID, False)
                    CType(item("button").Controls(0), Button).Text = NTLoginID
                End If
            End If
End If

That code works great and the button's text is updated as desired. The problem is when the user goes to the next page in the grid and the returns to the previous page, the text is gone.  How can I keep the text from disappearing?

Thanks,

James
James
Top achievements
Rank 1
 answered on 13 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?