Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
182 views
Hi Telerik,

I find limited resources on the Gallery, as far as the client object is concerned and trying to get information out of it. In otherwords, finding the text, description, etc of the currently selected image. I cant seem to get this information from the argument in the OnNavigated function. If you have documentation on it please lead me to it.

Ok, I want the OnNavigated to update other controls on the screen once that image is selected. I have textboxes and a check box that should update after the image is chosen to view. The server event - Image requested  gets hit only the first time around. So i need this event to update other controls on the screen.

<telerik:RadImageGallery ID="ImageGallery1" DataKeyNames="MemberImageId, IsPrimary, Name, Description" runat="server" Height="400px" LoopItems="true" Skin="Web20">
    <ThumbnailsAreaSettings ThumbnailsSpacing="5px" />
    <ClientSettings>
        <ClientEvents OnNavigated="OnNavigated" />
    </ClientSettings>
    <ImageAreaSettings ShowDescriptionBox="false" />                   
</telerik:RadImageGallery>

JS function
function OnNavigated(sender, args) {
    $find('<%=RadTextBoxMemberImageId.ClientID%>').set_value('1');
    $find('<%=RadTextBoxDescription.ClientID%>').set_value('Try Desc');
    $find('<%=RadButtonPrimary.ClientID%>').set_checked(false);
    $find('<%=RadTextBoxName.ClientID%>').set_value('Try Name');
}

I obviously want the 4 objects to be updated when the next/previous/other image is selected. Not the hard coded values you see. Maybe the key names have values in the js side? Like other controls, but client datakey is used. I dont see any help on the matter.

Can you guys/girls lead me in the right direction?

Thanks a bunch!







Angel Petrov
Telerik team
 answered on 01 Jul 2014
1 answer
325 views
Hi,

I have a form with three controls.  One a RadNumericTextbox with a MaxValue of 6, a dropdown and a button.  The MaxValue of the numeric textbox changes depending on what is selected under the dropdown, and this works fine.  The problem I'm having is that even though I have the numeric textbox's property AllowOutOfRangeAutoCorrect set to false, when submitting the form it sometimes defaults the value to the original MaxValue of 6.  

Here is how to duplicate issue (happens every time):

1. Enter 2 under numeric textbox
2. Click "Get Quote" button, which submits the form
3. Change dropdown value from "Pallet" to "Other"
4. Enter 10 under numeric textbox
5. click "Get Quote" again
6. Numeric Textbox's value switches from 10 to 6.

I am using the Telerik Controls version of 2014.1.403.35

Below is my form, no server-side logic is required:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestRadNumericTextbox.aspx.vb" Inherits="TestRadNumericTextbox" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
      <telerik:RadCodeBlock runat="server" ID="rcbJavascript">
             
        <script type="text/javascript">
 
            function rddlItemQtyUOM_OnClientSelectedIndexChanged(sender, eventArgs) {
                var selectedValue = sender.get_selectedItem().get_value();
                var rntbItemQty = $find("<%= rntbItemQty.ClientID%>");
 
            if (selectedValue == 'Pallet') {
 
                rntbItemQty.set_maxValue(6);
            }
            else {
                rntbItemQty.set_maxValue(10000);
            }
        }
 
        </script>
</telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
         
    </telerik:RadScriptManager>
 
        <telerik:RadAjaxManager ID="ramMain" runat="server" DefaultLoadingPanelID="ralpDefault" >
        <AjaxSettings>
           
            <telerik:AjaxSetting AjaxControlID="btnGetQuote">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LTLUI" UpdatePanelCssClass=""  LoadingPanelID="ralpDefault"/>
                    
                </UpdatedControls>
            </telerik:AjaxSetting>
 
        </AjaxSettings>
            </telerik:RadAjaxManager>
        <telerik:RadSkinManager runat="server" ID="rskmMain" Skin="Windows7" ShowChooser="false" />
         
        <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" EnableRoundedCorners="false">
        </telerik:RadFormDecorator>
 
        <telerik:RadAjaxLoadingPanel ID="ralpDefault" runat="server" Height="75px" Width="75px" />
 
        <div id="LTLUI" runat="server" >
                <telerik:RadNumericTextBox runat="server" ID="rntbItemQty" Width="48px" NumberFormat-DecimalDigits="0" EmptyMessage="Required Field" MinValue = "1" MaxValue="6"  AllowOutOfRangeAutoCorrect="false"   />
                                                                    <asp:RequiredFieldValidator runat="server" ID="rfvrntbItemQty" ValidationGroup="InputArea" Display="Dynamic" Text="" ControlToValidate="rntbItemQty"  />
                                                                     
                <telerik:RadDropDownList runat="server" ID="rddlItemQtyUOM"  Width="66px" OnClientSelectedIndexChanged="rddlItemQtyUOM_OnClientSelectedIndexChanged">
                    <Items>
                        <telerik:DropDownListItem Value="Pallet" Text="Pallet" />
                        <telerik:DropDownListItem Value="Other" Text="Other" />
                    </Items>
                    </telerik:RadDropDownList>
                                                                   
            <telerik:radbutton runat="server" id="btnGetQuote" Text="Get Quote" CausesValidation="true"  ValidationGroup="InputArea" Width="500px" />
            </div>
    </div>
 
    </form>
