Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
421 views
Hi - I've got a table within an ItemTemplate inside a GridTemplate Column in the Columns collection of my MasterTableView.

The default behaviour of the grid appears to run each table corresponding to a vertically rather than horizontally.  How can I specificy the opposite?

The output looks like this:

11:18
1 2:18
2 2:18

14:38
2 3:20
2 5:38

15:30
2 0:52
2 6:30

I want it to look like this:

 11:18                          14:38                   15:30
1 2:18                        2  3:20                 2  3:20
2 2:18                        2  5:38                 2  6:30

Here is the code:
                                <telerik:RadGrid id="CheckPointsGrid"
                                    OnNeedDataSource="CheckPointsGrid_NeedDataSource"  
                                    runat="server"
                                    EnableEmbeddedSkins="false"                                
                                    AutoGenerateColumns="false"
                                    HierarchyDefaultExpanded="true"
                                    CommandItemDisplay="None"
                                    Width="100%"
                                    AllowPaging="false"
                                    AllowFilteringByColumn="false">
                                    <MasterTableView AutoGenerateColumns="false"
                                        DataKeyNames="checkpointid"
                                        CommandItemDisplay="None"
                                        ShowHeader="false">

                                        <Columns>
                                            <telerik:GridTemplateColumn>
                                                <ItemTemplate>
                                                    <table cellpadding="0" cellspacing="0" width="42"; style="text-align: right">     
                                                            <tr>
                                                                <td><%# Eval("out")%></td>
                                                            </tr>
                                                            <tr>
                                                                <td><%# Eval("splitplacement")%> <%# Eval("split")%></td>
                                                            </tr>
                                                            <tr>
                                                                <td><%# Eval("overallplacement")%> <%# Eval("overall")%></td>
                                                            </tr>
                                                    </table>                                                
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>

Thanks!!
Dimo
Telerik team
 answered on 12 Jun 2009
1 answer
219 views
Hello Telerik,

I am having design issues. I paste the code below.
Sample.Aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sample.aspx.cs" Inherits="Sample" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!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>CRM</title> 
    <link href="CSS/crmstyles.css" rel="stylesheet" type="text/css" /> 
    <link href="Telerik/RadSplitter/SampleSpliter/Splitter.SampleSpliter.css" rel="stylesheet" 
        type="text/css" /> 
