Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views

What I am trying to do is have a RadGrid that will display 5 static questions followed by the detail?  The detail records will be dynamic and come from the database.

Example

<Header Row> File Name and Created On
<Static Question>1. Do you have any special agreements?
<Detail Record(s)> This will list all files associated with question 1
<Static Question>2. Attach financial statements for last 3 months
<Detail Record(s)>List all files associated with question 2

 

Rumen
Telerik team
 answered on 13 Jun 2019
1 answer
184 views

I I tried to block the addition of the grid. But when I clicked to add a row by trying to block the grid It can be added

By which I click on the symbol plus it cannot But when i click on the message it will add a row

I don want it's Add New Row in block radgrid

now I block it's  but it Add new row
 Attach files  : Pic1  and Pic2

Rumen
Telerik team
 answered on 13 Jun 2019
1 answer
178 views

Hi,

I have a large ASPX app using Telerik controls and would like to add logic to display a loading panel while a file upload or download operation is being performed.

The loading panel would need to be controlled from the server side, both for showing and hiding.  Can this be done?

Rumen
Telerik team
 answered on 13 Jun 2019
3 answers
355 views
Hi all,
I want customization the RadSchedule lock like attachment picture. Please help me.
Thanks
Rumen
Telerik team
 answered on 12 Jun 2019
1 answer
493 views

     I'm trying to display images on my gridimagecolumn without me having to upload it myself but instead it does it automatically when i load the grid. How do I do that? 

 

My template is => 

 <telerik:GridBinaryImageColumn  DataField="Profile" HeaderText="Profile" UniqueName="Upload" ImageHeight="60px" ImageWidth="60px" ResizeMode="Fit"></telerik:GridBinaryImageColumn>   

 

I haven't yet figure the code out on how to go about this...This is what I have so far.

protected void uxUsedGrid_InsertCommand(object source, GridCommandEventArgs e)
        {
            _InsertCommand(source, e);
        }
 
        private void _InsertCommand(object source, GridCommandEventArgs e)
        {
 
            GridEditFormInsertItem insertItem = e.Item as GridEditFormInsertItem;
            RadAsyncUpload radAsyncUpload = insertItem["Upload"].FindControl("AsyncUpload1") as RadAsyncUpload;
 
            UploadedFile file = radAsyncUpload.UploadedFiles[0];
            byte[] fileData = new byte[file.InputStream.Length];
            file.InputStream.Read(fileData, 0, (int)file.InputStream.Length);
 
            
        }
 
protected void AsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            long totalBytes = 0;
            int MaxTotalBytes = 1000000;
            if ((totalBytes < MaxTotalBytes) && (e.File.ContentLength < MaxTotalBytes))
            {
                e.IsValid = true;
                totalBytes += e.File.ContentLength;
                IsRadAsyncValid = true;
            }
            else
            {
                e.IsValid = false;
                IsRadAsyncValid = false;
            }
        }

 

I have look at this Demo and while it was helpful, it mostly focused on the client uploading the files and basing it off from that to upload the images. 

Any help is appreciated!

Eyup
Telerik team
 answered on 12 Jun 2019
5 answers
419 views

RadDatePicker inside UpdatePanel in Microsoft Edge browser throws JavaScript error when doing a post-back (see attached image).

The error: "Unable to get property 'length' of undefined or null reference".

Any ideas how to fix this, or a work-around?

 

Microsoft Edge 44.17763.1.0

Telerik Controls: Telerik.Web.UI, Version=2019.1.409.45

 

My Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EdgeDatePickerIssue.Default" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title>Default</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server" ScriptMode="Release" />
 
        <asp:UpdatePanel runat="server" ID="upPanel">
            <ContentTemplate>
                <label>Select Date:</label>
                <telerik:RadDatePicker ID="dpStartDate" runat="server"
                    MaxDate="2020-01-01" MinDate="2000-01-01"
                    AutoPostBack="true" OnSelectedDateChanged="dpStartDate_SelectedDateChanged" />
 
                <telerik:RadButton ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>

 

 

