Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
523 views

Hi all,

I cannot get the tabs to be the same width, even if I specify the width.  Also, the tab control does not fill the strip until the browser is resized.  Sadly I cannot provide screenshots but the tabs do not fill the entire strip as it leaves some of the strip bare.

 

 

 

 

UI:

            <telerik:RadTabStrip runat="server" ID="rts" Width="100%" AutoPostBack="False" 
                Skin="Silk" MultiPageID="rmp" SelectedIndex="0" 
                CausesValidation="False" Align="Justify"
                OnClientTabSelected="OnClientTabSelected" EnableAriaSupport="True" RenderMode="Classic">
                <KeyboardNavigationSettings CommandKey="Alt" FocusKey="T" />
                <Tabs>
                    <telerik:RadTab Text="Text" PageViewID="pv1" Value="pv1" Selected="True"></telerik:RadTab>
                    <telerik:RadTab Text="Some Text" PageViewID="pv2" Value="pv2"></telerik:RadTab>
                    <telerik:RadTab Text="Some More TextView" PageViewID="pv3" Value="pv3"></telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>

 

CSS:

        .RadTabStrip_Silk .rtsLevel1 .rtsLink,
        .RadTabStrip_Silk .rtsLevel1 .rtsLink:hover,
        .RadTabStrip_Silk .rtsLevel1 .rtsSelected:hover {
            background-color: blue !important;
            color: white !important;
            background-image: none !important;
        }

        .RadTabStrip_Silk .rtsLevel1 .rtsSelected {
            background-color: red !important;
            color: white !important;
            text-align: center;
            background-image: none !important;
        }

 

Thanks,

Attila Antal
Telerik team
 answered on 13 Aug 2020
3 answers
814 views
Hi Team,
    I have rad grid with checkboxes in itemtemplate,after binding values in grid, i need to show confirmation alert msg box (with yes and no), if click no , then not call sever side, if yes then call server side code and proceed with checked or unchecked code.Here i paste client and server side code for ur reference.I can show msg and trigger sierver side code.
But in OnClientCheckedChanging even, if i pur if condition , always it reach else condtion,even statement is true.

Client side code : 
    function radchkClicking(sender, args) {
           
           // alert(sender.get_checked());
            var chkstatus1 = sender.get_checked(); // here if i declare variable and pass value as true, then it reach if condiftion, if get from checkbox sender event ,always reach else condition.
             if (chkstatus == "true") {
                args.set_cancel(!window.confirm("Are you sure want to InActive?"));
            }
            else {
                args.set_cancel(!window.confirm("Are you sure want to Active?"));

            }

        }

Rad Grid columns:

 <Columns>
<telerik:GridBoundColumn  HeaderStyle-Font-Size="13px"  ItemStyle-Font-Size="12px" HeaderStyle-ForeColor ="Black" ItemStyle-ForeColor ="Black"  HeaderStyle-Width="100px" HeaderText="ID" DataField="ID" UniqueName="ID">
                                    </telerik:GridBoundColumn>
                                  

                                      <telerik:GridTemplateColumn HeaderStyle-Font-Size="13px"  HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle"  ItemStyle-Font-Size="12px" HeaderStyle-ForeColor ="Black" ItemStyle-ForeColor ="Black" HeaderStyle-Width="70px" HeaderText="Account Status">
                                        <ItemTemplate>
                                         
                                                <telerik:RadCheckBox ID="radchkStatus" runat="server" OnClientCheckedChanging="radchkClicking"     OnClick="radchkStatus_Click" ToolTip='<%# Bind("id") %>'    >
                                                </telerik:RadCheckBox>

                                         </ItemTemplate>
                                          </telerik:GridTemplateColumn>
</Columns>

Pls replay asap
Thanks
Peter Milchev
Telerik team
 answered on 13 Aug 2020
3 answers
331 views

I am attempting to reduce the amount of cell padding in my multi-level grouped grid (2 levels w/ subtotals and totals).

