Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
99 views

Can this be done in order to fit a particular naming convention that a site uses etc? 

 

For ex: The user file is test.pdf but the site prefers a naming convention such as a_test.pdf. Could the user be prompted to change the name of their file using the control? In a sense the user would not need to go to their file explorer, find the file, rename it and then upload. They could simply be prompted to change the name through the control and they would be set. 

 

Any help or possible ways of accomplishing this are appreciated. Thanks. 

David
Top achievements
Rank 1
 asked on 07 Jun 2017
2 answers
148 views

Hi,
I have a 1 column 3 row view for my RadCalendar. The problem is that I can's navigate to the previous months or following months using the "<<" "<" ">" ">>" buttons and I'm not sure why. I don't know if there's something specific I have to enable or what. In my Default.aspx file I have the following code:

<telerik:RadCalendar ID="RadCalendar1" runat="server" EnableNavigation="true" MultiViewRows="3" EnableMultiSelect="False"
                    CssClass="RadCalendarMultiView RadCalendarMultiView_Default" EnableWeekends="True" FastNavigationNextText="&amp;lt;&amp;lt;" SelectedDate="">
                    <SpecialDays>
                        <telerik:RadCalendarDay Date="" Repeatable="Today">
                            <ItemStyle CssClass="rcToday" />
                        </telerik:RadCalendarDay>
                    </SpecialDays>
                    <WeekendDayStyle CssClass="rcWeekend"></WeekendDayStyle>
                    <CalendarTableStyle CssClass="rcMainTable"></CalendarTableStyle>
                    <OtherMonthDayStyle CssClass="rcOtherMonth"></OtherMonthDayStyle>
                    <OutOfRangeDayStyle CssClass="rcOutOfRange"></OutOfRangeDayStyle>
                    <DisabledDayStyle CssClass="rcDisabled"></DisabledDayStyle>
                    <SelectedDayStyle CssClass="rcSelected"></SelectedDayStyle>
                    <DayOverStyle CssClass="rcHover"></DayOverStyle>

                    <ViewSelectorStyle CssClass="rcViewSel"></ViewSelectorStyle>
                </telerik:RadCalendar>

Most of the CssClass codes loaded automatically after doing edits on the design page. 
If anyone has any idea what I'm missing, please let me know.

Thanks, 
Samara

Samara
Top achievements
Rank 1
 answered on 07 Jun 2017
16 answers
530 views
Is it possible to change the width and background image of the SplitBar as well as the middle arrow image?  I have tried setting the width within the RadSplitBar tag but it did not take.

      <telerik:RadSplitter ID="radSplitter" runat="server"
        <telerik:RadPane ID="paneLeft" runat="server">Left Side</telerik:RadPane> 
        <telerik:RadSplitBar ID="splitBar" runat="server" width="20" CollapseMode="Forward" /> 
        <telerik:RadPane ID="paneRight" runat="server">Right Side</telerik:RadPane> 
      </telerik:RadSplitter> 

Thank you,
Kasia
pedrotti
Top achievements
Rank 1
 answered on 07 Jun 2017
3 answers
615 views
I'm trying to add the ability to download a file by clicking on a link that is in a RadGrid within a RadAjaxPanel.  I'm using Response but realize that doesn't work with Ajaxified pages.  Are there any workarounds for this snippet of code?

if (dlFile.Exists)

{

Response.ClearContent();

Response.AddHeader("Content-Disposition", "attachment; filename=" + dlFile.Name);

Response.AddHeader(

"Content-Length", dlFile.Length.ToString());

Response.ContentType = ReturnExtension(dlFile.Extension.ToLower());

Response.TransmitFile(dlFile.FullName);

Response.End();

}



Thanks

Logan Marshall
Top achievements
Rank 2
Iron
 answered on 07 Jun 2017
8 answers
294 views

