Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
264 views
Hi all,

I would like to show events for more than one day in timeline view with horizontal time slots.
I found a solution to show multiple days in timeline view from the following link:
http://www.telerik.com/support/code-library/view-with-custom-date-range-and-swipe-support

But, time slots are showing in vertically. I want to show horizontally.
Time slots for two days are showing in my scheduler timeline, but events are not showing.
Telerik is not supporting this feature or any way to do it.

I attached image of my scheduler timeline with two days.

Thanks,
Lin
Lin
Top achievements
Rank 1
 asked on 25 Jul 2017
0 answers
110 views

Hi,

I am trying to add a custom filter option under default filter, in my grid there are two columns will use default filter, and others will be under FilterTemplate

1. newly added custom filter option called "Large Losses" will be added to both of columns filter. I donot want. (I used js to invisible the one). 

2. my Large Losses custom option is working with expression. but the issue is that after my Large Losses option is applied to the grid, I apply another filter option to the grid from another column, the Large Losses filter is gone, only the one applied after it shown in the grid. The other way around, If I apply other filter option first, then apply my Large Losses on top of it, it works fine, both filter result under AND shown in the grid.

3. Please help, while I debugging the code, found that my Large Losses expression is not kept when I apply another filter on top of it.

 

aspx:

<telerik:GridNumericColumn UniqueName="totalincurred" HeaderText="Incurred" DataField="totalincurred" Aggregate="Sum"  
                        AllowFiltering="true" DataType="System.Decimal" FilterControlWidth="80px" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right"   FooterStyle-HorizontalAlign="Right" DataFormatString="{0:N}">
 </telerik:GridNumericColumn>

 

C#:

   protected void LossesGrid_Init(object sender, EventArgs e)
        {
            GridFilterMenu filterMenu = LossesGrid.FilterMenu;
            RadMenuItem menuItem = new RadMenuItem();
            menuItem.Text = "Large Losses";
            menuItem.Value = "LargeLosses";
            LossesGrid.FilterMenu.Items.Add(menuItem);

            filterMenu.ItemClick += new RadMenuEventHandler(filterMenu_ItemClick);

}

   protected void filterMenu_ItemClick(object sender, RadMenuEventArgs e)
        {
            GridFilteringItem filterItem = LossesGrid.MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;
            filterItem.FireCommandEvent("Filter", new Pair(e.Item.Value, e.Item.Attributes["totalincurred"]));
        }

 

 protected void LossesGrid_ItemCommand(object sender, GridCommandEventArgs e)
 {

 if (e.CommandName == RadGrid.FilterCommandName)
            {
                AOId = (this.Master as Main).AccountOverviewId;
                VersionNo = (this.Master as Main).VersionNumber();
           
                Pair filterPair = (Pair)e.CommandArgument;
             
                if (filterPair.First.ToString() == "LargeLosses")
                {
                    e.Canceled = true;
                    string newFilter = "(totalincurred >= 25000)";

                    if (LossesGrid.MasterTableView.FilterExpression == "")
                    {
                        LossesGrid.MasterTableView.FilterExpression = newFilter;
                    }
                    else
                    {
                        LossesGrid.MasterTableView.FilterExpression = "((" + LossesGrid.MasterTableView.FilterExpression + ") AND (" + newFilter + "))";
                    }
              
                   LossesGrid.Rebind();
                }
            }         

}

Li
Top achievements
Rank 1
 asked on 24 Jul 2017
5 answers
216 views
Support,

I have my website in a Visual Studio 2012 solution. 

When I enter debugging for my website, I am able to watch the .mp4 on the localhost page when I click play.

When I publish and deploy the website the RadMediaPlayer just circles when I hit play.

Any idea on what could cause RadMediaPlayer to just circle when published?

Thanks,

Max


Edit:
The only things I can I can think of is permissions or IIS settings
Stephen
Top achievements
Rank 1
 answered on 24 Jul 2017
6 answers
2.0K+ views
I have a RadTimePicker in my asp.net application as below.

