Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
236 views
Hi,

My RadDateTimePicker control is working well, except that when a user enters 31/12/2009 00:00:00 as a date, the client side validation is being triggered. I would like to get rid of this as a user should be able to enter 00:00:00 as a time in my web application.

Thanks,
John
Mira
Telerik team
 answered on 24 Jul 2009
1 answer
161 views
I upgraded to the Q2 2009 controls and now the height of the RadGrid does not appear to work correctly when the RadGrid is inside a RadSplitter. The grid height should be 100%. This works with the Q1 2009 controls, but not the Q2 2009 controls. Here is a simple example:

Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> 
 
<!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></title>  
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> 
    <style type="text/css">  
        html,  
        body,  
        form  
        {  
            margin: 0;  
            height: 100%;  
            border: 0;  
            padding: 0;  
            overflow: hidden;  
        }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    </telerik:RadAjaxManager> 
   
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Outlook">  
    </telerik:RadSkinManager> 
    <div> 
 
 
<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" Width="100%" Height="100%" BorderSize="0">  
    <telerik:RadPane ID="Toolbar" runat="server" SkinID="TabToolBarPane">  
    </telerik:RadPane> 
    <telerik:RadPane ID="InvoiceListRadPane" runat="server" Scrolling="Both" BorderStyle="None" style="border: 0 0 0 0;">  
        <telerik:RadGrid ID="InvoiceGrid" runat="server" AllowSorting="true" AllowPaging="true" PageSize="25" PagerStyle-AlwaysVisible="true" EnableViewState="false" AllowMultiRowSelection="true" style="border:0; outline:none" Width="100%" Height="100%">  
            <MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" TableLayout="Auto" AutoGenerateColumns="false" EnableViewState="false">  
                <NoRecordsTemplate> 
                    No records to display.  
                </NoRecordsTemplate> 
                <Columns> 
                    <telerik:GridClientSelectColumn HeaderStyle-Width="30px" /> 
                    <telerik:GridBoundColumn UniqueName="InvoiceDate" SortExpression="InvoiceDate" HeaderText="Invoice Date" DataField="InvoiceDate" DataFormatString="{0:d}">  
                        <HeaderStyle Width="95px"></HeaderStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="DueDate" SortExpression="DueDate" HeaderText="Due Date" DataField="DueDate" DataFormatString="{0:d}">  
                        <HeaderStyle Width="85px"></HeaderStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="InvoiceNumber" SortExpression="InvoiceNumber" HeaderText="Invoice #" DataField="InvoiceNumber">  
                        <HeaderStyle Width="85px"></HeaderStyle> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="AccountName" SortExpression="AccountName" HeaderText="Account Name" DataField="AccountName">  
                        <HeaderStyle /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="TotalAmountDue" SortExpression="TotalAmountDue" HeaderText="Invoice Total" DataField="TotalAmountDue" DataFormatString="{0:C2}">  
                        <HeaderStyle Width="105px" HorizontalAlign="Right" /> 
                        <ItemStyle HorizontalAlign="Right" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="AmountOwed" SortExpression="AmountOwed" HeaderText="Balance Due" DataField="AmountOwed" DataFormatString="{0:C2}">  
                        <HeaderStyle Width="100px" HorizontalAlign="Right" /> 
                        <ItemStyle HorizontalAlign="Right" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="DateCreated" SortExpression="DateCreated" HeaderText="Created" DataField="DateCreated" DataFormatString="{0:d}">  
                        <HeaderStyle Width="68px"></HeaderStyle> 
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowDragToGroup="False" AllowGroupExpandCollapse="true" EnablePostBackOnRowClick="false">  
                <Selecting AllowRowSelect="True" /> 
                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
        <asp:HiddenField ID="FilterValue" runat="server" /> 
    </telerik:RadPane> 
    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Backward" /> 
    <telerik:RadPane ID="InvoicePreviewRadPane" runat="server" Scrolling="Y">  
    </telerik:RadPane> 
</telerik:RadSplitter>   
 
 
 
    </div> 
    </form> 
</body> 
</html> 
 

Default.aspx.cs:

using System;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Collections.Generic;  
using System.Data;  
using System.Configuration;  
using System.Web.Security;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using Telerik.Web.UI;  
 
public partial class Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        List<Invoice> ds = new List<Invoice>();  
        ds.Add(new Invoice(Guid.NewGuid(), DateTime.Now, DateTime.Now, "12345""John Doe", 123.45M, 123.45M, DateTime.Now));  
 
        InvoiceGrid.DataSource = ds;  
        InvoiceGrid.DataBind();  
    }  
}  
 