I'm currently trying to build a form using several input fields and a RadImageEditor. The problem is the only way to save the picture is to call the client-side function "saveImageOnServer". This function though is called asynchronously, so sometimes the picture is hold in my Session, sometimes the button onSave - servermethod is called first and the Session is empty.

 

Is there any possiblity to ensure the image-save function is called first or to get the edited image inside the postback?

Vessy
Telerik team
 answered on 07 Jun 2017
1 answer
151 views

We are using the RadAsyncUpload control (version 2015.401.40) to upload files to an FTP server using FTPWebRequest.

This works without any problems when running on localhost or even on our development webserver where the FTP is hosted on the same network.

However when we update our live web site which Is hosted on a different network to the FTP the file no longer uploads.

We have watched the process and we can actually see the folder structure being created successfully on the FTP and for a very short time we can even see the file we have uploaded TestFile.pdf with a file size of 0kb (The actual file size is 81kb). After approx. 60 seconds we get the "operation has timed out error" and the TestFile.pdf document disappears from the FTP.

Not sure if this is a permissions issue as the upload inidcator is green and i can see the file inside the TempFolder inside the WebApplication.
Any help on this would be great, we are going round in circles on this one.


Neil
Top achievements
Rank 1
 answered on 07 Jun 2017
1 answer
278 views

I'm following along with the "Grid - Hierarchy with Templates" example. There's a parent table, when the parent table row is expanded a template with several tabs is displayed, each tab contains a sub grid of the parent.  For the most part my version of this example works great.

The example seems to use "a little magic" to communicate the data key for the parent rows to the controls in the NestedViewTemplate. An ASP Label's text is bound to the data key for the rows (it is set not visible). A reference to the magic Label is then used in the ObjectDataSource to fetch sub grid data as needed.

My issues relates to having to do some validation of data before new data is Inserted. To do the validation I need to know the parent table row's data key in the code behind from the magic Label. I know how to get the Label's for all rows such as in the code example below. My issue is figuring out which Label to take the key from as there's a Label for each row in the Parent table.

 

    protected void BudgetAdjustmentItemRadGrid_InsertCommand(object sender, GridCommandEventArgs e)
    {

        Label dataKeyLabel = null;
        int id = 0;
        foreach (GridNestedViewItem item1 in ParentRadGrid.MasterTableView.GetItems(GridItemType.NestedView))
        {
            dataKeyLabel = (Label)item1.FindControl("DataKeyLabel");
            if (dataKeyLabel != null)
            {
                id = Convert.ToInt32(dataKeyLabel.Text);
            }
        }

    }

 

Maybe there's a better way to get the parent table row's data key. Let me know if you know one. I did find something that looked promising in the documentation. There's reference to a Parent Data Key and Detail Data Key such as below. However I can't find a working example of these settings. Furthermore my app won't compile when I attempt to use them.

 

       <NestedViewSettings DataSourceID="SqlDataSource2"><telerik:ParentTableRelation MasterKeyField="CustomerID" DetailKeyField="CustomeriD"/></NestedViewSettings>

marksweat
Top achievements
Rank 1
 answered on 06 Jun 2017
0 answers
79 views

I have a radgrid which holds a table to be modified by the user.

The columns are ID (hidden as its the identity in the table), Name, Phone number, Address etc.

When I click the btnAdd button, i get the popup and it shows ID, Name and Phone number, Address etc.

All good, but I want to hide the ID, so the user cannot insert a value.  

For the grid itself I use 

    Private Sub dgGrid_ColumnCreated(sender As Object, e As GridColumnCreatedEventArgs) Handles dgGrid.ColumnCreated
        If e.Column.UniqueName <> "Actions" AndAlso e.Column.UniqueName <> "EditColumn" Then
            If e.Column.UniqueName = "ID" Then
                e.Column.Display = False
                Exit Sub
            End If

...

 

     

AName
Top achievements
Rank 1
 asked on 06 Jun 2017
6 answers
794 views
I have reviewed this demo but it seems to call to code behind and I am using a webservice and doing the tooltip client side.
http://demos.telerik.com/aspnet-ajax/tooltip/examples/overview/defaultvb.aspx?show-source=true