<telerik:RadTimePicker ID="RCFromTime" runat="server" Width="110px" Culture="en-US" TimeView-TimeFormat="t" DateInput-DateFormat="h:mm tt" DateInput-DisplayDateFormat="h:mm tt" >
         
         <TimeView StartTime="08:00:00" EndTime="20:00:00" Height="100px" Width="250px" ShowHeader="False" runat="server"> </TimeView>
          <DateInput ID="DateInput1" runat="server">
                            <ClientEvents OnLoad="onLoadRadTimePicker1" />
          </DateInput>
</telerik:RadTimePicker>

In the program I am trying to move a time from sql server to the Timepicker to display the time saved as below.

RCFromTime.DbSelectedDate = phoneenq.Ph_Apptime;

I am getting an error on the above statement as " Value of '01-01-1900 08:00:00' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.Parameter name: SelectedDate"

(  Ph_Apptime is declared as -->public DateTime Ph_Apptime { get; set; }  inside the program)

Anyone please help me on this.





Eddy Mix
Top achievements
Rank 1
 answered on 24 Jul 2017
8 answers
1.7K+ views
Hello,
I have a custom button in my grid. After clicking on the button I want the LayoutID and LayoutTypeID read from the grid TemplateColumn. I've tried the following:
<Columns>
    <telerik:GridBoundColumn DataField="PlayerLayoutID" DataType="System.Int64"
        FilterControlAltText="Filter PlayerLayoutID column" HeaderText="PlayerLayoutID"
        ReadOnly="True" SortExpression="PlayerLayoutID"
        UniqueName="PlayerLayoutID" Visible="False">
    </telerik:GridBoundColumn>
    <telerik:GridTemplateColumn DataField="LayoutTypeID"
        FilterControlAltText="Filter LayoutTypeID column" HeaderText="Layout Type"
        UniqueName="LayoutTypeID">
        <EditItemTemplate>
            <telerik:RadComboBox ID="LayoutTypeIDRadComboBox" runat="server"
                DataSourceID="ODSLayoutTypes"
                DataTextField="TypeName"
                DataValueField="TypeID"
                onselectedindexchanged="LayoutTypeIDRadComboBox_SelectedIndexChanged"
                AutoPostBack="True"
                SelectedValue='<%# Bind("LayoutTypeID") %>' Culture="de-DE">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1"
                        Value="RadComboBoxItem1" />
                </Items>
            </telerik:RadComboBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidatorLayoutType"
                runat="server" ErrorMessage="*"
                ControlToValidate="LayoutTypeIDRadComboBox" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:CustomValidator ID="CustomValidatorLayoutType" runat="server" ErrorMessage="*"
                ControlToValidate="LayoutTypeIDRadComboBox" Display="Dynamic"
                onservervalidate="CustomValidatorLayoutType_ServerValidate" ></asp:CustomValidator>
        </EditItemTemplate>
        <ItemTemplate>
            <asp:Label ID="LayoutTypeIDLabel" runat="server"
                Text='<%# Eval("TypeName") %>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn DataField="LayoutID"
        FilterControlAltText="Filter column1 column" HeaderText="Layout"
        UniqueName="LayoutID">
        <EditItemTemplate>
            <telerik:RadComboBox ID="LayoutIDRadComboBox"
                runat="server" Culture="de-DE" Width="300px" Height="300px"
                OnClientDropDownOpened="OnClientDropDownOpenedHandler"
                ExpandAnimation-Type="None" CollapseAnimation-Type="None"
                <ItemTemplate>
                    <div id="div1" onclick="StopPropagation(event);">
                        <telerik:RadTreeView ID="RTVLayouts"
                            runat="server"                                                                     
                            onnodedatabound="RTVLayouts_NodeDataBound"
                            OnClientNodeClicking="nodeClicking" >
                        </telerik:RadTreeView>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" />
                </Items>                                                   
            </telerik:RadComboBox>
        </EditItemTemplate>
        <ItemTemplate>
            <asp:Label ID="LayoutIDLabel" runat="server" Text='<%# Eval("LayoutName") %>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridEditCommandColumn ButtonType="ImageButton"
    FilterControlAltText="Filter EditCommandColumn column"
    HeaderText="<%$ Resources:BasicSettings, Edit %>">
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
    ConfirmText="<%$ Resources:BasicSettings, ConfirmDelete %>"
    HeaderText="<%$ Resources:BasicSettings, Delete %>" Text="Delete"
    UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="makeObjects"
        FilterControlAltText="Filter MakeObjects column" HeaderText="Objects"
        ImageUrl="../images/symbols/settings_16.png" Text="Objects"
        UniqueName="MakeObjects">
    </telerik:GridButtonColumn>