I have successfully reduced the top and botton cell padding on the GridHeaderItem, GridGroupHeaderItem, and GridDataItem.

However, for the life of me I cannot figure out how to change the cell padding in the GridGroupFooterItem.

The same mechanism I tried for the other items hasn't worked.

 

protected void RadGrid_Summary_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
  {
   if (e.Column is GridGroupSplitterColumn c)
   {
    c.HeaderStyle.Width = Unit.Pixel(10);
    c.HeaderStyle.Font.Size = FontUnit.Point(1);
    c.FooterStyle.Width = Unit.Pixel(10);
    c.FooterStyle.Font.Size = FontUnit.Point(1);
    c.ItemStyle.Width = Unit.Pixel(10);
    c.ItemStyle.Font.Size = FontUnit.Point(1);
    c.Resizable = false;
   }
  }
 
  protected void RadGrid_Summary_ItemCreated(object sender, GridItemEventArgs e)
  {
   if (e.Item is GridGroupHeaderItem headerItem)
   {
    headerItem.CssClass = "GridMinClass";
    if (headerItem.Cells.Count > 1 && headerItem.Cells[1].Controls.Count > 0 && headerItem.Cells[1].Controls[0] is Button headerButton1)
    {
     headerButton1.Visible = false;
     headerButton1.Height = Unit.Pixel(0);
    }
    if (headerItem.Cells.Count > 0 && headerItem.Cells[0].Controls.Count > 0 && headerItem.Cells[0].Controls[0] is Button headerButton2)
    {
     headerButton2.Visible = false;
     headerButton2.Height = Unit.Pixel(0);
    }
   }
   if (e.Item is GridGroupFooterItem footerItem)
   {
    footerItem.CssClass = "GridMinClass";
   }
   if (e.Item is GridDataItem dataItem)
   {
    dataItem.CssClass = "GridMinClass";
   }
  }
  
 
gridmin.css:
 
.GridMinClass {
 padding: 0;
 padding-left: 0;
 padding-right: 0;
 padding-top: 0;
 padding-bottom: 0;
}
Attila Antal
Telerik team
 answered on 12 Aug 2020
4 answers
136 views

I need to implement a custom paging template in a radgrid.

Is there a way to skin radbuttons in the paging template w/ the "standard" icons which normally appear in the paging template?

something like

<telerik:RadButton runat="server" ID="RadGrid_Button_PageFirst" CssClass="rgPageFirst" />

doesn't seem to work.

Doncho
Telerik team
 answered on 11 Aug 2020
1 answer
122 views

 Hi,

I have a slider with a number of sliding zones.

I want to save data (in server side) when I close/collapse one of these sliding zone.

I have collected the data in a hiddenfield using javascript.

Now I need to save the content of this hiddenfield in the database.

 

Thank you for your help

 

Anne

Vessy
Telerik team
 answered on 11 Aug 2020
1 answer
181 views

Hello!

I've been having problems attempting to reach values from my RadSpreadsheet component, which have been entered directly into the spreadsheet.

Retrieving cell values works fine when using a SpreadsheetDocumentProvider or a custom provider, which populates the RadSpreadsheet with sheets, rows and cell values. But only the initially populated cells have accessable values - if any new values were to be added, they would show up as NULL when I would try to reach them.

In the image I attempt to get a cell value (and save a referenced workbook) in a button click event.

 

Telerik UI for ASP.NET AJAX 2020.2.617

 

Peter Milchev
Telerik team
 answered on 11 Aug 2020
4 answers
169 views
Hello, I have some aspx pages already written and working with code-behind, I'd like to display these pages within a TABStrip...is there a way to load a webform into RadMultiPageView so each webform can be rendered within the tab when clicked...I'd perfer to not have to recreate all the webforms as ascx user controls.  I tried setting the NavigationURL of each tab but that just behaves like a hyperlink and redirects you to the aspx page you must press the BACK button to get back to the page with the TabStrip.

