Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
Does anyone have any idea how I might show the current time in a timeline view?

I'm not talking about the header. I have a client who wants to see a view of the day in timeline view with a marker showing the place in the day, like this.

I know it can't be done out of the box, but I was wondering if anyone out there had any ideas about how it might be achieved.

--
Stuart
Plamen
Telerik team
 answered on 17 Jan 2012
1 answer
39 views
Hi All,

Just a bug report with the MaxHeight setting of the combobox. If one or more items in the combobox are multiline the MaxHeight fails, as it calculates assuming one line per item.

Not majorly urgent but means you need to manually set the 'Height' setting instead of using the recommended 'MaxHeight' setting.

Cheers,
- Will
Kalina
Telerik team
 answered on 17 Jan 2012
2 answers
152 views
Hello,

I have set the height of my combo in CSS but when I check the items in the dropdown I would like the items to be vertically aligned to the top of the INPUT and to wrap. Here is the CSS I am using (which does correctly set the height but does not align or wrap the selected items.
#ctl00_Main_LeadMgt1_comboGroupSIC .rcbInput
    {
        height: 40px;
        white-space: normal !important;
        vertical-align: top !important;
    }

I also attached an image that show the selected items center aligned. If I selected one more item then the input will show "5 items checked" what I would want is for the input to wrap the 5th item and then once no more items could be displayed the "5 items checked" will display.
Thank you!
Kalina
Telerik team
 answered on 17 Jan 2012
7 answers
266 views
Hello,
I'm going to implement a grid's CardView feature and create a grid from server side. This is what I do:
MasterTableView.ItemTemplate = new CardViewItemTemplate(owner.ZSheet, owner.CardLayout);
MasterTableView.EditItemTemplate = new CardViewEditItemTemplate(owner.ZSheet, owner.CardLayout);

Each template is going to contain a custom control which is actually HtmlTable descendant which contains Label controls in ItemTemplate and editor controls like TextBox and so on in EditItemTemplate. Everything is clear with ItemTemplate but in EditItemTemplate I need to implement IBindableTemplate. Any ideas of how it should be done?
I would appreciate any sample of how CardView templates are created from codebehind.
Mira
Telerik team
 answered on 17 Jan 2012
0 answers
522 views
telerik ver = 2011.2.915.40 runtime = v4.0.30319

My user got this error "Exception of type 'System.Web.HttpUnhandledException' was thrown."
and this all the error

Stack Trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.task_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

ToString:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Telerik.Web.UI.GridGroupByExpressionCollection.get_Item(Int32 index)
at Telerik.Web.UI.GridGroupPanel.Ungroup(String index)
at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.task_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

and here my grid on the page :
<telerik:RadGrid ID="RadGridTaskPanel" runat="server" GridLines="None"
            AllowPaging="true" PageSize="50" AllowSorting="True" AutoGenerateColumns="false"
            ShowGroupPanel="false" Width="100%" OnNeedDataSource="RadGridTaskPanel_NeedDataSource"
            OnItemDataBound="RadGridTaskPanel_ItemDataBound" OnSortCommand="RadGridTaskPanel_SortCommand"
            OnGroupsChanging="RadGridTaskPanel_GroupsChanging">
            <PagerStyle Position="TopAndBottom" Mode="NumericPages" />
            <MasterTableView CellSpacing="-1">
                <EditFormSettings>
                    <PopUpSettings ScrollBars="None" />
                </EditFormSettings>
                <ExpandCollapseColumn Resizable="False" Visible="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>
                    <telerik:GridHyperLinkColumn DataTextFormatString="Details" UniqueName="ActionSelect"
                        DataTextField="FKID" DataNavigateUrlFields="URL,CurrentStep_DocApprovalStatusId"
                        DataNavigateUrlFormatString="{0}{1}" />
                    <telerik:GridBoundColumn DataField="FKId" />
                    <telerik:GridBoundColumn DataField="DaysAway" />
                    <telerik:GridBoundColumn DataField="DocType" />
                    <telerik:GridTemplateColumn HeaderText="Description" GroupByExpression="ShortDescription Group By ShortDescription" SortExpression="ShortDescription" UniqueName="DescriptionMerge">
                    <ItemTemplate>  
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="ShortDescription" />
                    <telerik:GridBoundColumn DataField="LongDescription" />
                    <telerik:GridBoundColumn DataField="CustomField1" />
                    <telerik:GridBoundColumn DataField="CustomField2" />
                    <telerik:GridBoundColumn DataField="Requestor_DisplayName" />
                    <telerik:GridBoundColumn DataField="Assigned_DisplayName" />
                    <telerik:GridBoundColumn DataField="ActionByDate" DataFormatString="{0:dd/MM/yyyy}" />
                    <telerik:GridBoundColumn DataField="RequestDate"  />
                    <telerik:GridBoundColumn DataField="CurrentStep" />
                    <telerik:GridBoundColumn DataField="CurrentStep_DocApprovalStatusId" />
                    <telerik:GridBoundColumn DataField="URL" />
                </Columns>
                <PagerStyle AlwaysVisible="True" Position="Top" />
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
        </telerik:RadGrid>

the problem are..i can't replicate it again,any help?






Didi
Top achievements
Rank 1
 asked on 17 Jan 2012
4 answers
192 views
I tried to use the UserControl in the DayTemplate. This user control has 2 buttons inside, it subscribes to these buttons click events. The question is, how the user control knows what is the date that user selecting from the event listener ()?

With below implementation, I noticed that click event in the user control is fired before the RadCalendar1 SelectedDate is modified accordingly. Please advise.

  <telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" Skin="Special"
        EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" EnableMonthYearFastNavigation="false"
        DayNameFormat="Short" ShowRowHeaders="false" OnDayRender="Calendar_OnDayRender" OnPreRender="RadCalendar1_PreRender"
        OnSelectionChanged="RadCalendar1_SelectionChanged"
        ShowOtherMonthsDays="false" OnDefaultViewChanged="RadCalendar1_DefaultViewChanged" EnableMultiSelect="false">
        <HeaderTemplate>
            <asp:Image ID="HeaderImage" runat="server" Width="757" Height="94" Style="display: block" />
        </HeaderTemplate>
        <FooterTemplate>
            <asp:Image ID="FooterImage" runat="server" Width="757" Height="70" Style="display: block" />
        </FooterTemplate>
        <SpecialDays>
            <telerik:RadCalendarDay Date="2012/01/22" Repeatable="DayAndMonth" TemplateID="BlockedTemplate" />
            <telerik:RadCalendarDay Date="2012/01/27" Repeatable="DayInMonth" TemplateID="GeneralTemplate" />
        </SpecialDays>
         
        <ClientEvents OnDayRender="OnDayRender" OnDateSelected="OnDateSelected" />
        <CalendarDayTemplates>
            <telerik:DayTemplate ID="BlockedTemplate" runat="server">
                <Content>
                    <div class="rcTemplate rcDayBirthday">
                        Blocked!
                    </div>
                </Content>
            </telerik:DayTemplate>
              <telerik:DayTemplate ID="GeneralTemplate" runat="server">
                  <Content>
                      <div class="rcTemplate rcDayMortgage">
                          Available!
                          <br />
                          <control:GeneralDayTemplate runat="server" ID="templateAMPM"/>
                      </div>
                </Content>
            </telerik:DayTemplate>
        </CalendarDayTemplates>
</telerik:RadCalendar>
  
  
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GeneralDayTemplate.ascx.cs"
    Inherits="RadWebApp.Controls.GeneralDayTemplate" %>
<asp:Button runat="server" ID="btnA" Text="A" OnClick="btnA_Click"/>
<asp:Button runat="server" ID="btnB" Text="B" OnClick="btnB_Click"/>
  
  
 public partial class GeneralDayTemplate : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
  
        protected void btnA_Click(object sender, EventArgs e)
        {
            /*I need to know which date i'm selecting here????*/
        }
  
        protected void btnB_Click(object sender, EventArgs e)
        {
        }
    }
      
 