</Columns>
protected void RadGridPlayerLayout_ItemCommand(object sender, GridCommandEventArgs e)
{
    ...
    if (e.CommandName == "makeObjects")
    {
        GridDataItem item = (GridDataItem)e.Item;
        string test = item["LayoutTypeID"].Text;
         
    }
}

Unfortunately that did not work. How can i solve this?

Best regards
Reiner

Swati
Top achievements
Rank 1
 answered on 24 Jul 2017
5 answers
1.8K+ views
I have a RadGrid with a GridTemplateColumn like so:

<telerik:GridTemplateColumn HeaderText="Account" UniqueName="Account">
    <ItemTemplate>
        <div>
            <asp:DropDownList ID="ddlAccountLookup" Visible="false" runat="server">
            </asp:DropDownList>
            <asp:Label ID="grdAccountName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "AccountName") %>' /><br />
            <asp:Label ID="grdPhone" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Phone") %>' /><br />
            <asp:Label ID="grdEmail" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>' />
        </div>
    </ItemTemplate>
    <HeaderStyle CssClass="BigNormalBold" HorizontalAlign="Left" VerticalAlign="Bottom" />
    <ItemStyle CssClass="Normal" />
</telerik:GridTemplateColumn>


I need to find the ddlAccountLookup and make it Visible on PostBack, how would I go about doing this?

Thanks!
Swati
Top achievements
Rank 1
 answered on 24 Jul 2017
1 answer
48 views

Hello Support,

Currently we are using trial version of telerik.
We have Telerik reports, grids and charts in our application
We want to purchase the Telerik license for the application.
Could you please assist which product we should buy to fullfill our requirements and what is the process to buy the license.

Thanks and Regards

Sandip Katore

Imer
Telerik team
 answered on 24 Jul 2017
0 answers
173 views

Hiiii,

We have a Tree view and  clicking  "+"  uses the web service . How to call the web service explicitly  to expand that node and get it selected .

<telerik:RadTreeView ID="RadTreeViewBottom" runat="server" PersistLoadOnDemandNodes="false" RegisterWithScriptManager="true" 
        LoadingStatusPosition="None" OnClientNodeClicked="RadTreeViewBottom_ClientNodeClicked"
        OnClientKeyPressing="RadTreeViewBottom_ClientKeyPressing" EnableViewState="false"
        OnClientNodePopulating="RadTreeViewBottom_ClientNodePopulating" 
        OnClientLoad="RadTreeViewBottom_OnClientLoad"
        OnClientNodeDataBound="NodeDataBound" OnClientNodeExpanded="Expanded"
        Style="white-space: normal;">
        <WebServiceSettings Method="ViewerBottom_GetNodesChildren" Path="~/ScriptServices/ScriptService.asmx" />
        <Nodes>
            <telerik:RadTreeNode Text="ExistingNode" Visible="True"/>
        </Nodes>
    </telerik:RadTreeView>

 

 

Below one is the Webmethod which i use to call in the web service