</body>
</html>
















Maria Ilieva
Telerik team
 answered on 01 Jul 2014
2 answers
307 views
Hi All
I have a Radgrid with many records and while updating It create copy of current month records  and put as  new records. I would like to make sure that person could not hit the button twice in one go. otherwise it will create two copies of the current month records. Is it possible I can disable update button after user click it. I am using EditCommandColumn.
Please update me it is urgent.
Thanks in advance
Syed
Viktor Tachev
Telerik team
 answered on 01 Jul 2014
4 answers
198 views
We are upgrading our code from .Net 3.5 to 4.0 and an issue has come up. The way we previously did login is now having an error on the Response.Redirect. From what have found doing research, it seems to be an error that has something to do with Ajax, adding to the response, and redirect.  Unfortunately I can not find a solution to this problem.

The error we get is "Uncaught Sys.WebForms.PageRequestManagerParserErrorException" via the javascript from Telerik.Web.UI.WebResource.axd.

The code snippets we have below work under .Net 3.5 but do not work after attempting the 4.0 upgrade. The authentication cookies do get added as I can manually type the url that we are supposed to redirect to. However, the automatic redirect does not work. 



<%@ Page Language="C#" MasterPageFile="~/masterpages/WebMain.master" AutoEventWireup="true" Inherits="Default" Codebehind="Default.aspx.cs"%>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMaster" Runat="Server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Login">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Login" LoadingPanelID="AjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" />   
    <div id="divLogin" runat="server">
        <table align="center">
            <tr>
                <td align="center">
                    <asp:Login ID="Login" runat="server"
                        OnAuthenticate="Login_Authenticate" DisplayRememberMe="False"
                        Orientation="Horizontal" TextLayout="TextOnTop" TitleText="" LoginButtonStyle-Height="25px" LoginButtonStyle-Width="50px">
                    </asp:Login>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
protected void Login_Authenticate(object sender, AuthenticateEventArgs e)
{
    ...
     Response.Cookies.Add(authCookie);
 
     ...
     Response.Redirect(pageUrl, false);
 
}

ChrisS
Top achievements
Rank 1
 answered on 01 Jul 2014
2 answers
161 views
I'm in need of an OnClientClose event for the ColorPicker, but do not see one.  Does anyone know if this exists or a similar clientSide event I can use?

Erik
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
63 views
Hello All, 
I am getting some issue with here is my code

See attached , i have aspx, VB page along with the ERROR, also screen short after F12
, exception is 
Uncaught TypeError: Cannot set property 'control' of undefined 

Interesting thing is this same code is basically generating columns based on the query and condition, in some pages it's really work but in some case not , and from the error when i go to the source i found it's date picker also on load this exception happen , and including date picker no ajax is working even loader , row filter all, 


Please help as soon you can 


























Mahaarajan
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
69 views
Hi

I have a radFileExplorer control which displays documents and media files.
when i open mp3 files through the radFileExplorer then a popup window play mp3 file , its work fine.
but when i open  mp4 files through the radFileExplorer then a popup window display "404 - File or directory not found", but mp4 files are already exits.
Is this known behaviour and is there anything I can do to stop it? please help me out how can i soolve my issue.

Thanks
Vessy
Telerik team
 answered on 01 Jul 2014
