Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
143 views

Hi everyone,
I've a small issue with my radgrids. This is the scenario

2 radgrids in the page: the first one with "temporary" records, while the second one with the "confirmed" records. In the first grid there's a commandbutton in the footer which allows the user to confirm, in one click, all the records. When the user confirms, then I need to refresh the 2 radgrids and I've achieved this task by writing this piece of code:

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadGridSales" />
        <telerik:AjaxUpdatedControl ControlID="RadGridSoldlConfirmed" />
    </UpdatedControls>
</telerik:AjaxSetting>

The problem is that if the user clicks on the Header of the first radgrid in order to sort the rows the 2 radgrid are being refreshed, while I need to refresh only the first one in this particular case.
The same if the user clicks on another commandbutton which allows it to delete a single row (so one commandbutton for each row) or the complete grid (another commandbutton in the footer).

So, there's a way to refresh the two radgrids only on certains condition?
I hope it's clear what I've just described and don't hesitate to ask for more clarifications.
Thank you in advance to everyone who would help me.

Regards
Iana Tsolova
Telerik team
 answered on 06 Oct 2011
2 answers
61 views
Hi,
I have a requirement to split the telerik grid and scroll the one section at run time.Is there any property or any way to do that???? 
Iana Tsolova
Telerik team
 answered on 06 Oct 2011
8 answers
197 views
In Firefox, when I try to click on the radnumerictextbox,
I cannot edit the text because the item is "selected" when I Single click on the text box.
The problem seems to appear if I EnableDragAndDrop.

URL: http://www.ximnet.com.my/telerik/test_listbox.aspx
Video Demo: http://www.ximnet.com.my/telerik/listbox_firefox_drag_drop_textbox.swf

Is there anything I can do to prevent this?

ASPX Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test_listbox.aspx.vb" Inherits="test_listbox" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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"><telerik:RadScriptManager ID="RSM" runat="server" />
    <telerik:RadListBox ID="RadListBox1" runat="server" AllowTransfer="true" EnableDragAndDrop="true" AutoPostBackOnTransfer="true"
                    Height="200px"  SelectionMode="Multiple" OnTransferred="RadListBox1_Transferred"
                    TransferToID="RadListBox2" Width="215px">
                    <ButtonSettings ShowTransferAll="false" VerticalAlign="Middle" />
                    <ItemTemplate>
                         
                        <span class="product-title">
                            <%# DataBinder.Eval(Container, "Text")%></span> <span class="bearing">1 bearing</span>
                    </ItemTemplate>
                    <Items>
                        <telerik:RadListBoxItem Text="Spinning Reel 1" Value="reel1_thumb.png" Price="99" Selected="true" />
                        <telerik:RadListBoxItem Text="Spinning Reel 2" Value="reel2_thumb.png" Price="199" />
                        <telerik:RadListBoxItem Text="Spinning Reel 3" Value="reel3_thumb.png" Price="99" />
                        <telerik:RadListBoxItem Text="Spinning Reel 4" Value="reel4_thumb.png" Price="299" />
                        <telerik:RadListBoxItem Text="Spinning Reel 5" Value="reel5_thumb.png" Price="199" />
                        <telerik:RadListBoxItem Text="Spinning Reel 6" Value="reel6_thumb.png" Price="99" />
                        <telerik:RadListBoxItem Text="Spinning Reel 7" Value="reel7_thumb.png" Price="299" />
                        <telerik:RadListBoxItem Text="Spinning Reel 8" Value="reel8_thumb.png" Price="199" />
                    </Items>
                </telerik:RadListBox>
                <telerik:RadListBox runat="server" EnableDragAndDrop="true" ID="RadListBox2" Height="200px" Width="270px"
                    SelectionMode="Multiple">
                    <ItemTemplate>
                         
                        <span class="detail-title">
                            <%# DataBinder.Eval(Container, "Text")%></span>
                        <ul class="details">
                            <li>
                                <label>
                                    Price:</label>
                                <span>
                                    <%# Convert.ToInt32(DataBinder.Eval(Container, "Attributes['Price']")).ToString("C0") %></span>
                            </li>
                            <li>
                                <label>
                                    Quantity:</label>
                                <telerik:RadNumericTextBox  runat="server" ID="QuantityTextBox" Width="40px" MinValue="1"
                                    MaxValue="10" ShowSpinButtons="true" Value="1" NumberFormat-DecimalDigits="0" />
                            </li>
                        </ul>
                    </ItemTemplate>
                    <Items>
                        <telerik:RadListBoxItem Text="Spinning Reel 9" Value="reel9.png" Price="99" />                   
                    </Items>
                </telerik:RadListBox>
    </form>
