Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
430 views
Hi,

How to save image into database on button click using RadAysncUpload control.

Please Help!

Regards
Ravi
Dimitar Terziev
Telerik team
 answered on 14 Mar 2011
5 answers
125 views
Hi, I am using various telerik components which are working fine. If the server goes down and someone still has the web application open and they click on something that will cause a callback, you will get the following error

Data not loaded: Object doesn't support this property or method

this is easy to trap in Firefox (using window.onerror) but it does not work in IE, whats the best way of dealing with this as "Data not loaded: Object doesn't support this property or method" does not mean anything to an end user.

thanks
Maria Ilieva
Telerik team
 answered on 14 Mar 2011
2 answers
102 views
Hi,

I have a heirarchy grid. But I am having a problem with it.

The detail row is showing all the records from the table rather than just the ones which match the parent row.

My Grid Code is:

    <telerik:RadGrid ID="RadGrid1" DataSourceID="SessionDataSource1" runat="server" ShowStatusBar="false"
    AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
    AllowPaging="False" GridLines="None" ShowFooter="False" Skin="Web20"
    style="top: 5px; left: 5px; position: absolute;" Width="780px" Height="470px">
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView DataSourceID="SessionDataSource1" DataKeyNames="TOPID" AllowMultiColumnSorting="True"
        Width="100%" CommandItemDisplay="None" Name="Customers" HierarchyDefaultExpanded="true">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="BOTID" DataSourceID="SessionDataSource2" Width="100%"
                runat="server" CommandItemDisplay="None" Name="Orders">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="BOTID" MasterKeyField="TOPID" />
                </ParentTableRelation>                      
                <Columns>
                    <telerik:GridBoundColumn SortExpression="BOTID" HeaderText="JournalID" HeaderButtonType="TextButton"
                        DataField="BOTID" UniqueName="BOTID" Visible="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Account" HeaderText="Account" HeaderButtonType="TextButton"
                        DataField="Account" UniqueName="Account">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="AccountName" HeaderText="Account Name" HeaderButtonType="TextButton"
                        DataField="AccountName" UniqueName="AccountName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Debit" HeaderText="Debit" HeaderButtonType="TextButton"
                        DataField="Debit" UniqueName="Debit">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Credit" HeaderText="Credit" HeaderButtonType="TextButton"
                        DataField="Credit" UniqueName="Credit">
                    </telerik:GridBoundColumn>                          
                </Columns>
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="Account"></telerik:GridSortExpression>
                </SortExpressions>                       
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
             
            <telerik:GridBoundColumn SortExpression="Date" HeaderText="Date" HeaderButtonType="TextButton"
                DataField="Date" UniqueName="Date">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="TOPID" HeaderText="JournalID" HeaderButtonType="TextButton"
                DataField="TOPID" UniqueName="TOPID" Visible="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="JournalTitle" HeaderText="Title" HeaderButtonType="TextButton"
                DataField="JournalTitle" UniqueName="JournalTitle">
            </telerik:GridBoundColumn>           
        </Columns>
        <SortExpressions>
            <telerik:GridSortExpression FieldName="Date"></telerik:GridSortExpression>
        </SortExpressions>
    </MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SessionDataSource1" ConnectionString="<%$ ConnectionStrings:SASConnectionString %>"
    ProviderName="System.Data.SqlClient" runat="server"
    SelectCommand="Select DISTINCT JournalID AS TOPID, Convert(char(10),CreationDate,103) AS [Date], JournalTitle from Journal
                        Where (JournalID Like @drpJournal) AND (Journal.CreationDate >= @DateFrom) AND (Journal.CreationDate <= @DateTo)"
    >
    <SelectParameters>
        <asp:ControlParameter ControlID="drpJournal" Name="drpJournal" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="RadDatePicker1" Name="DateFrom" PropertyName="SelectedDate" Type="DateTime" />
        <asp:ControlParameter ControlID="RadDatePicker2" Name="DateTo" PropertyName="SelectedDate" Type="DateTime" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SessionDataSource2" ConnectionString="<%$ ConnectionStrings:SASConnectionString %>"
    ProviderName="System.Data.SqlClient" runat="server"
    SelectCommand="Select JournalID AS BOTID, Journal.Account, AccountName, SUM(Debit) AS Debit, SUM(Credit) AS Credit from Journal JOIN Ledger ON Journal.Account = Ledger.Account
                        Where (JournalID Like @drpJournal) AND (Journal.CreationDate >= @DateFrom) AND (Journal.CreationDate <= @DateTo) GROUP BY JournalID, Journal.Account, AccountName"
     >
     <SelectParameters>
        <asp:ControlParameter ControlID="drpJournal" Name="drpJournal" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="RadDatePicker1" Name="DateFrom" PropertyName="SelectedDate" Type="DateTime" />
        <asp:ControlParameter ControlID="RadDatePicker2" Name="DateTo" PropertyName="SelectedDate" Type="DateTime" />
    </SelectParameters>
