Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
Hello,

I am new to Telerik...so, my apologies if this question is too silly... Can we use FileExplorer functionalities that we see in the demo on version 2011.1.315.35? We are trying to develop this inside of a page hosted by Sitecore Content Editor and this is the version that Sitecore uses. I cannot upgrade to the latest Telrik version without breaking Sitecore...

Thanks!
Mariella.
Vessy
Telerik team
 answered on 17 Jan 2013
1 answer
190 views
Hi guys,
I have a radgrid in my apsx page:

 

 

<telerik:RadGrid ID="FundReportGrid" runat="server" GridLines="None"

 

 

 

Skin="Office2010Blue" AllowPaging="true" AllowSorting="true"

 

 

 

onexcelmlexportrowcreated="FundReportGrid_ExcelMLExportRowCreated"

 

 

 

onexcelmlexportstylescreated="FundReportGrid_ExcelMLExportStylesCreated"

 

 

 

onneeddatasource="FundReportGrid_NeedDataSource"

 

 

 

onpageindexchanged="FundReportGrid_PageIndexChanged"

 

 

 

onpagesizechanged="FundReportGrid_PageSizeChanged"

 

 

 

onpdfexporting="FundReportGrid_PdfExporting"

 

 

 

onselectedindexchanged="FundReportGrid_SelectedIndexChanged"

 

 

 

onsortcommand="FundReportGrid_SortCommand"

 

 

 

onitemcreated="FundReportGrid_ItemCreated">

 

 

 

<ExportSettings FileName="FundingIssueReport" OpenInNewWindow="true" IgnorePaging="true" ExportOnlyData="true">

 

 

 

<Excel Format="ExcelML" FileExtension="xls" />

 

 

 

<Pdf FontType="Subset" PaperSize="Letter" />

 

 

 

</ExportSettings>

 

 

 

<MasterTableView AutoGenerateColumns="false" AllowMultiColumnSorting="true">

 

 

 

 

<RowIndicatorColumn>

 

 

 

<HeaderStyle Width="1px" />

 

 

 

</RowIndicatorColumn>

 

 

 

<ExpandCollapseColumn>

 

 

 

<HeaderStyle Width="1px" />

 

 

 

</ExpandCollapseColumn>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn HeaderText="Location" DataField="LOC" UniqueName="LOC" ReadOnly="true" SortExpression="LOC" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn HeaderText="Job" DataField="JOB" UniqueName="JOB" ReadOnly="true" SortExpression="JOB" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn HeaderText="Title" DataField="TITLE" UniqueName="TITLE" ReadOnly="true" SortExpression="TITLE" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn HeaderText="PD Code" DataField="PDIEM_CODE" UniqueName="PDIEM_CODE" ReadOnly="true" SortExpression="PDIEM_CODE" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn HeaderText="Service Days" DataField="SERVICE_DAYS" UniqueName="SERVICE_DAYS" ReadOnly="true" SortExpression="SERVICE_DAYS" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 


I code behind file I am accessing data thru Store Procedure and returning Dataset:

DataSet

 

 

ds = new DataSet();

 

 

 

string jobstatus = string.Empty;

 

ds =

 

PerDiemCFNReport.CFN_Funding_Issue_Report(FiscalYear.ToString(), CFNList1.CFN, Location, JobTextBox.Text.Trim(), EMP_IDs1.SelectedID, EMP_IDs1.SelectedIDType, ref jobstatus);

 

 

 

if ((ds.Tables.Count > 0) && (ds.Tables[0].Rows.Count > 0) && (ds.Tables[0] != null))

 

{

Session[

 

"FundReportData"] = ds.Tables[0];

 

lblError.Text =

 

String.Empty;

 

lblError.Attributes.Add(

 

"display", "none");

 

FundingIssueReport.Visible =

 

true;

 

ErrorImage.Visible =

 

false;

 

BindFundIssueData();

FYDetail = CFNList1.Year;

GetDetailReport();

}

 

 