</body>
</html>


VB Code:
Imports Telerik.Web.UI
 
Partial Class test_listbox
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            RadListBox1.DataBind()
            RadListBox2.DataBind()
        End If
    End Sub
    Protected Sub RadListBox1_Transferred(ByVal sender As Object, ByVal e As RadListBoxTransferredEventArgs)
        For Each item As RadListBoxItem In e.Items
            'Update the image
            If e.SourceListBox Is RadListBox1 Then
                item.Value = item.Value.Replace("_thumb", "")
            Else
                item.Value = item.Value.Replace(".png", "_thumb.png")
            End If
 
            'Databind the item in order to evaluate the databinding expressions from the template
            item.DataBind()
        Next
    End Sub
End Class
Ricardo Pinto
Top achievements
Rank 1
 answered on 06 Oct 2011
10 answers
1.0K+ views
I've got a FileExplorer page that presents users with the files in their home directory using the Custom File Provider example. It works great. However, I'm doing checks to make sure that a person has logged in through our system to make sure they are authenticated so I can show them their home directory.

Since the FileExplorer uses callbacks, doing a response.redirect to the login page gives the "Response.Redirect cannot be called in a Page callback." error.

Originally, I was using this:

Response.Redirect(ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString)

I then changed it to:
If Page.IsCallback Then
   Response.Clear()
   Response.StatusCode = 302
   Response.Status = "302 Moved Temporarily"
   Response.RedirectLocation = ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString
   Response.End()
Else
   Response.Redirect(ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString)
End If
However, the FileExplorer doesn't appear to redirect correctly. The test I am performing is simply clicking on a folder in the left hand menu while being logged out. It correctly gives me back the 302 status code and the Location header, but FileExplorer just keeps spinning on the grid side as if it's going to do something. I'm doing most of the testing in IE9.

Any suggestions???
Adam
Dobromir
Telerik team
 answered on 05 Oct 2011
1 answer
151 views
Hello All,
I want my RadEditor to be without wrapping, as it wraps the text when reaches to the end but I want a horizontal scroll to continue writing on the same line.
I used new css with property

body
{
    word-wrap: normal;
    color: black;
    background-color: Olive;
    padding:3px;
    background-image: none;
    margin: 0px;
    text-align: left;
    background-color:Red;   
}
but it is not working.
Dobromir
Telerik team
 answered on 05 Oct 2011
3 answers
129 views
When one uses the RAD Editor's Media Manager to import new images or videos, they are provided with a popup that has editable text boxes for the media height and width.  These boxes are pre-populated with default values.

How do we change the default values that are pre-populated into those text boxes?  Is there a configuration file (like the tools_xml) or a property we can set on the RadEditor object to set default values of our own choosing?
Dobromir
Telerik team
 answered on 05 Oct 2011
7 answers
257 views
Hello !!

I have a problem with .LoadRtfContent of RadEditor with a rtf string. I lost my typographic quote(’ and ‘) and the double(“ and ”). But in a RichTextBox of Winform, I don't lost my quote.

Here is my string of rtf.

Dim rtfString As String = "{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl" & _
"{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}" &
"{\f2\froman\fprq2 Times New Roman;}}" & _
"{\colortbl\red0\green0\blue0;\red255\green0\blue0;}" & _
"\deflang1033\horzdoc{\*\fchars }{\*\lchars }" & _
"\pard\plain\f2\fs24 Test  LeftDoubleQuote=\ldblquote    RightDoubleQuote=\rdblquote    Test single quote LeftQuote=\lquote and RightQuote=\rquote \par }"

RadEditor1.LoadRtfContent(rtfString)

Thank's a lot for a response !!
Dobromir
Telerik team
 answered on 05 Oct 2011
4 answers
126 views
Hello,
I have a screen with the date picker. User will select a date.
Under button click another page will be shown in popup. This page will have calender. In its page load I am preselecting the date which the user has already selected in the main screen. User shouldn't be able to unselect that preselected date.
I used the following code disable the selection

// if you are using the skin bundled as a webresource("Default"), the Skin property returns empty string
                string calendarSkin = RadCalendar1.Skin != "" ? RadCalendar1.Skin : "Default";
                string otherMonthCssClass = String.Format("otherMonth_{0}", calendarSkin);
                // disable the selection for the specific day
                RadCalendarDay calendarDay = new RadCalendarDay();
                calendarDay.Date = transactionDate; //the date which has to be preselected
                calendarDay.IsSelectable = false;
                calendarDay.ItemStyle.CssClass = otherMonthCssClass;
                RadCalendar1.SpecialDays.Add(calendarDay);

                //Pre select the transaction date selected in the entry screen
                RadCalendar1.SelectedDates.Add(new RadDate(transactionDate));