public class Invoice  
{  
    private Guid id;  
    private DateTime invoiceDate;  
    private DateTime dueDate;  
    private string invoiceNumber;  
    private string accountName;  
    private decimal totalAmountDue;  
    private decimal amountOwed;  
    private DateTime dateCreated;  
 
    public Invoice(Guid id, DateTime invDate, DateTime dueDate, string invNo, string acctName, decimal total, decimal owed, DateTime created)  
    {  
        InvoiceDate = invDate;  
        DueDate = dueDate;  
        InvoiceNumber = invNo;  
        AccountName = acctName;  
        TotalAmountDue = total;  
        AmountOwed = owed;  
        DateCreated = created;  
    }  
 
    public Guid Id  
    {  
        get { return id; }  
        set { id = value; }  
    }  
 
    public DateTime InvoiceDate  
    {  
        get { return invoiceDate; }  
        set { invoiceDate = value; }  
    }  
 
    public DateTime DueDate  
    {  
        get { return dueDate; }  
        set { dueDate = value; }  
    }  
 
    public string InvoiceNumber  
    {  
        get { return invoiceNumber; }  
        set { invoiceNumber = value; }  
    }  
 
    public string AccountName  
    {  
        get { return accountName; }  
        set { accountName = value; }  
    }  
 
    public decimal TotalAmountDue  
    {  
        get { return totalAmountDue; }  
        set { totalAmountDue = value; }  
    }  
 
    public decimal AmountOwed  
    {  
        get { return amountOwed; }  
        set { amountOwed = value; }  
    }  
 
    public DateTime DateCreated  
    {  
        get { return dateCreated; }  
        set { dateCreated = value; }  
    }  
Dimo
Telerik team
 answered on 24 Jul 2009
1 answer
56 views
We having a huge problem. The alternative item background gets cut off. Please look at the image:

http://i839.photobucket.com/albums/zz316/dev2009_2009/grid_alter_item_is_cut_off.jpg

Thanks for your help
Dimo
Telerik team
 answered on 24 Jul 2009
3 answers
86 views
Hello,

In my page there is a text box where user's can search for different organizations in the company. I want them to be able to hit enter and have the SearchButton's onclick event to be fired. Currently when they hit enter, the first button in the code has its onclick event fired, which is not what I want to happen.

When I enter text into the textbox and press enter, the page fails with a javascript error: "Microsoft JScript runtime error: 'null' is null or not an object", and the following code is highlighted: Button1.click(); Also, when I hover over Button1, the little window that displays the value shows null. I'm not sure why this control is null. Any ideas on what could be causing this behavior would be appreciated.

Here is the code I am using to make this happen:

protected void Page_Load(object sender, EventArgs e)  
    {  
        this.TextBox1.Attributes.Add("onkeypress","button_click()");  
    } 

function button_click() {  
                     if (window.event.keyCode == 13) {  
                         var Button1 = $find("<%= Button1.ClientID %>");  
                         Button1.click();  
                         window.event.cancel = true;  
                     }  
                 } 

<asp:Button ID="Button1" runat="server"   
                Text="Search" Width="70px" onclick="Button1_Click" /> 
Casey
Top achievements
Rank 1
 answered on 24 Jul 2009
0 answers
81 views
Dear Sir/madam,


I have an javascript array of items. and I want that when a user type text in combobox all the  matching items 
from this array will bind.  I don't want to go server side.

But  when i press a key it's working fine but again when i press another key then previous text is being cleared.
means only one char is showing is combox ....


Please solve this issue.... I will wait of your kind response..


THanks
Brijendra pandey

Teckinfo Solns Pvt. Ltd.
Brijendra Kumar
Top achievements
Rank 1
 asked on 24 Jul 2009
1 answer
85 views
2009.2.720.35  VS2008 SP1, XP x32, IE8.
It renders fine in IE8 compatibility mode.
In regular IE8 mode, the top 3 window does not render.

 
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="_Default" %> 
<%@ register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %> 
 
<!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></title
    <style type="text/css"
        #RadDockZone1 {    
            padding:2px !important;    
        }   
    </style> 
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:scriptmanager id="ScriptManager" runat="server" /> 
 
    <telerik:raddocklayout runat="server" id="RadDockLayout1" 
            onsavedocklayout="RadDockLayout1_SaveDockLayout" 
            onloaddocklayout="RadDockLayout1_LoadDockLayout"
            <telerik:raddockzone runat="server" id="RadDockZone1" width="300" MinHeight="500" style="float:left;margin-right:15px;background: #f5f4e8;"
                <telerik:RadDock ID="raddock1" Resizable="true" runat="server" Text="My Links" CollapseText="My Links" > 
                <ContentTemplate> 
                <iframe width="250px" scrolling="no" height="200px" src="http://www.telerik.com"></iframe> 
                </ContentTemplate> 
                </telerik:RadDock> 
                <telerik:RadDock ID="raddock4" Resizable="true" runat="server" Text="My Links" CollapseText="My Links" > 
                <ContentTemplate> 
                <iframe width="250px" scrolling="no" height="200px" src="http://www.telerik.com"></iframe> 
                </ContentTemplate> 
                </telerik:RadDock>               
            </telerik:raddockzone> 
             
            <telerik:raddockzone runat="server" id="RadDockZone2" width="300" MinHeight="500" style="background: #d5f0fa;float:left;"
                <telerik:RadDock ID="RadDock2" Resizable="true" runat="server" Text="My Links" CollapseText="My Links" > 
                <ContentTemplate> 
                <iframe width="250px" scrolling="no" height="200px" src="http://www.telerik.com"></iframe> 
                </ContentTemplate> 
                </telerik:RadDock>           
            </telerik:raddockzone> 
 
            <telerik:raddockzone runat="server" id="RadDockZone4" width="300" MinHeight="500" style="background: #d5f0fa;float:left;">   
            </telerik:raddockzone>           
             
            <telerik:raddockzone runat="server" id="RadDockZone3" width="1200" MinHeight="500" style="background: #d5f0fa;float:none;"
                <telerik:RadDock ID="RadDock3" Resizable="true" runat="server" Text="My Links" CollapseText="My Links" > 
                <ContentTemplate> 
                <iframe width="100%"  height="300px" src="http://www.telerik.com"></iframe> 
                </ContentTemplate> 
                </telerik:RadDock>               
            </telerik:raddockzone>   
                     
            <div style="display:none"
                Hidden UpdatePanel, which is used to receive the new dock controls.  
                We will move them with script to the desired initial dock zone. 
                <asp:updatepanel runat="server" id="UpdatePanel1"
                    <triggers> 
                         
                    </triggers> 
                </asp:updatepanel> 
            </div> 
        </telerik:raddocklayout> 
    </form> 