else

 

{

lblError.Visible =

 

true;

 

lblError.Text =

 

"No Data found for the given search criteria";

 

FundingIssueReport.Visible =

 

false;

 

FundingIssueDetailReport.Visible =

 

false;

 

ErrorImage.Visible =

 

true;

 

 

 

return;

 

}


This is my bind function:

private

 

 

void BindFundIssueData()

 

{

 

 

RadGrid FundIssueGrid = (RadGrid)FundingIssueReport.FindItemByValue("FundDataReport").FindControl("FundReportGrid");

 

FundIssueGrid.MasterTableView.CurrentPageIndex = 0;

FundIssueGrid.DataSource = Session[

 

"FundReportData"];

 

FundIssueGrid.DataBind();

}


For some reason only first 2 column populated with the data.I run debug and SP returns all 5 fields populated with the data.

Please help,
Thanks so much.
Kostadin
Telerik team
 answered on 17 Jan 2013
1 answer
51 views
Hi Folks - I'm having a problem with code working in VS2012, but not when I deploy to Azure, so I'm hoping someone can point me in the right direction.  I've also tried Amazon as well, with the same results.

What I'm trying to do is have a gridbutton column in a grid that when pressed, calls another page with a parameter. I've stripped down the code to that listed below, and changed the redirect link to CNN to see if that makes a difference.  The grid populates, but also paging behavior isn't normal. When the gridbutton is pressed, nothing seems to happen.

I also saw the threads regarding server time, so I've made sure I waited 24 hours after deployment before testing, with the same results, so I'm at a loss. Any help is appreciated.

Here's the sample aspx file (public URL is http://iceasppricecompare.azurewebsites.net )

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ICEAspPriceCompare.Default" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManagerMain" Runat="server">
        </telerik:RadScriptManager>
 
    <asp:SqlDataSource ID="SqlDataSourceCatalog" runat="server" ConnectionString="<%$ ConnectionStrings:icelocalmerchandiseConnectionString %>" SelectCommand="SELECT * FROM [Catalogs]"></asp:SqlDataSource>
        <telerik:RadGrid ID="RadGridMain" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="SqlDataSourceCatalog" GridLines="None" Skin="Metro" OnItemCommand="RadGridMain_ItemCommand">
<MasterTableView datakeynames="Id" datasourceid="SqlDataSourceCatalog">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MaritzCatalogId" FilterControlAltText="Filter MaritzCatalogId column" HeaderText="MaritzCatalogId" SortExpression="MaritzCatalogId" UniqueName="MaritzCatalogId">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column" HeaderText="Title" SortExpression="Title" UniqueName="Title">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UPC" FilterControlAltText="Filter UPC column" HeaderText="UPC" SortExpression="UPC" UniqueName="UPC">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Cost" DataType="System.Decimal" FilterControlAltText="Filter Cost column" HeaderText="Cost" SortExpression="Cost" UniqueName="Cost">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MSRP" FilterControlAltText="Filter MSRP column" HeaderText="MSRP" SortExpression="MSRP" UniqueName="MSRP">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktAverage" DataType="System.Decimal" FilterControlAltText="Filter MktAverage column" HeaderText="MktAverage" SortExpression="MktAverage" UniqueName="MktAverage">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktHigh" DataType="System.Decimal" FilterControlAltText="Filter MktHigh column" HeaderText="MktHigh" SortExpression="MktHigh" UniqueName="MktHigh">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="MktLow" FilterControlAltText="Filter MktLow column" HeaderText="MktLow" SortExpression="MktLow" UniqueName="MktLow">
        </telerik:GridBoundColumn>
        <telerik:GridImageColumn DataImageUrlFields="ImageLink" FilterControlAltText="Filter column1 column" ImageHeight="" ImageWidth="75px" UniqueName="column1">
        </telerik:GridImageColumn>
        <telerik:GridButtonColumn CommandName="UPC" FilterControlAltText="Filter column column" Text="Market Price" UniqueName="column">
        </telerik:GridButtonColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
    </form>