Second Question: Is it possible to do data binding in the DayTemplate? something like below code (this code is not working though):

<telerik:DayTemplate ID="GeneralTemplate" runat="server"
                  <Content
                      <div class="rcTemplate rcDayMortgage"
                          Available! 
                          <br /> 
                          <control:GeneralDayTemplate runat="server" ID="templateAMPM" Date='<%# Bind("Date")%>'/> 
                      </div
                </Content
            </telerik:DayTemplate>
Vasil
Telerik team
 answered on 17 Jan 2012
3 answers
207 views
Hi, I have a grid and I populate its datasource in the NeedDataSource event.

I requiere to modifiy a gridhyperlink column, I need to add an onclick attribute to the link column, but when I

This is the code:

<telerik:RadGrid id="grdPase" Culture="es-MX"
         ShowStatusBar="true"
         runat="server"
         AllowPaging="true"
         AllowSorting="true" AllowNaturalSort="false"
         AutoGenerateColumns="false"
         AllowMultiRowSelection="false"
         OnItemDataBound="grdPase_ItemDataBound"
         OnPreRender="grdPase_PreRender"
         OnNeedDataSource="grdPase_NeedDataSource" >
     <MasterTableView PageSize="15" NoDetailRecordsText="Sin Informacion" NoMasterRecordsText="Sin Informacion">
         <Columns>
             <telerik:GridHyperLinkColumn
             DataTextFormatString="{0:d7}"
             UniqueName="rowno"
             DataTextField="rowno"                       
             HeaderText="Folio" >
             </telerik:GridHyperLinkColumn>

       protected void grdPase_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem _item = (GridDataItem)e.Item;
                HyperLink _link = (HyperLink)_item["rowno"].Controls[0];
                _link.Attributes["href"] = "#";
                _link.Attributes["onclick"] = String.Format("javascript:top.fnOpenWin('PopSPase','Registro de Pases','../01/e01PasePop.aspx?r={0}',true,'wndshow.png',630,550,false,true,36);return false;", _item["rowno"].Text); 