Rumen
Telerik team
 answered on 12 Jun 2019
3 answers
187 views

https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/excel-export-multiple-grids/defaultcs.aspx?product=grid

 

Just now,i copy the source code(only aspx  and aspx.cs) from this demo,but can not run.

 

My question is :

       Can I download the all the source code (include dll and others) about this demo?

Vessy
Telerik team
 answered on 12 Jun 2019
8 answers
721 views
Hi. it is my primer tuto post.
Topic: how use RadConfirm() function in a button (or another control with similar ClientEvents) without make a full postback (just it is different to use confirm javascript function).

scenario:
Asp.net framework 4, RadControls for asp.net 2011 Q2, c# development

Steps.
1.    Add this controls to you aspx file.
    RadScriptManager
    RadAjaxManager
    RadWindowManager
    RadButton
    Another controls that satisfy your needs.
2.    Set ajax manager to your fits, for example set radbutton as fire control and a image control as updated control
3.    Set onClientClicked event of your radbutton as: 'CheckItem'
4.    Set CommandName argument as 'btnShowImage' (or of you preference, this must identify unique control)
<telerik:RadButton ID="btnShowImage" runat="server" Text="Show Image"
OnClick="btnShowImage_Click" CommandName="btnShowImage"
onclientclicked="CheckItem">
</telerik:RadButton>

5.    include next javascript code in your aspx file.
function CheckItem(sender, e) {
    if (sender._commandName == "btnShowImage") {
        RadConfirm("¿are sure?", btnShowImageResume, 330, 100, null, "Confirm.");
        sender.set_autoPostBack(false);
    }
    else {
        sender.set_autoPostBack(true);
    }
}
 
function btnShowImageResume(arg) {
    if (arg) {
        __doPostBack("btnShowImage", "onclick");
    }
}

Explain: btnShowImage is a button which when pressed displays the image in an image field (or your explicit need). this button must have some postback event for this example 'onclick' event (behind code). when user clicks on the radbutton fires client side event 'CheckItem' if command name parameter match with button then function call RadConfirm method: "RadConfirm(confirm message, javascript function that be executed after user take a decision, width, height, objet reference, message tittle);"
After, javascript cancel objet postback (preventing that compiler continues with onclick event code.) else continues with postback.
When user takes a decision RadConfirm call resume function in this example:'btnShowImageResume' function, this function validate if arg parameter (result) is true then executes onclick event of the control else does not do nothing (you can execute another event if you want). when we call to _dopostback javascript function, RadAjaxManager evalues situation and execute its.

I hope they will be of great help.
Marin Bratanov
Telerik team
 answered on 11 Jun 2019
6 answers
1.5K+ views
Hi 

Is it possible for the RadDateTimePicker to display and select the hours and minutes separately?
Marin Bratanov
Telerik team
 answered on 11 Jun 2019
6 answers
952 views
I cannot see to figure out how to force a RadComboBox to requery for its list of items client-side.

One solution I tried was to surround the RadComboBox with a RadAjaxPanel (by the way when I do that the VS parser claims that RadComoBox is not a known element even though the solution compiles and runs fine.). In addition, I wired up the ItemsRequested event to populate the control. Then on the client side I call something like:
var combo = $find("<%=this.MySpiffyCombo.ClientID %>"); 
combo.requestItems(); 
 

Another solution I tried was to use RadAjaxManager (which would be my preferred choice) where the AjaxControlID on the AjaxSetting and its only AjaxUpdatedControl item's ControlID are both set to the RadComboBox. Then on the client I tried:
var ajaxManager= $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequest("foo"); 

Which did not fire on the server. Then I tried:
var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequestWithTarget("<%=this.MySpiffyCombo.UniqueID %""");  

I also tried wiring up the AjaxRequest event on the RadAjaxManager and again it did not fire.

What am I missing here? What is the Hoyle technique for ajax-ifying a RadComboBox and forcing a ajax refresh of its items?

jroughgarden
Top achievements
Rank 1
 answered on 10 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?