Thanks
Vessy
Telerik team
 answered on 11 Aug 2020
1 answer
188 views

Hi,

     I have a radtreeview which will order the hierarchy level by level. Here is the code

uiAvailableLocations.DataValueField = FujiXerox.Common.Systems.Sustainability.Constants.Location.ID;
uiAvailableLocations.DataTextField = FujiXerox.Common.Systems.Sustainability.Constants.Location.LocationName;
uiAvailableLocations.DataFieldID = FujiXerox.Common.Systems.Sustainability.Constants.Location.ID;
uiAvailableLocations.DataFieldParentID = FujiXerox.Common.Systems.Sustainability.Constants.Location.ParentID;
uiAvailableLocations.DataSource = ds;
uiAvailableLocations.DataBind();

 

The dataset ds will return the data in alphabetically order. At most times, the treeview can be sort in parent child order normally. But for some strange moments, it will just render the result alphabetically but not in parent child order. The code is same, however sometimes it just render the data alphabetically. What is the reason and how can I fix it?

 

Peter Milchev
Telerik team
 answered on 11 Aug 2020
2 answers
131 views

Hi I’ve got the problem with the radcalendar please see the attached as that shows you what i'm looking to produce.

 

This is the aspx;

<%@ Page Title="" Language="C#" MasterPageFile="~/App_Templates/Local/ConfigLayoutContainer.master" AutoEventWireup="true" CodeBehind="OnCall.aspx.cs" Inherits="ConfigurationModule.rota.OnCall" %>
<%@ Register TagPrefix="user" Namespace="TESTones.Web.UI.Telerik" Assembly="TESTones.Web.UI" %>
 
<asp:Content ID="Header" ContentPlaceHolderID="InstanceHeader" runat="server">
    <title>TESTones | Configuration Module | Manage Overtime</title>
    <link href="/styles/global.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .rcWeekend {
            background-color: #2291a1 !important;
        }
         
        .rcDisabled
        {
            background-color: #fb1f33 !important;
            border: 1px solid #fb1f33 !important;
            background-repeat: no-repeat;
            background-position: 5px 5px !important;
        }
    </style>
</asp:Content>
 
<asp:Content ID="Page" ContentPlaceHolderID="InstanceContent" runat="server">
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" Width="800" Height="600" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSave">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="JustOnePanel" LoadingPanelID="LoadPanel1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadAjaxLoadingPanel ID="LoadPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
 
<telerik:RadToolBar ID="RadToolBar1" runat="server" CssClass="PageMenu">
    <Items>
        <telerik:RadToolBarButton Value="Name" runat="server">
            <ItemTemplate>
                <h1>
                    <asp:Label ID="Label4" runat="server" Text="Manage On Call" /></h1>
            </ItemTemplate>
        </telerik:RadToolBarButton>
    </Items>