The probelm here is
After page load, the transactionDate is preselected which is fine. If I change the month, select different dates and come back to the month having preselected date, then I see that it is not preselected. Its selection is still disabled but it is not highlighted.

If I put just this code   
                        RadCalendar1.SelectedDates.Add(new RadDate(transactionDate));
and remove the code where the date is disabled,  then everything works fine.

Any help would be appreciated,
Thanks,
AV

Pams
Top achievements
Rank 1
 answered on 05 Oct 2011
2 answers
107 views
I have searched these forums and haven't found a solution or mention of this yet, but if it's out there, feel free to point me in that direction.

Using Telerik.Web.UI, v.2011.2.915.40, .NET 4, and ASP.NET/C#, in Visual Studio 2010.

I have a RadDateInput and would like to use the MMM yyyy date format, and use mouse keys to change the date.  This is the way the RadDateInput is configured:
<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy">
    <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" />
</telerik:RadDateInput>

However, on dates such as Sept. 30, 2011 when the day number (30th) is greater than the days in another month (for example, February 2011 only goes up to 28 days) then you can't use the mouse keys to change to or past that month.  I have tried using the server side OnTextChanged for the RadDateInput to manually set the day to the 1st of the month at that time, but that didn't work.  Setting an initial value in the RadDateInput using the current date and changing the day to the 1st also did not work for me.  I've also tried using javascript on the client OnValueChanging event to re-enter the value with the day of 01, but that didn't work either.  The javascript solution I tried:
function changeDate(sender, args) {
    var tbVal = sender.get_textBoxValue();
    if (!(document.getElementById('<%= hdnDate.ClientID %>').value == tbVal)) {
        var month = tbVal.substr(0, 3);
        var year = tbVal.substr(4, 4);
        var newDate = new Date(Date.parse(month + " 01, " + year));
        document.getElementById('<%= hdnDate.ClientID %>').value = month + " " + year;
        window.setTimeout(function () { sender.set_selectedDate(newDate); }, 1);
    }
}
<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy">
     <ClientEvents OnValueChanging="changeDate" />
     <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" />
</telerik:RadDateInput>
<input runat="server" type="hidden" value="" id="hdnDate" />

Is there something I'm missing? or is this an issue with the RadDateInput control itself?
Chris
Top achievements
Rank 1
 answered on 05 Oct 2011
1 answer
180 views
Hello

I'm trying to place a RadMenu inside of a RadTab, and position the menu such that the menu would display below the tab and the top level menu item would be beside the tab text. However, I'm not having much luck doing so. I'm using following code snippet

<head runat="server">
    <title></title>
    <style type="text/css">
        div.RadMenu a.rmLink .rmLeftImage
        {
            position: relative;
        }
         
        div.RadMenu .rmItem .rmLink .rmLeftImage, div.RadMenu .rmItem .rmLink, div.RadMenu .rmLink .rmText
        {
            margin: 0;
            padding: 0;
        }
        .RadTabStrip .rtsLevel, .RadTabStrip .rtsUL, .RadTabStrip .rtsLI
        {
            float: left !important;
            overflow: visible !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadTabStrip ID="RadTabStrip" runat="server" Skin="WebBlue">
            <Tabs>
                <telerik:RadTab Text="Test 1" Selected="true" />
                <telerik:RadTab Text="Test 2" />
                <telerik:RadTab Text="Test 3" />
                <telerik:RadTab Text="Test 4">
                    <TabTemplate>
                        Test 4
                        <telerik:RadMenu ID="RadMenu" runat="server" Skin="" EnableImagePreloading="true"
                            DefaultGroupSettings-OffsetY="-1">
                            <Items>
                                <telerik:RadMenuItem ImageUrl="~/Images/downarrow.png">
                                    <Items>
                                        <telerik:RadMenuItem Text="Menu Item 1" />
                                        <telerik:RadMenuItem Text="Menu Item 2" />
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </TabTemplate>
                </telerik:RadTab>
                <telerik:RadTab Text="Test 5" />
                <telerik:RadTab Text="Test 6" />
                <telerik:RadTab Text="Test 7" />
                <telerik:RadTab Text="Test 8" />
            </Tabs>
        </telerik:RadTabStrip>
     
    </div>
    </form>
</body>
</html>

However, the menu is under the button text and not beside it. Is there any way to achieve this ?
Betty
Top achievements
Rank 1
 answered on 05 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?