</body>
</html>

 

 

 

and here's the codebehind file

using System;
using Telerik.Web.UI;
 
 
namespace ICEAspPriceCompare
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RadGridMain_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName.Equals("UPC"))
            {
                var item = (GridDataItem)e.Item;
                string id = item.OwnerTableView.DataKeyValues[item.ItemIndex]["Id"].ToString();
                Response.Redirect("http://www.cnn.com", true);
                //Response.Redirect("GoogleSimpleLookup.aspx?Id=" + id, true);
            }
        }
    }
}
Tsvetoslav
Telerik team
 answered on 17 Jan 2013
3 answers
79 views
Hi, i have a radeditor on my page, when i set the content it gives me the follow error, anyone nows what is firing this error? Unsafe JavaScript attempt to access frame with URL chrome-extension://dknkjnkhedbanphkkpbpcgoblmkbfhlf/Js/items/container/container.html#tabUrl=http://localhost:40175 from frame with URL http://localhost:40175/Admin/Config.aspx. The frame requesting access has a protocol of 'http', the frame being accessed has a protocol of 'chrome-extension'. Protocols must match.
Rumen
Telerik team
 answered on 17 Jan 2013
3 answers
167 views
Hi,

I have the following requirement in our application and i'm using RAD Grid Q2 2009 version:
1. The records in the grid should be grouped based on say column A
2. While exporting to excel, it should export the data in new worksheet for every new group (here column A).

Item# 1 can be achieved using <GroupByFieldsoption that comes with the grid. 

While exploring options for Item# 2, i came to know from the following url, 


we can override ExcelML exporting. So i thought of using RadGrid1_ExcelMLExportRowCreated event since that would be the apt event to create a worksheet for my requirement. But i couldn't find any stuff to create worksheet dynamically! 

Please let me know is that achievable?

Thanks
Agm
Top achievements
Rank 1
 answered on 17 Jan 2013
1 answer
137 views
Hello,

We have a visual webpart that has a Radimageeditor control inside of it.  For some reason, when I try to crop an image I am seeing a JScript runtime error being thrown by ScriptResource.axd:

Microsoft JScript runtime error: Sys.ArgumentException: Cannot deserialize empty string.
Parameter name: data

I did check the http handlers in the web.config to make sure I had the correct entries. 

Can anyone assist on how to fix this issue?

Thanks! 
Vessy
Telerik team
 answered on 17 Jan 2013
1 answer
80 views

I am trying to prevent the user from resizing an appointment such that it would overlap with another appointment within the same resource.  The problem seems to be when the end of the appointment being resized is dragged over another that is only 1 day in duration, it's not detecting that appointment as being within the start and end dates.  I'm using the timeline view where each slot is 1 day.

I can set the start time that it passes to the function to one ms less where it spans the day boundary and it works.  If I set it back to 00:00:00 it doesn't.

The code I'm using is below, ResizingTarget() is the handler for the scheduler's OnClientAppointmentResizeEnd event.

function ResizingTarget(sender, args)
{
    if (!isSlotFree(args.get_targetSlot(), args.get_appointment()))
    {
        args.get_appointment().get_element().style.border = "0px none black";
        args.set_cancel(true);
    }
    else
    {
        var apt = args.get_appointment();
        var newTime = args.get_newStartTime();
        var featureId = apt.get_id();
 
 
        // Call web service to update target
    }
}
 
 
 