1 answer
169 views
Hello All

We've had this problem since we started using the Telerik controls, and I was hoping for a fix.

ANY control we use comes with the Telerik.web.ui dll or xml file. 
When we try and publish a site we get an access denied on either the dll or the xml file.  This locks up Visual Studio 2010 and causes us to have to reboot.  Stopping the devenv.exe *32 process is not an option, because we can not kill it off.  We get Access Denied, and have to reboot our PC's
We are all domain admins and local admins so this doesn't seem to be a security issue.

This happens when we build web sites, or web applications.

We have tried publishing to the local machine.  That works, then hand copying to the server.  Most of the time the copy hangs on the Telerik.Web.UI.xml file.  Sometimes it's the .dll, and locks up file explorer.

Any and all help would be great as my developers are about to abandon using your controls.

Thanks

Gary
Ianko
Telerik team
 answered on 01 Jul 2014
1 answer
142 views
In my radgrid I want to delete and store the deleted rows in a separate table.
I get an empty string as value where I use a GridAutoCompleteColumn.
The value I want is ItemNo.
<telerik:GridBoundColumn DataField="Whs" FilterControlAltText="Filter Whs column"
                    HeaderText="Whs" SortExpression="Whs" UniqueName="Whs">
                </telerik:GridBoundColumn>
                <telerik:GridAutoCompleteColumn DataTextField="ItemNo" DataValueField="ItemNo" DataField="ItemNo"
                    DataSourceID="sqlDS_mitmas" Filter="StartsWith" InputType="Text" HeaderText="ItemNo" UniqueName="ItemNo">
                </telerik:GridAutoCompleteColumn>
Protected Sub RadGrid1_ItemDeleted(sender As Object, e As Telerik.Web.UI.GridDeletedEventArgs) Handles RadGrid1.ItemDeleted
 
        Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
 
        Dim whs As String = dataItem("Whs").Text
        Dim itemno As String = dataItem("ItemNo").Text
        Dim itemname As String = dataItem("ItemName").Text
        Dim deletedby = User.Identity.Name.ToString()
 
        InsertHistory(whs, itemno, itemname, deletedby)
 
    End Sub
itemno is empty, how can i get it/fetch it?
Kostadin
Telerik team
 answered on 01 Jul 2014
3 answers
172 views
I can do dynamic server-side column groupings ONCE, but then can't get the grid to 're-set' for different groupings unless I change the AutoGenerateColumns to FALSE & generate the columns on the server-side.

The SECOND time (when a new Start Date is selected), I get the error: "No column group with the specified group name ( Mon_06-23 ) exists!"
(where Mon_06-23 is an 'old' grouping from the previous viewing)

Apparently I am not doing enough to "clear out the grid" before re-generating it with new Column Groupings.

My grid HTML is:

<telerik:RadGrid ID="RadGridWkSched" runat="server" CellSpacing="0" GridLines="Vertical" AutoGenerateColumns="True"
    OnItemDataBound="RadGridWkSched_ItemDataBound" OnColumnCreated="RadGridWkSched_ColumnCreated">
</telerik:RadGrid>

My Server-side code is:

        private void FillScheduleWeekGrid()
        {
            // get the Start date from the input control
            DateTime dtstart = DateTime.Parse(RadDatePickerWeek.SelectedDate.ToString());

            // clear out the grid before re-populating it
            currentSection = "";
            RadGridWkSched.Columns.Clear();
            RadGridWkSched.MasterTableView.ColumnGroups.Clear();

            for (int i = 0; i < 7; i++)
            {
                DateTime thisdt = dtstart.AddDays((double)i);
                string weekDate = thisdt.ToString(ScheduleController.DateFormat);

                // declare a column group for this date
                GridColumnGroup colGroupDate = new GridColumnGroup();
                RadGridWkSched.MasterTableView.ColumnGroups.Add(colGroupDate);   // need to add it before setting the values
                colGroupDate.Name = colGroupDate.HeaderText = weekDate;
                colGroupDate.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
            }
            RadGridWkSched.DataSource = scheduleController.FillScheduleWeekDT(dtstart, serviceLevelID, Session["version"].ToString());
            RadGridWkSched.DataBind();
            }
        }






Viktor Tachev
Telerik team
 answered on 01 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?