</head> 
<body> 
    <form runat="server" id="frmCRM" style="height: 100%"
    <div id="wrapper"
        <telerik:RadAjaxManager runat="server" ID="ajax_manager"
        </telerik:RadAjaxManager> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>" 
                SelectCommand="SELECT [ID], [EmpName] FROM [Employee]"></asp:SqlDataSource> 
        <div id="content"
            <telerik:RadSplitter ID="Splitter_main" runat="server" LiveResize="true" ResizeMode="AdjacentPane" 
                Width="100%" Height="100%" Orientation="Horizontal" Skin="SampleSpliter" EnableEmbeddedSkins="false" 
                ResizeWithBrowserWindow="true" ResizeWithParentPane="true" SplitBarsSize="20" 
                BorderSize="0" BorderStyle="None" BorderWidth="0px" FullScreenMode="false"
                <telerik:RadPane ID="Pane_top" Scrolling="None" runat="server" Width="100%" Height="10%" 
                    BackColor="#A6DBFF" BorderWidth="0px" BorderStyle="none" EnableEmbeddedBaseStylesheet="False"
                    <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="SqlDataSource1" 
                            FrameDuration="1" Height="40px"  RotatorType="ButtonsOver" 
                            ScrollDirection="Left,Right" Skin="Vista" Width="160" > 
                            <%--OnItemClick="UpdateScheduler" ondatabinding="RadRotator1_DataBinding" ondatabound="RadRotator1_DataBound" >--%> 
                            <ItemTemplate> 
                                <div> 
                                    <asp:Image ID="Emp_image" runat="server" Height="40px" ImageUrl='<%# String.Format("~/Img/{0}.jpg", DataBinder.Eval(Container.DataItem, "ID")) %>' 
                                    AlternateText='<%# DataBinder.Eval(Container.DataItem, "ID")%>'  
                                        ToolTip='<%# DataBinder.Eval(Container.DataItem, "EmpName")%>' Width="40px" /> 
                                         
                                        </div> 
                            </ItemTemplate> 
                        </telerik:RadRotator> 
                </telerik:RadPane> 
                <telerik:RadSplitBar ID="Splitbar_top" runat="server" CollapseMode="Forward" Width="100%" /> 
                <telerik:RadPane ID="Pane_bottom" Scrolling="None" runat="server" Width="100%" Height="90%" 
                    BackColor="#ff0000" BorderWidth="0px" BorderStyle="none" EnableEmbeddedBaseStylesheet="False"
                    <telerik:RadSplitter ID="Splitter_bottom" runat="server" LiveResize="true" ResizeMode="AdjacentPane" 
                        Width="100%" Orientation="Vertical" Skin="SampleSpliter" EnableEmbeddedSkins="false" 
                        ResizeWithBrowserWindow="true" ResizeWithParentPane="true" SplitBarsSize="20" 
                        BorderSize="0" BorderStyle="None" BorderWidth="0px"
                        <telerik:RadPane ID="Pane_contacts" Scrolling="None" runat="server" Width="16%" Height="100%" 
                            BorderWidth="0px" BorderStyle="none" EnableEmbeddedBaseStylesheet="False"
                        </telerik:RadPane> 
                        <telerik:RadSplitBar ID="SplitBar_contacts" runat="server" CollapseMode="Both" Width="20px" 
                            Height="100%" /> 
                        <telerik:RadPane ID="Pane_today" Scrolling="None" runat="server" Width="26%" Height="100%" 
                            BorderWidth="0px" BorderStyle="none" EnableEmbeddedBaseStylesheet="False"
                             
                             
 
                             
                        </telerik:RadPane> 
                        <telerik:RadSplitBar ID="SplitBar_Today" runat="server" CollapseMode="Both" Width="20px" 
                            Height="100%" /> 
                        <telerik:RadPane ID="Pane_Scheduler" Scrolling="None" runat="server" Width="58%" Height="100%" 
                            BorderWidth="0px" BorderStyle="none" EnableEmbeddedBaseStylesheet="False"
                             
                            <telerik:RadPanelBar ID="PanelBar_Scheduler" runat="server" ExpandMode="FullExpandedItem" 
                        Height="100%" Skin="Vista" Width="100%"
                        <CollapseAnimation Type="InOutQuint" /> 
                        <Items> 
                            <telerik:RadPanelItem Expanded="True" ImageUrl="Img/schedule.png" 
                                Text="Scheduler"
                                <Items> 
                                    <telerik:RadPanelItem runat="server" Height="100%" Value="WeekScheduler" > 
                                        <ItemTemplate> 
                                         
                                         
                                          <telerik:RadSplitter ID="Splitter_Scheduler" runat="server" Height ="100%" Width="100%" LiveResize="true" ResizeMode="AdjacentPane" 
                                Orientation="Horizontal" Skin="SBM_Spliter" EnableEmbeddedSkins="false" 
                                ResizeWithBrowserWindow="true" SplitBarsSize="20" 
                                BorderSize="0" BorderStyle="None" BorderWidth="0px"
                                              <telerik:RadPane ID="Pane_calender" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedScripts="false" Height="10%"
                                                  <telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Arial, Verdana, Tahoma" 
                                                      ForeColor="Black" Style="border-color: #ececec" Height="10%"
                                                  </telerik:RadCalendar> 
                                              </telerik:RadPane> 
                                               
                                              <telerik:RadPane ID="Pane_WeekScheduler" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedScripts="false"
                                               
                                                  <telerik:RadScheduler ID="RadScheduler1" runat="server" DataKeyField="ID" DataStartField="Start" 
                DataSubjectField="Subject" DataEndField="End" Skin="Vista" Height="80%"
                                                  </telerik:RadScheduler> 
                                                   
                                              </telerik:RadPane> 
                                 
                                </telerik:RadSplitter>   
                                         
                                       </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                        </Items> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="ToDo's"
                                <Items> 
                                    <telerik:RadPanelItem runat="server" Value="Todo"
                                        <ItemTemplate> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                        </Items> 
                        <ExpandAnimation Type="None" /> 
                    </telerik:RadPanelBar> 
                                         
                             
                             
                                 
                             
                        </telerik:RadPane> 
                        <%--<telerik:RadSplitBar ID="RadSplitBar4" runat="server" CollapseMode="Forward" Width="20px" 
                            Height="100%" />--%> 
                    </telerik:RadSplitter> 
                </telerik:RadPane> 
            </telerik:RadSplitter></div
        <div id="footer"
        </div> 
    </div> 
    </form> 