</body> 
</html> 
 

Jim
Top achievements
Rank 1
 answered on 24 Jul 2009
5 answers
125 views
Hello All,

I have implemented a radgrid programmatically.
This means that the control itslef is present on the page, but I build the Grid reports dynamically in the code behind.
I've also implemented an ability to drill down on  specific report row data, by adding imagecolumn and linking it to a javascript that calls another report with parameters.
Now I want my users to have the ability to go back to the previous report (pre drill down) by clicking the browser back button. As my report utilize Ajax, this is not straightforward.
I'm trying to understand how to use the UpdateHistroy NikHill control recommended by Telerik, but with out luck. The example provided with this control is very simple and not resembling my situation.
Can anyone help with this matter?

Regards,
Tzach

Nikolay Rusev
Telerik team
 answered on 24 Jul 2009
1 answer
81 views
Hi all,
I am practicing with rad Control, and I had a problem in the "Client-side programming" Chapter
Detail:
<body>
    <script type = "text/javascript">
        function myFunction()
       {    
             var ajaxManager = <%=RadAjaxManager1.ClientID%>;      <--- problem is right here
            ajaxManager.ajaxRequest();
       }
    </script>
    ......
</body>

And I got a problem:
"Control 'RadAjaxManager1SU' of type 'UpdatePanel' must be placed inside a form tag with runat=server."

I followed the instruction in RadAjaxCourseWare.pdf
Please give me some advises!

Thanks!
Huy TRAN
Sebastian
Telerik team
 answered on 24 Jul 2009
4 answers
370 views
Hey again, im having problems alligning rows and headers in the radgrid. I have tried following what other people have done to fix this but nothing seems to change the outcome. I did have the horizontal scroll bar appearing but i got rid of that expecting the alignment to fix.

I am using Static headers, and i am running this in IE (as it will be mainly used in IE), it is contained in a table and it has its layout set as "fixed".