I currently have it working as a click on the event.
how can I do it as a Mouse Over?

    function OnClientAppointmentClick(sender, args) {
        var apt = args.get_appointment();               
        showTooltip(apt);
    }
 
    function showTooltip(apt) {     
        var tooltip = $find('<%=RadToolTip1.ClientID %>');
        tooltip.set_targetControl(apt.get_element());
        $get("startTime").innerHTML = apt.get_start().format("MM/dd/yyyy HH:mm");
        $get("endTime").innerHTML = apt.get_end().format("MM/dd/yyyy HH:mm");
        $get("TitleDiv").innerHTML = apt.get_subject();
        $get("descriptionDiv").innerHTML = decodeEntities(apt.get_description());
        tooltip.set_text($get("contentContainer").innerHTML);
        setTimeout(function () {
            tooltip.show(); 
        }, 20);
    }
 
    function decodeEntities(encodedString) {
        var textArea = document.createElement('textarea');
        textArea.innerHTML = encodedString;
        return textArea.value;
    }
 
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedView="MonthView"
     StartEditingInAdvancedForm="true" OnClientTimeSlotClick="OnClientTimeSlotClick"
    OnClientAppointmentsPopulating="OnClientAppointmentsPopulating" OnClientTimeSlotContextMenu="OnClientTimeSlotContextMenu"
    OnClientAppointmentWebServiceInserting="OnClientAppointmentWebServiceInserting"
    EnableDescriptionField="true" AppointmentStyleMode="Default"
    OnClientAppointmentDoubleClick="hideTooltip" OnClientAppointmentContextMenu="hideTooltip"
    OnClientAppointmentClick="OnClientAppointmentClick"
    OnClientDataBound="onSchedulerDataBound" ShowAllDayRow="False" OverflowBehavior="Expand" Height="100%">
 
<telerik:RadToolTip ID="RadToolTip1" runat="server" RelativeTo="Element" Position="BottomCenter"
            AutoCloseDelay="0" ShowEvent="FromCode" Width="250px" >
            <div id="contentContainer">
                Starts on: <span id="startTime"></span>
                <br />
                Ends on: <span id="endTime"></span>
                <br />
                <div id="TitleDiv"></div>
                <hr />
                <div id="descriptionDiv"></div>
            </div>
</telerik:RadToolTip>
Doug
Top achievements
Rank 1
 answered on 06 Jun 2017
4 answers
444 views

hello

i have the following problem. i have a radgrid which is totally created at runtime and i need to add two ways of editing

i mean,  i added a GridEditCommandColumn and then, because only one GridEditCommandColumn can be added to radgrid, i created a GridButtonColumn

here is the code:

GridEditCommandColumn eCol = new GridEditCommandColumn();
eCol.HeaderStyle.Width = Unit.Pixel(30);
eCol.UniqueName = "EditCommandColumn";
eCol.ItemStyle.CssClass = "edit_btn";
eCol.UpdateText = "Save changes";
grid.MasterTableView.Columns.Add(eCol);
 
GridButtonColumn cCol = new GridButtonColumn();
cCol.ButtonType = GridButtonColumnType.LinkButton;
cCol.UniqueName = "CorrectColumn";
cCol.ItemStyle.CssClass = "edit_btn";
cCol.CommandName = "Edit";
cCol.Text = "Correct";
grid.MasterTableView.Columns.Add(cCol);

the problem rises when in the radGrid_ItemCommand event i need to execute two different operations due to which button has been clicked

here is the pseudocode:

if (e.CommandName == "Edit")
{
    //get button name or id
}
if (e.CommandName == "Update")
{
    if (button_name=='Edit') do exec 1
    else if (button_name=='Correct') do exec 2
}

how can i solve ?

thanks in advance

diego
Top achievements
Rank 1
 answered on 06 Jun 2017
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?