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

How is the best way to get values of controls to EditFormSettings ?

I have this code but I don't know if there's other best way:

 

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
       {
           if (e.CommandName == "PerformInsert")
           {
               GridEditFormInsertItem editform = (GridEditFormInsertItem)((Telerik.Web.UI.GridEditFormInsertItem)(e.Item));
               RadTextBox txtbx = (RadTextBox)editform.FindControl("txtName");
               string strtxt = txtbx.Text;
           }
       }
<EditFormSettings EditFormType="Template">
     <FormTemplate>
           <telerik:RadLabel runat="server" Text="Name:" Font-Bold="True"></telerik:RadLabel>
           <br />
           <telerik:RadTextBox ID="txtName" runat="server" InputType="Text" MaxLength="70" Width="100%" AutoCompleteType="None" autocomplete="off"></telerik:RadTextBox>
           <asp:RequiredFieldValidator ErrorMessage="*" ControlToValidate="txtName" runat="server" CssClass="rfv" />
           <telerik:RadButton ID="btnSave" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'> </telerik:RadButton>
     </FormTemplate>
</EditFormSettings>

 

Eyup
Telerik team
 answered on 14 Jun 2019
6 answers
550 views
In my application I have one form called [Main.aspx] :

In this page i put one tab strip called [RadTab1] and it have following tabs :
1.Home 
2.Abouut Us
3.Contact Us
4.Feedback

Now what I want is when user click on Home tab at that time Home.aspx will be load under corrosponding page view...

When click on abount us then AboutUs.aspx ,similarly for other two..

I do no want to do this with master page and user controls..every thing should be in Main.aspx.


I have tried following code but it redirect me to another page .

<telerik:RadTabStrip ID="radTabMain" runat="server" Width="100%" MultiPageID="RadMultiPage1"
            SelectedIndex="0">
            <Tabs>
                <telerik:RadTab Text="Home" NavigateUrl="Home.aspx" runat="server">
                </telerik:RadTab>
                <telerik:RadTab Text="AbouutUs" NavigateUrl="AbouutUs.aspx" runat="server">
                </telerik:RadTab>
                <telerik:RadTab Text="Contact Us" NavigateUrl="Contact.aspx" runat="server">
                </telerik:RadTab>
                <telerik:RadTab Text="Feedback" NavigateUrl="Feedback.aspx" runat="server">
                </telerik:RadTab>
            </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
            <telerik:RadPageView  ID="RadPageView1" runat="server">
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server">
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView3" runat="server">
            </telerik:RadPageView>
            <telerik:RadPageView runat="server" ID="RadPageView1">
            </telerik:RadPageView>
</telerik:RadMultiPage>


So what ot do in this case ?

Please help me. Please send me code for this.

-Thanks
Albert
Vessy
Telerik team
 answered on 13 Jun 2019
2 answers
217 views
Hi,
I am using Export to PDF from RadGrid, I need to decorate my data in the PDF file, I could change font color and some other simple stuff I need to know more changes I can do and how can I do it and especially Cell Borders ..
Second Thing , Can I add additional data to my PDF or Word or Excel Sheet ? not only the Grid data but more data I need to put on my output file ..
Can you help me please with this ..
Thanks

Ban
yasmin Ahmad
Top achievements
Rank 2
 answered on 13 Jun 2019
1 answer
95 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
160 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
156 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
328 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
455 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
378 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
169 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?