[WebMethod(EnableSession=true)]
        public RadTreeNodeData[] ViewerBottom_GetNodesChildren(RadTreeNodeData node, object context)
        {
            IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;

            int topID = int.Parse(contextDictionary["TopID"].ToString());
            string type = contextDictionary["Type"].ToString();
            int parentID = 0;

            if (node != null)
                parentID = int.Parse(node.Value);
            object[] parms = new object[3];
            parms[0] = (int)topID;
            parms[1] = type;
            parms[2] = parentID;

            global::Viewer.ViewerService.Outline outline = (ViewerService.Outline)Data.WebServiceDataProvider.GetData(Data.ViewerClientServiceWrapper.MethodName.getOutline, parms);

            ViewerService.OutlineItem[] outlineItems = outline.ChildItems;

            List<RadTreeNodeData> result = new List<RadTreeNodeData>();

            foreach (ViewerService.OutlineItem item in outlineItems)
            {
                RadTreeNodeData nodeData = new RadTreeNodeData();

                nodeData.Text = item.Title;
                nodeData.Value = item.Id.ToString();
                nodeData.Attributes.Add("DocID", item.DocumentId);

                if (item.HasChildren)
                    nodeData.ExpandMode = TreeNodeExpandMode.WebService;

                result.Add(nodeData);
            }
            return result.ToArray();
        }

 

Below is my JS 1183 is parent node and 1185 is the child node.

var node1 = parentNode.findNodeByValue("1183");
                       if (node1 == null)
                           return;
                       else {
                           node1.expand();
                           var node2 = parentNode.findNodeByValue("1185");
                           if (node2 != null) {
                               node2.select();
                           }

in JS here node2 returns me null i think  because I'm not able to Call the Webservice ecplicitly can anyone suggest me ? how to call it programatically .

 

 

 

sanam
Top achievements
Rank 1
 asked on 22 Jul 2017
3 answers
571 views
Am using radgrid and creating it in aspx but on certain action i add more GridTemplateColumns to the grid.

    private void CreateDateColumns(List<DateTime> occurenceList)
    {
        if (occurenceList != null && occurenceList.Count > 0)
        {
            int index = 1;
            foreach (DateTime occurence in occurenceList)
            {
                string templateColumnName = occurence.Date.ToShortDateString();
                GridTemplateColumn templateColumn = new GridTemplateColumn();
                templateColumn.ItemTemplate = new MyTemplate(templateColumnName, index);
                grdStudentAttendanceList.MasterTableView.Columns.Add(templateColumn);
                templateColumn.HeaderText = templateColumnName;
                templateColumn.UniqueName = templateColumnName;
                
                index++;
            }
        }
    }

    private class MyTemplate : ITemplate
    {
        protected RadComboBox rcbAttendance;
        private string colname;
        private int _index;
        public MyTemplate(string cName, int index)
        {
            colname = cName;
            _index = index;
        }
        public void InstantiateIn(System.Web.UI.Control container)
        {
            rcbAttendance = new RadComboBox();
            rcbAttendance.Items.Add(new RadComboBoxItem("---Select---", "-1"));
            rcbAttendance.Items.Add(new RadComboBoxItem("Present", "1"));
            rcbAttendance.Items.Add(new RadComboBoxItem("Absent", "2"));
            rcbAttendance.Items.Add(new RadComboBoxItem("Leave", "3"));
            rcbAttendance.ID = "rcbAttendance" + _index;
            container.Controls.Add(rcbAttendance);
        }
    }

All are fine with creation but when i press save button or any combobox make postback the only dynamically generated columns content disappear and the other columns stay.
What i noticed that columns still in place with headertext but only content are disappeared (in my case content are comboboxes)

After enabling viewstate for grid only header text appear.

What should i do to keep columns contents after postback and get their values ?
Swati
Top achievements
Rank 1
 answered on 21 Jul 2017
1 answer
122 views

We would like add a custom attribute with a unique value to each option (<li>) in RadComboBox. Either the custom attribute needs to be added to <li> tag or add a <span> tag inside <li> tag and add custom attribute to <span> tag.

We load the options to ComboBox using web service. I read the Item Templates are not supported when we use a web service to populate RadComboBox with data so we assume adding a <span> tag with custom attribute is not possible.

Is there any way to achieve this?

<ul class="rcbList">

  <li class="rcbHovered">1</li>
  <li class="rcbItem">2</li>
  <li class="rcbItem">3</li>
  <li class="rcbItem">4</li>
  <li class="rcbItem">4</li>
  <li class="rcbItem">5</li>
 </ul>

Peter Milchev
Telerik team
 answered on 21 Jul 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?