</body> 
</html> 

In the Above Code, all looks fine till i have just Panelbar(ID="PanelBar_Scheduler") & its item templates.

 Now I want to divide rightmost Pane(ID="Pane_Scheduler") into 2 subpanes (top(ID="Pane_calender") & bottom(ID="Pane_WeekScheduler")), so i put a splitter(ID="Splitter_Scheduler").
I want to set Heights of these 2 panes in %age (Top-30%, Bottom -70%). So when i tried that it shows a message popup
"Stop Running this script
A script running on this page is causing internet explorer to run slowly. If it continues to run, your computer may become unresponsive. 
Yes          No
"
So i removed it so error do not pop up. But when i put Calender and Scheduler. The design behaved very Weirdly. The Scheduler is running out of the pane. I can't figure out where the problem is.
I want that the calender & scheduler both fits in RadPane(ID="Pane_Scheduler") i.e. Between PanelBaritems(Text="Scheduler"Text="ToDo's").

I am Binding Scheduler in Code behind. Code below.
Sample.Aspx.CS

using System; 
using System.Collections; 
using System.Configuration; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.HtmlControls; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Xml.Linq; 
using Telerik.Web.UI; 
using System.Web.Configuration; 
using System.Data.SqlClient; 
using System.Collections.Specialized; 
 