</telerik:RadToolBar>
     
 
    <div class="Form">
        <div class="ContentLeft" style="width: 200px;">
            <p>
                <asp:Label ID="lblEngineer" CssClass="formLabel" Text="Engineer" runat="server" />
                <telerik:RadComboBox ID="ddlEngineer"
                    runat="server" AppendDataBoundItems="true" AutoPostBack="True" Filter="Contains" EmptyMessage="Please Select..." CssClass="SearchFormDropdown" EnableLoadOnDemand="True"
                                     OnSelectedIndexChanged="ddlEngineer_SelectedIndexChanged"/>
            </p>
        </div>
        <div>
            <telerik:RadCalendar Width="350px" Height="200px" ID="RadCalendar1" runat="server" EnableMultiSelect="True" AutoPostBack="True" CultureInfo="en-GB"
                                  OnSelectionChanged="RadCalendar1_SelectionChanged">
                <WeekendDayStyle CssClass="rcWeekend" />
                <CalendarTableStyle CssClass="rcMainTable" />
                <OtherMonthDayStyle CssClass="DayStyle" />
                <OutOfRangeDayStyle CssClass="rcOutOfRange" />
                <DisabledDayStyle CssClass="rcDisabled" />
                <SelectedDayStyle CssClass="rcSelected" />
                <DayOverStyle CssClass="rcHover" />
                <FastNavigationStyle CssClass="RadCalendarMonthView RadCalendarMonthView_WebBlue" />
                <ViewSelectorStyle CssClass="rcViewSel" />
                <DayStyle CssClass="DayStyle" />
            </telerik:RadCalendar>
        </div>
         
        <telerik:RadAjaxPanel ID="JustOnePanel" runat="server">
 
            <div class="ContentRight">
                <p>
                    <div style="margin-top: 34px; margin-left: 15px;">
                        <telerik:RadButton  runat="server" ID="btnSave" Text="Save On Call Selection" OnClick="btnSaveChanges_Click" >
                            <Icon PrimaryIconLeft="5px" PrimaryIconTop="2px" PrimaryIconUrl="../images/icons/tick.png"  />
                        </telerik:RadButton>
                        <asp:Label ID="lblSaved" CssClass="formLabel" Text="Saved" ForeColor="green" runat="server" />
                    </div>
                </p>
            </div>
 
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>

 

and this is the cs;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using Ninject;
using Test.Core.Sevices;
using Telerik.Web.UI;
using Telerik.Web.UI.Calendar;
 
namespace ConfigurationModule.rota
{
    public partial class OnCall : Page
    {
        #region Dependency declarations
        [Inject]
        public IResourceService svcResourceService { get; set; }
        [Inject]
        public ICheapSingleUserStorageService svcUser { get; set; }
        #endregion
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblSaved.Visible = false;
                BindEngineersDropDown();
                SetUpCalendar();
            }
        }
 
        protected void BindEngineersDropDown()
        {
            ddlEngineer.DataSource = svcResourceService.ListByContracts(svcUser.Get().ContractCollection().ToList());
            ddlEngineer.DataBind();
        }
 
        protected void ddlEngineer_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblSaved.Visible = false;
            SetUpCalendar();
        }
 
 
        protected void RadCalendar1_SelectionChanged(object sender, SelectedDatesEventArgs e)
        {
            lblSaved.Visible = false;
        }
 
 
        protected void SetUpCalendar()
        {
            RadCalendar1.RangeMinDate = DateTime.Today;
            RadCalendar1.SpecialDays.Clear();
            RadCalendar1.SelectedDates.Clear();
 
            var onCallList = svcResourceService.GetOnCallList(ddlEngineer.SelectedValue).ToList();
 
            foreach (var rotaOverride in onCallList)
            {
                var calendarDay = new RadCalendarDay { Date = rotaOverride.Date };
 
                 
                if (rotaOverride.TypeId == 2)
                {
                    calendarDay.ItemStyle.CssClass = "rcSelected2";
                    calendarDay.IsSelectable = false;
                    RadCalendar1.SpecialDays.Add(calendarDay);
                }
                else
                {
                    RadCalendar1.SelectedDates.Add(new RadDate(rotaOverride.Date));
                }
 
                 
            }
        }
 
        protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            List<DateTime> dates = new List<DateTime>();
 
            foreach (RadDate date in RadCalendar1.SelectedDates)
            {
                var d = date.Date;
                dates.Add(d);
            }
 
            svcResourceService.UpdateOnCallList(dates, ddlEngineer.SelectedValue.ToString());
            lblSaved.Visible = true;
        }
 
    }
}

Martin
Top achievements
Rank 1
 answered on 10 Aug 2020
6 answers
122 views

Hi sir,

 

            I use radgrid in that i give MasterTableView in that datakeynames and clientdatakeynames some time it show error like this"Cannot read property 'get_dataItems' of null". once i clear the temp file and run again it work. After 2 days it show some error again. I need solution for this ASAP.

M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Aug 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?