</asp:SqlDataSource>

The grid brings the 3 Parent record where the JournalID = 96, 99 and 100. But then under each of them it shows the records with all 3 JournalIDs, while it should only show the records with JournalID 96 under Parent 96 etc.

Any ideas how to resolve this.

Ads
Adeel
Top achievements
Rank 1
 answered on 14 Mar 2011
3 answers
209 views
I have been working with the grid control (specifically client side binding) and it is really nice once you get Linq figured out.

However, I am wondering if there is a way to append rows to the grid client side via a web service. I suspect there isn't because you need to set the data source to the result set and then rebind if you need a new page of data. This effectively removes all the rows that had been previously sent to the browser. I have a dataset that is about 1000 rows with 17 columns and needed to bump up the maxJasonLength just to get the data. Then there is the performance hit on rendering on the client. So I am sticking with paging but the client isn't too happy.

Maybe there is a hack that someone has figure out. Possibly storing the original JSON object and appending to that? I'm open to ideas.

If not then this would be a nice feature for just a flat grid.

Just thought I's ask.
Thanks,

Craig
Veli
Telerik team
 answered on 14 Mar 2011
1 answer
131 views
Hi,

I have a radtreeview with load on-demand functionality and works fine.
What I would like to do is to hide checkbox for nodes which have child nodes count > 0. For root data it works, but not for child nodes.

Here is my code:

private static void LoadRootNodes(RadTreeView treeView, TreeNodeExpandMode expandMode)
    {
    .
    .
    .
        foreach (var row in sdps)
        {
            RadTreeNode node = new RadTreeNode
                                   {
                                       Text = row.FullText,
                                       Value = row.id.ToString(),
                                       ExpandMode = expandMode
                                   };
            node.Attributes.Add("IdAsText", row.IdAsText);
            if (row.ChildrenCount== 0)
            {
                node.ExpandMode = TreeNodeExpandMode.ClientSide;
            }
            else
            {
        //This works because RadTreeNode has a Checkable propery
                node.Checkable = false;
            }
            treeView.Nodes.Add(node);
        }
    }
 
 
   [WebMethod]
    public static RadTreeNodeData[] LoadSdpTreeView(RadTreeNodeData node)
    {
    .
    .
    .
        List<RadTreeNodeData> result = new List<RadTreeNodeData>();
        foreach (var row in childNodes)
        {
            RadTreeNodeData childNode = new RadTreeNodeData { Text = row.FullText, Value = row.id.ToString() };
            childNode.Attributes.Add("IdAsText", row.IdAsText);
            if (row.ChildrenCount > 0)
            {
                childNode.ExpandMode = TreeNodeExpandMode.WebService;
        // This doesnt work because there is no Checkable propery for RadTreeNodeData
        // childNode.Checkable = false;
            }
 
            result.Add(childNode);
        }
 
        return result.ToArray();
    }

How can I achieve this?

Thanks in advance.
Nikolay Tsenkov
Telerik team
 answered on 14 Mar 2011
1 answer
164 views
Hi,

I was wondering if it's possible to change the language of the RadDateTimePicker in the GridDateTimeColumn.

I've managed to get a date in the correct format by setting this in the PageLoad:
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("nl-nl");
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture("nl-nl");

But all the other text is still in english.

Does anyone know a way to change that?

Sincerely
Mira
Telerik team
 answered on 14 Mar 2011
1 answer
98 views
I have a big problem that so far I have not seen an answer for. I have a web app using the RAD DateTime Picker and the RADGrid, they work fine on my local machine and on our test server but when I deploy it to the live server I get this error:

"

Unable to cast object of type 'System.Web.Configuration.ScriptingProfileServiceSection' to type 'System.Web.Configuration.ScriptingProfileServiceSection'.

".

I have researched this error and found no solution to it yet. I know that some of the sites on this server are using an older version of Telerik controls so I don't know if this is an issue or not, but our test server is doing the same thing and it runs on there. HEre is my web.config file.

<?xml version="1.0"?>
<configuration>
  <appSettings />
  <connectionStrings />
  <system.web>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <authentication mode="Windows" />
    <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>

I need a solution on this asap otherwise I cannot continue using your controls.

Thanks!
Mira
Telerik team
 answered on 14 Mar 2011