Image:
http://x-volt.com/pics/telerik-error.PNG

Here is the code:

<table class="TableOuter" id="Table1" style="table-layout:fixed" cellspacing="0" cellpadding="0" border="0">
<colgroup>
<col class="display" />
<col class="display" />
</colgroup>
<tr>
<td valign="top" align="left" style="width:100%;">
<telerik:RadTabStrip ID="TC" runat="server" Skin="Web20" MultiPageID="MP" SelectedIndex="0" Width="100%" CSSClass="tabStrip" meta:resourcekey="TCResource1" CausesValidation="False">
<Tabs>
<telerik:RadTab Text="Chart" meta:resourcekey="RadTabResource1" />
<telerik:RadTab Text="Data" meta:resourcekey="RadTabResource2" />
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="MP" runat="server" CssClass="tabMultiPage" meta:resourcekey="MPResource1" SelectedIndex="0" >
<telerik:RadPageView ID="T1" runat="server" height="518px" width="97%" Selected="True" meta:resourcekey="T1Resource1">
<div style="text-align:center">
<asp:label id="lblNoGraphData" runat="server" cssclass="Warning" Text="There is no data to view for these dates." meta:resourcekey="lblNoGraphDataResource1" />
</div>
<c1webchart:c1webchart id="WebChart" runat="server" imagetransfermethod="File" Height="500px" Width="675px" meta:resourcekey="WebChartResource1">
</c1webchart:c1webchart>
</telerik:RadPageView>
<telerik:RadPageView ID="T2" runat="server" height="518px" width="100%" meta:resourcekey="T2Resource1" >
<asp:label id="lblNoData" runat="server" cssclass="DataGridInfoText" Text="There is no data to view for these dates." meta:resourcekey="lblNoDataResource1" />

<!- -----------------------TELERIK GRID START----------------------- -->
<telerik:RadGrid runat="server" Skin="Office2007" ID="uxTelerikGrid" Width="100%" style="overflow:hidden" AutoGenerateColumns="true" EnableViewState="false" AllowPaging="false" ShowStatusBar="true" ShowFooter="False" HeaderStyle-Width="70px" Height="100%" HeaderStyle-Wrap="false">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />
</ClientSettings>
<ExportSettings IgnorePaging="True" OpenInNewWindow="True" ExportOnlyData="true">
<Pdf AllowCopy="True" AllowModify="True" Author="999" Keywords="None" PageBottomMargin="15mm" PageLeftMargin="15mm"  PageRightMargin="15mm" PageTopMargin="15mm" PageTitle="Contract Analysis Graph" Subject="Contract Analysis Graph" Title="Contract Analysis Graph" PaperSize="A4" PageHeight="297mm" PageWidth="210mm" />
</ExportSettings>
<MasterTableView CommandItemDisplay="Bottom" Width="97%">
<CommandItemStyle Height="10px" />
<CommandItemTemplate>
<div style="padding:3px 0px">
<asp:LinkButton ID="uxExportCSV" runat="server" CausesValidation="False" CommandName="ExportToCsv" meta:resourcekey="uxExportCSVResource">
<img style="border: 0px; vertical-align:middle" alt="Export as CSV" title="Export as CSV" src="Images/Export_CSV.png" />
</asp:LinkButton>
<asp:LinkButton ID="uxExportXLS" runat="server" CausesValidation="False" CommandName="ExportToExcel" meta:resourcekey="uxExportXLSResource">
<img style="border: 0px; vertical-align:middle" alt="Export as Excel" title="Export as Excel" src="Images/Export_XLS.jpg" />
</asp:LinkButton>
<asp:LinkButton ID="uxExportPDF" runat="server" CausesValidation="False" CommandName="ExportToPdf" meta:resourcekey="uxExportPDFResource">
<img style="border: 0px; vertical-align:middle" alt="Export as PDF" title="Export as PDF" src="Images/Export_PDF_16.gif" />
</asp:LinkButton>
</div>
</CommandItemTemplate>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPageView>
</telerik:RadMultiPage>
</td>
</tr>


Any help would be great!


Dimo
Telerik team
 answered on 24 Jul 2009
2 answers
161 views
Hi,

I have a RAD grid with template columns, with in template columns i have two numeric textbox. On Client side i have to give input to one numeric textbox and set some calculation in another numeric textbox..
Pls help me as soon as possible. 
Nirmal
Top achievements
Rank 1
 answered on 24 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?