/* _item["rowno"].Text   has always a   value instead of a numeric value */
 
            }
        }
 
        protected void grdPase_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            /*here we have a lot of code for filtering, ordering the information */
             sqlPase.SelectCommand = "SELECT * FROM tbl01Pase" + strFilteringOrderingInformation;
            grdPase.DataSource = sqlPase;
        }

How can I access in the Itemdatabound event the row information?

Thanks in advance.
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Jan 2012
4 answers
127 views
Why? 
This method has introduced the use of tips but no definition
Shinu
Top achievements
Rank 2
 answered on 17 Jan 2012
3 answers
147 views

 

Hi
I have a problem with convert date in raddatepicker.
<rad:RadDatePicker ID="RadDatePicker1" runat="server"  
    DateInput-DisplayDateFormat="dd-MM-yyyy" 
    DateInput-DateFormat="dd-MM-yyyy"
</rad:RadDatePicker> 

 

When I input 1911-01-12  (12th Jan 1911), after hitting the tab key, it has translated into 01-12-1911 (1st Dec 1911).

Is there any way I can make the date picker convert the date correctly?
Thanks

Princy
Top achievements
Rank 2
 answered on 17 Jan 2012
8 answers
1.0K+ views
Hi,

I am facing a problem with the sorting of column having multiple data records with different datatypes 

My radGrid contains a template column with two fields mentioned below:- 

  Field Name                      DataType
 
  StartedOn                         DateTime
  StartTime                         String 

  <telerik:GridTemplateColumn HeaderText="Started On" ShowSortIcon="true" SortExpression="StartedOn" UniqueName="StartedOn">
 <HeaderStyle Width="175px" HorizontalAlign="Center" VerticalAlign="Middle" BorderStyle="None" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
 <ItemTemplate>
 <asp:Label ID="lblStartDate" Text='<%# ((ProductionRun) Container.DataItem).StartedOn.ToString("MM/dd/yyyy")== "01/01/0001" ? "" : ((ProductionRun) Container.DataItem).StartedOn.ToString("MM/dd/yyyy")  %>' runat="server" ></asp:Label>&nbsp;
  <asp:Label ID="lblStartTime" Text='<%# DataBinder.Eval(Container.DataItem, "StartTime")   %>' runat="server" ></asp:Label>  
  </ItemTemplate>
  </telerik:GridTemplateColumn>


The above code works fine if sorts only on StartedOn field.
I tried to modify the sort expression as  SortExpression="StartedOn,StartTime" but it is giving me error at runtime

But, the requirement is to invoke the sorting based on combination of StartedOn and StartTime.


Can anyone help me to how to accomplish this ??

Thanks In Advance

Ashwani



Radoslav
Telerik team
 answered on 17 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?