public partial class Sample : System.Web.UI.Page 
    string connectionString = WebConfigurationManager.ConnectionStrings["SchedulerConnectionString"].ConnectionString; 
     
    protected void Page_Load(object sender, EventArgs e) 
    { 
        RadScheduler RadScheduler1 = (RadScheduler)PanelBar_Scheduler.FindItemByValue("WeekScheduler").FindControl("RadScheduler1"); 
        RadScheduler1.ResourceTypes.Clear(); 
        string selectSQL = "Select * from Appointments"
        SqlDataSource EmployeeSource = new SqlDataSource(connectionString, selectSQL); 
        SqlDataSource EmployeeSource1 = new SqlDataSource(connectionString, selectSQL); 
        selectSQL = "Select * from Employee"
        SqlDataSource Empl = new SqlDataSource(connectionString, selectSQL); 
        Empl.ID = "Employees"
        selectSQL = "Select * from Resource"
        SqlDataSource rsrc = new SqlDataSource(connectionString, selectSQL); 
        rsrc.ID = "Resources"
        RadScheduler1.DataSourceID = null
        ResourceType radschedemp = new ResourceType(); 
        radschedemp.ForeignKeyField = "Emp_ID"
        radschedemp.TextField = "EmpName"
        radschedemp.Name = "Employee1"
        radschedemp.DataSource = Empl; 
        radschedemp.KeyField = "ID"
        ResourceType radschedres = new ResourceType(); 
        radschedres.ForeignKeyField = "Resource_ID"
        radschedres.TextField = "ResourceName"
        radschedres.Name = "Resource1"
        radschedres.DataSource = rsrc; 
        radschedres.KeyField = "ID"
        RadScheduler1.ResourceTypes.Add(radschedemp); 
        RadScheduler1.ResourceTypes.Add(radschedres); 
        RadScheduler1.DataStartField = "StartDate"
        RadScheduler1.DataSubjectField = "Subject"
        RadScheduler1.DataKeyField = "ID"
        RadScheduler1.DataEndField = "EndDate"
        RadScheduler1.GroupBy = "Date,Employee1"
        RadScheduler1.DataSource = EmployeeSource; 
        RadScheduler1.DataBind(); 
    } 
 
    class InlineInsertTemplate : IBindableTemplate 
    { 
        private TextBox _textBox; 
        private TextBox _textBox1; 
 
        public void InstantiateIn(Control container) 
        { 
            _textBox = new TextBox(); 
            //_textBox.TextMode = TextBoxMode.MultiLine; 
            _textBox.Width = Unit.Percentage(10); 
            _textBox.BorderStyle = BorderStyle.Groove; 
 
            container.Controls.Add(_textBox); 
 
            _textBox1 = new TextBox(); 
            //_textBox1.TextMode = TextBoxMode.MultiLine; 
            _textBox1.Width = Unit.Percentage(10); 
            _textBox1.BorderStyle = BorderStyle.Groove; 
 
            container.Controls.Add(_textBox1); 
 
            LinkButton insertButton = new LinkButton(); 
            insertButton.Text = "Insert"
            insertButton.CommandName = "Insert"
 
            container.Controls.Add(insertButton); 
 
            LinkButton cancelButton = new LinkButton(); 
            cancelButton.Text = "Cancel"
            cancelButton.CommandName = "Cancel"
 
            container.Controls.Add(cancelButton); 
 
 
        } 
 
        public IOrderedDictionary ExtractValues(Control container) 
        { 
            IOrderedDictionary result = new OrderedDictionary(); 
 
            result.Add("Subject", _textBox.Text); 
            result.Add("EmpName", _textBox1.Text); 
 
            return result; 
        } 
    } 
 
    protected override void OnInit(EventArgs e) 
    { 
        base.OnInit(e); 
        RadScheduler RadScheduler1 = (RadScheduler)PanelBar_Scheduler.FindItemByValue("WeekScheduler").FindControl("RadScheduler1"); 
        RadScheduler1.InlineInsertTemplate = new InlineInsertTemplate(); 
    } 
     
     
 
    protected void UpdateScheduler(object sender, Telerik.Web.UI.RadRotatorEventArgs e) 
    { 
        RadScheduler RadScheduler1 = (RadScheduler)PanelBar_Scheduler.FindItemByValue("WeekScheduler").FindControl("RadScheduler1"); 
        RadScheduler1.ResourceTypes.Clear(); 
        if (e.Item.BorderStyle == BorderStyle.Groove) 
        { 
            e.Item.BorderStyle = BorderStyle.None; 
            e.Item.BorderColor = System.Drawing.Color.White; 
        } 
        else 
        { 
            e.Item.BorderStyle = BorderStyle.Groove; 
            e.Item.BorderColor = System.Drawing.Color.Red; 
        } 
 
        string selectSQL = "Select * from Appointments Where Emp_ID =" + ((e.Item.Index) + 1); 
        SqlDataSource EmployeeSource = new SqlDataSource(connectionString, selectSQL); 
        SqlDataSource EmployeeSource1 = new SqlDataSource(connectionString, selectSQL); 
        selectSQL = "Select * from Employee Where ID = " + ((e.Item.Index) + 1); 
        SqlDataSource Empl = new SqlDataSource(connectionString, selectSQL); 
        Empl.ID = "Employees"
        selectSQL = "Select * from Resource"
        SqlDataSource rsrc = new SqlDataSource(connectionString, selectSQL); 
        rsrc.ID = "Resources"
        RadScheduler1.DataSourceID = null
        ResourceType radschedemp = new ResourceType(); 
        radschedemp.ForeignKeyField = "Emp_ID"
        radschedemp.TextField = "EmpName"
        radschedemp.Name = "Employee1"
        radschedemp.DataSource = Empl; 
        radschedemp.KeyField = "ID"
        ResourceType radschedres = new ResourceType(); 
        radschedres.ForeignKeyField = "Resource_ID"
        radschedres.TextField = "ResourceName"
        radschedres.Name = "Resource1"
        radschedres.DataSource = rsrc; 
        radschedres.KeyField = "ID"
        RadScheduler1.ResourceTypes.Add(radschedemp); 
        RadScheduler1.ResourceTypes.Add(radschedres); 
        RadScheduler1.DataStartField = "StartDate"
        RadScheduler1.DataSubjectField = "Subject"
        RadScheduler1.DataKeyField = "ID"
        RadScheduler1.DataEndField = "EndDate"
        RadScheduler1.GroupBy = "Date,Employee1"
        RadScheduler1.DataSource = EmployeeSource; 
        RadScheduler1.DataBind(); 
    } 
 
 


Please Help me, I am badly stuck here.

Thank You,
Chinmay Sharma.


Svetlina Anati
Telerik team
 answered on 12 Jun 2009
1 answer
98 views
Greetings,

I've been having trouble loading the RadEditor (Telerik.Web.UI.RadEditor) into Visual Studio .Net 2008.  I followed the steps provided under RadEditor - Getting Started.