function isSlotFree(targetSlot, appointment)
{
    //Get start time of target calendar slot
    var startTime = targetSlot.get_startTime();
 
    //Ensure reference to RadScheduler client object
        if (_sched == null)
            _sched = $find( "<%= targets.ClientID %>" );
 
    //Calculate end time (to create span that cannot be overlapped)
    var endTime = new Date(startTime.getTime() + 86400000); //24hr period
    startTime = new Date(startTime.getTime());
 
    //Determine if appt being moved overlaps with another appointment
    return !overlapsWithAnotherAppointment(appointment, startTime, endTime);
}
 
 
function overlapsWithAnotherAppointment(appointment, startTime, endTime)
{
        if (_sched == null)
            _sched = $find( "<%= targets.ClientID %>" );
 
    // Get all appts in range of start and end time
    var appointments = _sched.get_appointments().getAppointmentsInRange(startTime, endTime);
 
    if (appointments.get_count() == 0)
        return false;
 
 
    var strID = "";
    var apptCnt = appointments.get_count();
 
    for (var i = 0; i < apptCnt; i++)
    {
        if (appointments._array[i]._id != appointment._id)
        {
            if (appointments._array[i]._serializedResources[0].key == appointment._resources._array[0]._key)
                return true;
        }
    }
 
    return false;
}
Marbry
Top achievements
Rank 1
 answered on 17 Jan 2013
3 answers
95 views
Hello,

I just downloaded your trial version of the AJAX controls for .NET today.  We have an application that performs uploads of files along with saving associated user entered data for the file that was uploaded.  Previously we were using the SlickUpload control but this product has been sold and isn't supported anymore.

So, I'm looking at converting our application to use your AsyncUpload component.  Some things that I see that are different is that we upload the file on submit of the page along with the information that the user entered.  So, the process is something like: upload file and display upload progress bar when page is submitted and then after file is uploaded, in the same transaction, update the database with the information that the user entered about the file.

I saw that you have a few sample programs that combine some aspects of this but it would involve combining multiple demos to achieve what I'd like.  Usually you upload the file automatically in the client code when the file is selected vs having it uploaded it on submit of the page.  Also I couldn't find a good example of uploading the file and then saving associated database information immediately after the upload takes place.  I would need to write a custom HTTP handler for this?  Do you have some sample code for this?

Thanks for your help in pointing me in the right direction.

Mike Nelson
Plamen
Telerik team
 answered on 17 Jan 2013
2 answers
461 views
Hi,

I have a radgrid which is getting populated with data from a datasource. However when the radgrid is populated with data from many columns, user is unable to scroll to the right and the horizontal scroll bar is also missing. I have attached my aspx code for your reference. what do i need to do to get the horizontal scroll bar to scroll results to the right.

Thanks,
Swamy 

<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        <!--
 
        //this method calculates whether you have reached the bottom when dragging the vertical grid scroll
        function IsScrolledToBottom(scrollArea) {
            var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;
            return currentPosition == scrollArea.scrollHeight;
        }
        -->
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" PageSize="14"
    AllowSorting="True" AllowCustomPaging="True" VirtualItemCount="50000" OnColumnCreated="RadGrid1_ColumnCreated"
    OnNeedDataSource="RadGrid1_NeedDataSource" CellSpacing="0"
    GridLines="None" Skin="Web20">
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView TableLayout="Fixed">
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"
            SaveScrollPosition="True"></Scrolling>
    </ClientSettings>
</telerik:RadGrid>
Mahadevan
Top achievements
Rank 1
 answered on 17 Jan 2013
1 answer
210 views
I am using a RadGrid with a UserControl as my EditForm. I am doing some complicated custom validation when the ItemCommand is called on Update (e.CommandName = "Update") when a btn is clicked in the UserControl. I cannot use regular validation via one of the standard .net validation controls. My problem is that when my custom validation process is complete after the btn is clicked, I do not know how to keep the RadGrid in Edit mode with the UserControl / EditForm still exposed. I want to essentially keep the UserControl with the user's initial edits open with instructions for the custom validation, while being able to postback to do server validation.

How do I return to Edit mode within the ItemCommand event for CommandName == "Update"?
Eyup
Telerik team
 answered on 17 Jan 2013
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?