7 answers
124 views
Hi
I need to limit the input on all the controls of the page to a certain group of characters.
The input is fed to a banking system that can accept only ASCII 032-0126 with the exception of 23 characters in this range ($, £, @, #, ...).

MS AJAX Control Toolkit's FilteredTextBox  appears to be doing the job with the ValidChars attribute.

Is there a comparable capability for Telerik?

I'd hate to add the MS AJAX  toolkit to my pages as it would increase size and potentially complexity.
Chen
Marin
Telerik team
 answered on 14 Mar 2011
7 answers
194 views
Hi,

I've a date column in my filter. If I type any character in filter coulmn it gives me javascript error 'length is null or not an object'. How can stop user to enter any character in date filter column. Below is my code.

 

<telerik:GridDateTimeColumn DataField="Date_Created" HeaderText="Date Created" HeaderStyle-HorizontalAlign="Center" ShowFilterIcon="true"

 

 

SortExpression="Date_Created" UniqueName="Date_Created" PickerType="DatePicker" FilterControlWidth="100px"

 

 

DataFormatString="{0:d}" AutoPostBackOnFilter="true" AllowFiltering="true">

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

</telerik:GridDateTimeColumn>

 



Regards,
Lubna.
Pavlina
Telerik team
 answered on 14 Mar 2011
1 answer
152 views

I got below error message when I adding the Ajax function to my master.page for the RadSplitter

SplitterItemsCollection must contain SplitterItem objects

Below is my code, could you please help to check which part that problem.


<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="FFS.master.vb" Inherits="FFS_WEB.FFS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>FFS</title>
    <link href="style/main.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">

    <telerik:RadScriptManager runat="server" EnableCdn="true" ID="RadScriptManager1">
 </telerik:RadScriptManager>
 <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheet1" />
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="Default,Zone" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadPanelBar1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSplitBar1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadSplitter runat="server" ID="RadSplitter1" Width="100%" BorderSize="1"
     BorderStyle="Solid" PanesBorderSize="0" Height="98%" Orientation="Horizontal"
     VisibleDuringInit="false">
        <telerik:RadPane ID="topPane" runat="server" Height="80px">
            <div id="header" style="background-image :url(images/FFS_WEB_HEAD_BG.png);  background-repeat:repeat; ">
                <img alt="" src="images/FFS_WEB_HEAD.png" />
                <div class="header-top-links">
                    <a href="#">Register</a>|
                    <a href="#">Logout</a>
                </div>
            </div>
            <div>
          <telerik:RadMenu runat="Server" ID="RadMenu1" EnableShadows="true" EnableRoundedCorners="true"  Width="100%">
                    <Items>
                    <telerik:RadMenuItem runat="server" text="About FFS"></telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" text="Support"></telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Services"></telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Demo"></telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Contact Us"></telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenu>
            </div>
    </telerik:RadPane>
    <telerik:RadPane runat="server" ID="contentPane" Scrolling="none">
    <telerik:RadSplitter runat="server" ID="RadSplitter2" BorderStyle="None" PanesBorderSize="0">
     <telerik:RadPane runat="Server" ID="leftPane" Width="150px" MinWidth="150" MaxWidth="600" Scrolling="None">
      <telerik:RadSplitter runat="server" ID="RadSplitter3" BorderStyle="None" PanesBorderSize="0"
       Height="100%" Orientation="Horizontal">
                            <telerik:RadSplitBar runat="server" ID="RadSplitBar3" CollapseMode="Backward" EnableResize="false" />
                            <telerik:RadPane runat="server" ID="bottomLeftPane" Height="100%">
                                <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%"
                                    Skin="Office2007">
                                    <Items>
                                        <telerik:RadPanelItem Text="Home" AccessKey="H">
                                            <Items>
                                                <telerik:RadPanelItem Text="Dashboard" NavigateUrl="Dashboard.aspx"  ViewStateMode="Enabled"></telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Tasks" NavigateUrl="Task.aspx" ViewStateMode="Enabled"></telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Transport" AccessKey="T">
                                            <Items>
                                                <telerik:RadPanelItem Text="Booking" AccessKey="B">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Trucking" AccessKey="T">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Air Transport" AccessKey="A">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Sea Transport" AccessKey="S">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="P.O./Item" AccessKey="P">
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Finance" AccessKey="F">
                                            <Items>
                                                <telerik:RadPanelItem Text="General Ledger">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Account Payable">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Account Receivable">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Reports">
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="CRM" AccessKey="C">
                                            <Items>
                                                <telerik:RadPanelItem Text="Agents">
                                                </telerik:RadPanelItem>
                                                <telerik:RadPanelItem Text="Customer">
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                        <telerik:RadPanelItem Text="Sales" AccessKey="S">
                                            <Items>
                                            </Items>
                                        </telerik:RadPanelItem>
                                    </Items>
                                </telerik:RadPanelBar>
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </telerik:RadPane>
                    <telerik:RadSplitBar runat="server" ID="RadSplitBar1" CollapseMode="Forward" />
                    <telerik:RadPane runat="Server" ID="rightPane" CssClass="right-pane" Scrolling="None">
                        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
       
                        </asp:ContentPlaceHolder>
                    </telerik:RadPane>
                </telerik:RadSplitter>
     </telerik:RadPane>
 </telerik:RadSplitter>       

   
    <div>
    </div>
    </form>
</body>
</html>

Niko
Telerik team
 answered on 14 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?