http://www.telerik.com/help/aspnet-ajax/gettingstarted.html

That is, I created the project and then added the two folders specified:
    App_Data\RadSpell
    App_GlobalResources

In these folders I placed the appropriate files from the Telerik Program Files directory.  I then placed a RadEditor control on my AJAX-enabled web page.  However, I get the following message in the middle of the control:

        -------------------------------------------------------------------------------------------------------------------
        The Tools collection of this RadEditor is empty

        If the Tools collection is empty, RadEditor will automatically load its Default tools at runtime, 
        or if the ToolsFile property was set, RadEditor will load information from that file instead.
        -------------------------------------------------------------------------------------------------------------------

Can someone help me with this ??

Thanks in advance!

Rumen
Telerik team
 answered on 12 Jun 2009
1 answer
103 views
I have a RadGrid that gets it's datasource set to an ObjectList (not a sqldatasource).  Paging & Editing are allowed.  I need to be able to select rows on more than 1 page then click a button to put all selected rows into edit mode at once.  I'm using a GridClientSelectColumn (checkbox) to selected rows.  How can this be accomplished?

Any help is appreciated.

Thanks,
Rob
Princy
Top achievements
Rank 2
 answered on 12 Jun 2009
1 answer
110 views
This is not so much a help question, it's more of a general development query. I've noticed the AJAX editor loads 2149873971239472934 times faster than the classic editor - what fundamental changes did you make to make this happen? Are you using a single CSS sprite instead of multiple images? Gzip compression?
Tervel
Telerik team
 answered on 12 Jun 2009
3 answers
132 views
Hi,

Currently i am using WatiN to perform automated test against my ASP.NET web app. Telerik RadAjax control is used to help me perform Ajax Request between client side and server side.

Currently when i simulate the search button click on the client side, to retrieve the table result from the server and populate back at the client using RadGrid, WatiN process my test code line synchronously, so it won't see the result, as the Ajax Call is asynchronous.

I have encountered this page : http://pushpontech.blogspot.com/2008/04/ajax-issues-with-watin.html . and it's almost answering my issue, by checking whether the page is in asynchronous postback mode or not.

May i know how to perform the same checking using RadAjax, because it seems that i cannot find the correct API in the Client-Side API of RadAjax.

Thanks very much for all your help.

hadi teo
Gururaj
Top achievements
Rank 1
 answered on 12 Jun 2009
1 answer
108 views
Can the RadFormDecorator be made to round the corners of the RadDatePicker textbox?
Tervel
Telerik team
 answered on 12 Jun 2009
5 answers
181 views
Hello.

I have successfully developed and deployed a SharePoint WebPart containing a RADEditor. It works fine on my test set up.
Today I deployed the solution to another server, and now it suddently dosn't work anymore.

The RADEditor is displayed fine with buttons (Bold, Italic and Underline is all I have). Unfortunately the content area (editable iFrame) does not seem to be properly initialized. I can't type anything into it. The HTML source dosn't contain an iFrame element either.

What could be wrong? I deployed both Telerik.Web.UI.dll and the Telerik.Web.Design.dll to the server's GAC, and added SafeControl entries to the web.config file. The version installed is 2009.1.402.35.

<

SafeControl Assembly="Telerik.Web.UI, Version=2009.1.402.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" />

 

<

SafeControl Assembly="Telerik.Web.Design, Version=2009.1.402.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.Design" TypeName="*" Safe="True" />

 


The SafeControls displayed above, gives me a working set up on one of my servers.

Any suggestions are much appriciated. Thanks :)

Regards
Jimmy Thomsen
Jimmy
Top achievements
Rank 1
 answered on 12 Jun 2009
1 answer
110 views
Hi All,

How to filter programmally using gridfilterexpression (funtion) etc. ? I can not find example.

thanks

Jerry
Shinu
Top achievements
Rank 2
 answered on 12 Jun 2009
1 answer
86 views
Is it possible to do a custom layout on the popup form (when a user edits from a grid)
the demo example shows fields in straight columns.  I'd like to be able to move the fields around on the pop form. for example, have three fields side by side.  Maybe draw boxes around a group of fields etc.
thanks.
Princy
Top achievements
Rank 2
 answered on 12 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?