Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
253 views
Okay, here we go.

On the *server side*, I have :

a RadMaskedTextBox, which has an arbitrary Mask that is set by someone else.
a string, which contains an arbitrary string that is set by someone else.

I want to determine whether or not this string would validate inside the RadMaskedTextBox given its Mask.

I determined experimentally that attempting to stuff a non-validating value into the Text property (e.g. by saying myBox.Text = <some string that wouldn't validate) of the box results in no change to the current value, so I could come up with a solution based on that, but that seems kind of messy and may puzzle the next developer.

I could attempt to write my own mask parser and validator, though that seems like it would be risky.

Any ideas?
Silvio Silva Junior
Top achievements
Rank 2
 answered on 11 Dec 2013
1 answer
198 views
hi there~

In my program, the Document is bigger than the window (browser), and the grid is on the down part of document.

so, use scrolling in body,of course. 


and, when a page is loading. that grid is only shown when scrolling down.

in this case page size dropdown list layer is higher as scolling amount.

it means the page size dropdown list is not on right place. upper than it should be. 

it has to be looks like 'ok.png', but whent scrolling down it's shown like 'notok.png'   --- attachted two files. 


i think i got a no problem in telerik 2012 version. so i didn't noticed that issue before. then i resently updated telerik dll to 2013 q3. 

so i suppose that might occurs that issue.


please help me~ 

thank you. ~

ps. a same issue is occurs in calender componet too. 
Venelin
Telerik team
 answered on 11 Dec 2013
2 answers
62 views
I am using a custom advanced form with RadScheduler. I would like the Insert/Update process to work this way:

1) User clicks to insert or edit an appointment
2) After entering appointment info, user clicks the "Save" button
3) Appointment is inserted or updated
4) User is then redirected to a secondary form with additional information to add/edit for the appointment (instead of reloading the scheduler)

Any ideas would be great!

Thanks!
Vic
Top achievements
Rank 2
 answered on 11 Dec 2013
3 answers
127 views
The pageview control is not working properly on my site when viewed in IE11.  The attached screenshots demonstrate the problem.  I've tried all manner of changes including eliminating cssclass on the pageview.  The code is very straightforward....

<asp:Content ID="Content2" ContentPlaceHolderID="cph_content" Runat="Server">
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Web20">
    </telerik:RadSkinManager>
    <div>
        <div style="float:right;text-align:right;position:relative;top:16px;right:16px;z-index:5;width:60px;"><asp:LinkButton ID="linkbuttonLogOff" runat="server">LOG OFF</asp:LinkButton></div>
 
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1">
        <Tabs>
            <telerik:RadTab Text="IRIS Home" Selected="True" SelectedIndex="0" PostBack="false">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Account Access" SelectedIndex="1" PostBack="false" ToolTip="Shareholder account information and details">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Reports" SelectedIndex="2" PostBack="false" ToolTip="Real-time reports">
                    </telerik:RadTab>
                    <telerik:RadTab Text="SM@RT" SelectedIndex="3" PostBack="false" ToolTip="Stock Issuance/DWAC">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Archived Reports" ToolTip="Transfer Journals, Check Registers, ACH Reports, DRP List" SelectedIndex="4" PostBack="false">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Issue Stats" ToolTip="Issuer Share and Account Statistics" SelectedIndex="5" PostBack="false" Visible="false">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Annual Meeting Center" ToolTip="Tools and Info to Manage Your Shareholder Meetings" SelectedIndex="6" PostBack="false" Visible="false">
                    </telerik:RadTab>
        </Tabs>
        </telerik:RadTabStrip>
 
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
            <telerik:RadPageView ID="pageviewWELCOME" runat="server" Selected="true" contenturl="welcome.aspx" Height="900" Width="980">
            </telerik:RadPageView>
 
            <telerik:RadPageView ID="pageviewIRIS" runat="server" CssClass="pageview" ContentUrl="" Height="900" Width="980">
            </telerik:RadPageView>
 
            <telerik:RadPageView ID="pageviewREPORTS" runat="server" height="900" ContentUrl="reports.aspx" Width="980">
            </telerik:RadPageView>
 
            <telerik:RadPageView ID="pageviewSMART" runat="server" CssClass="pageview" ContentUrl="" Height="900" Width="980">
            <h4>SM@RT</h4>
            </telerik:RadPageView>
 
            <telerik:RadPageView ID="pageviewAlchemy" runat="server" CssClass="pageview" Height="540" Width="980">
            </telerik:RadPageView>
 
          <telerik:RadPageView ID="pageviewIssueStats" runat="server" CssClass="pageview" ContentUrl="issuestats.aspx" Height="760"  Width="980">
            </telerik:RadPageView>
          
          <telerik:RadPageView ID="pageviewAnnualMeetingCenter" runat="server" CssClass="pageview" Height="1300" BackColor="White" ContentUrl="annualmeetingcenter" Width="980">
            </telerik:RadPageView>
 
        </telerik:RadMultiPage>
         
    </div>
</asp:Content>

I added width attributes to the pageviews and nothing changed.  I modified the cssclass "pageview" and nothing changed.
I eliminated the cssclass and nothing changed. I tried adding the width attribute to the multipage control and nothing changed.

Any ideas?

The pageview style is also pretty simple:
.pageview
{
    padding:0px;
    background-color:#FFFFFF;
    height:100%;
    width:980px;
    margin:0px;
}
Nencho
Telerik team
 answered on 11 Dec 2013
1 answer
152 views
Hello!

Is it possible to setup some sort of roles/permissions around the creation and editing? The main concern is that we have two scenarios that need to be supported:

1- Read Only Mode (Admin only can create).
2- Shared Mode (Users can see all entries but only modify theirs).

I haven't purchased this yet and this will help with the purchase decision.

Thank you,
Amine,

Vic
Top achievements
Rank 2
 answered on 11 Dec 2013
1 answer
182 views
Hi, I have an issue with radgrid. I have Lİstview and radgrid inside listview. I can not run edit mode and Add new record in radgrid. I followed this example  http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx.

If i add this insert and edit is opening by default but when i press add new record it does not open.

protected void gridCustomerLocationPhone_PreRender(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                gridCustomerLocationPhoneEdit.MasterTableView.IsItemInserted = true;
                gridCustomerLocationPhoneEdit.Rebind();
            }
        }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ActivityManagement.Main;
using CT.Base;
using BIL.Base.Exceptions;
using Telerik.Web.UI;
using BIL.Base.FormManagement;
using CT.Base.ModelView;
using BIL.Base.ModelView;
using BIL.Common.Utilities;
 
namespace ActivityManagement.Common.Pages
{
    public partial class ManageCustomerDetail : CTBasePage
    {
        #region Page Private Members
 
        private Customer selectedCustomer;
        private CustomerLocation selectedCustomerLocation;
        private Label lblIdEdit;
        private Label lblIdDelete;
        private RadComboBox comboCountryEdit;
        private RadComboBox comboCityEdit;
        private TextBox txtNameEdit;
        private TextBox txtAddressEdit;
        private RadComboBox comboCountryInsert;
        private RadComboBox comboCityInsert;
        private TextBox txtNameInsert;
        private TextBox txtAddressInsert;
        private RadGrid gridCustomerLocationPhoneEdit;
 
        #endregion
 
        #region Page Public Members
 
        public Customer SelectedCustomer
        {
            get
            {
                if (selectedCustomer == null)
                {
                    selectedCustomer = (Customer)webApplicationManager.Session["SelectedCustomer"];
 
                    if (selectedCustomer == null)
                        throw new SessionVariableNotFoundException("SelectedCustomer", activityApplicationManager.Context.SystemName);
                }
 
                return selectedCustomer;
            }
            set
            {
                selectedCustomer = value;
                Session["SelectedCustomer"] = selectedCustomer;
            }
        }
 
        public CustomerLocation SelectedCustomerLocation
        {
            get
            {
                if (selectedCustomerLocation == null)
                {
                    selectedCustomerLocation = (CustomerLocation)webApplicationManager.Session["SelectedCustomerLocation"];
 
                    if (selectedCustomerLocation == null)
                        throw new SessionVariableNotFoundException("SelectedCustomerLocation", activityApplicationManager.Context.SystemName);
                }
 
                return selectedCustomerLocation;
            }
            set
            {
                selectedCustomerLocation = value;
                Session["SelectedCustomerLocation"] = selectedCustomerLocation;
            }
        }
 
        #endregion
 
        #region Page Events
 
        protected void Page_Load(object sender, EventArgs e)
        {
            PageMessageLabel = lblMessage;
            InitializePageContext();
            if (!Page.IsPostBack)
            {
                InitializePage();
                listViewCustomerDetail.Skin = "Metro";
                listViewCustomerDetail.Rebind();
            }
        }
 
        #endregion
 
        #region Toolbar
 
 
        #endregion
 
        #region ButtonOperations
 
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            listViewCustomerDetail.Rebind();
        }
 
        protected void btnInitInsert_Click(object sender, System.EventArgs e)
        {
            listViewCustomerDetail.ShowInsertItem();
            listViewCustomerDetail.FindControl("btnInitInsert").Visible = false;
        }
 
        #endregion
 
        #region ComboOperations
 
        protected void comboCountries_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            var comboBox = ((RadComboBox)sender);
            Dictionary<string, string> customerCitiesDictionary = ctBaseManager.CityOperations.GetCityListAsDictionaryByCountryId(Convert.ToInt32(comboBox.SelectedValue));
            webApplicationManager.UI.LoadComboBox(comboCityEdit, customerCitiesDictionary, false, "");
        }
 
        protected void comboCountries_DataBinding(object sender, EventArgs e)
        {
            var comboBox = ((RadComboBox)sender);
            Dictionary<string, string> customerCountriesDictionary = ctBaseManager.CountryOperations.GetCountryListAsDictionary();
            webApplicationManager.UI.LoadComboBox(comboBox, customerCountriesDictionary, false, "");
            Dictionary<string, string> customerCitiesDictionary = ctBaseManager.CityOperations.GetCityListAsDictionaryByCountryId(Convert.ToInt32(comboBox.SelectedValue));
            webApplicationManager.UI.LoadComboBox(comboCityEdit, customerCitiesDictionary, false, "");
        }
 
        protected void comboCountriesInsert_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            var comboBox = ((RadComboBox)sender);
            Dictionary<string, string> customerCitiesDictionary = ctBaseManager.CityOperations.GetCityListAsDictionaryByCountryId(Convert.ToInt32(comboBox.SelectedValue));
            webApplicationManager.UI.LoadComboBox(comboCityInsert, customerCitiesDictionary, false, "");
        }
 
        protected void comboCountriesInsert_DataBinding(object sender, EventArgs e)
        {
            var comboBox = ((RadComboBox)sender);
            Dictionary<string, string> customerCountriesDictionary = ctBaseManager.CountryOperations.GetCountryListAsDictionary();
            webApplicationManager.UI.LoadComboBox(comboBox, customerCountriesDictionary, false, "");
            Dictionary<string, string> customerCitiesDictionary = ctBaseManager.CityOperations.GetCityListAsDictionaryByCountryId(Convert.ToInt32(comboBox.SelectedValue));
            webApplicationManager.UI.LoadComboBox(comboCityInsert, customerCitiesDictionary, false, "");
        }
 
 
        protected void comboPhoneType_DataBinding(object sender, EventArgs e)
        {
            var comboBox = ((RadComboBox)sender);
            Dictionary<string, string> phoneTypeDictionary = ctBaseManager.CustomerPhoneOperations.GetPhoneTypeListAsDictionary();
            webApplicationManager.UI.LoadComboBox(comboBox, phoneTypeDictionary, false, "");
        }
 
        #endregion
 
        #region ListViewCustomerDetail
 
        protected void listViewCustomerDetail_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
        {
            if (!listViewCustomerDetail.DataSourceIsAssigned)
            {
                BindData();
            }
        }
 
        private void BindData()
        {
            IList<CustomerLocationView> customerLocationList;
            bool? isActive = TypeConversionWorker.ConvertStringValueToNullableBoolean(comboIsActive.SelectedValue);
            bool? isDeleted = TypeConversionWorker.ConvertStringValueToNullableBoolean(comboIsDeleted.SelectedValue);
            customerLocationList = ctBaseManager.CustomerLocationOperations.GetCustomerLocationViewByCustomerId(this.SelectedCustomer.Id, isActive, isDeleted);
            listViewCustomerDetail.DataSource = customerLocationList;
        }
 
        private void BindPhoneData()
        {
 
        }
 
        protected void listViewCustomerDetail_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item is RadListViewDataItem)
            {
                RadListViewDataItem item = e.Item as RadListViewDataItem;
 
                RadGrid radgrid = (RadGrid)e.Item.FindControl("gridCustomerLocationPhone");
                gridCustomerLocationPhoneEdit = radgrid;
                ajaxManager.AjaxSettings.AddAjaxSetting(radgrid, radgrid, ajaxLoadPanel);
                Label lblId = (Label)e.Item.FindControl("lblId");
                IList<CustomerLocationPhoneView> customerLocationPhoneList = ctBaseManager.CustomerPhoneOperations.GetCustomerLocationPhoneByParameter(Convert.ToInt32(lblId.Text));
                radgrid.DataSource = customerLocationPhoneList;
                radgrid.Rebind();
                //Label subject = (Label)e.Item.FindControl("lblSubject");
                //subject.Text = webApplicationManager.Framework.GetGlobalizationKeyValue("Subject") + " : ";
 
                //string messageSubject = (string)DataBinder.Eval(item.DataItem, "MessageSubject");
                //int lineCountSubject = messageSubject.Split('\n').Length;
                //TextBox textMessageSubject = (TextBox)e.Item.FindControl("txtMessageSubject");
                //textMessageSubject.Rows = lineCountSubject;
                //textMessageSubject.Text = messageSubject;
 
                //string message = (string)DataBinder.Eval(item.DataItem, "Message");
                //int lineCount = message.Split('\n').Length + 2;
                //TextBox textMessage = (TextBox)e.Item.FindControl("lblMessage");
                //textMessage.Rows = lineCount;
 
                //if (!webApplicationManager.Framework.Globalization.IsCultureInfoDefaultSystemCulture())
                //{
                //    Label from = (Label)e.Item.FindControl("lblFrom");
                //    from.Text = webApplicationManager.Framework.GetGlobalizationKeyValue("From");
                //    Label to = (Label)e.Item.FindControl("lblTo");
                //    to.Text = webApplicationManager.Framework.GetGlobalizationKeyValue("To");
                //}
            }
        }
 
        protected void listViewCustomerDetail_ItemCommand(object sender, RadListViewCommandEventArgs e)
        {
            if ((e.CommandName == RadListView.PerformInsertCommandName))
            {
                this.SelectedCustomerLocation = new CustomerLocation();
                CreateSelectedCustomerLocation(this.SelectedCustomerLocation);
                listViewCustomerDetail.InsertItemPosition = RadListViewInsertItemPosition.None;
                listViewCustomerDetail.FindControl("btnInitInsert").Visible = true;
            }
            if ((e.CommandName == RadListView.UpdateCommandName))
            {
                this.SelectedCustomerLocation = ctBaseManager.CustomerLocationOperations.GetObjectById(cl => cl.Id == Convert.ToInt32(lblIdEdit.Text));
                ChangeSelectedCustomerLocation(this.SelectedCustomerLocation, "Edit");
                listViewCustomerDetail.InsertItemPosition = RadListViewInsertItemPosition.None;
                listViewCustomerDetail.FindControl("btnInitInsert").Visible = true;
            }
            if ((e.CommandName == RadListView.DeleteCommandName))
            {
                this.SelectedCustomerLocation = ctBaseManager.CustomerLocationOperations.GetObjectById(cl => cl.Id == Convert.ToInt32(lblIdEdit.Text));
                ChangeSelectedCustomerLocation(this.SelectedCustomerLocation, "Delete");
                listViewCustomerDetail.InsertItemPosition = RadListViewInsertItemPosition.None;
                listViewCustomerDetail.FindControl("btnInitInsert").Visible = true;
                listViewCustomerDetail.EditIndexes.Clear();
            }
            if ((e.CommandName == RadListView.CancelCommandName))
            {
                listViewCustomerDetail.InsertItemPosition = RadListViewInsertItemPosition.None;
                listViewCustomerDetail.FindControl("btnInitInsert").Visible = true;
            }
        }
 
        protected void listViewCustomerDetail_ItemCreated(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item.ItemType == RadListViewItemType.EditItem)
            {
                lblIdEdit = e.Item.FindControl("lblId") as Label;
                comboCityEdit = e.Item.FindControl("comboCountries") as RadComboBox;
                comboCityEdit = e.Item.FindControl("comboCities") as RadComboBox;
                txtNameEdit = e.Item.FindControl("txtName") as TextBox;
                txtAddressEdit = e.Item.FindControl("txtAddress") as TextBox;
            }
            if (e.Item.ItemType == RadListViewItemType.InsertItem)
            {
                lblIdEdit = e.Item.FindControl("lblId") as Label;
                comboCityInsert = e.Item.FindControl("comboCountries") as RadComboBox;
                comboCityInsert = e.Item.FindControl("comboCities") as RadComboBox;
                txtNameInsert = e.Item.FindControl("txtName") as TextBox;
                txtAddressInsert = e.Item.FindControl("txtAddress") as TextBox;
            }
            if (e.Item.ItemType == RadListViewItemType.DataItem)
            {
                RadGrid radgrid = (RadGrid)e.Item.FindControl("gridCustomerLocationPhone");
                gridCustomerLocationPhoneEdit = radgrid;
            }
        }
 
        #endregion
 
        #region GridCustomerLocationPhone
 
        protected void gridCustomerLocationPhone_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && (e.Item.IsInEditMode))
            {
                GridEditableItem editableItem = (GridEditableItem)e.Item;
                //SetupInputManager(editableItem);
            }
        }
 
 
        protected void gridCustomerLocationPhone_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
        }
 
        protected void gridCustomerLocationPhone_UpdateCommand(object source, GridCommandEventArgs e)
        {
        }
 
        protected void gridCustomerLocationPhone_InsertCommand(object source, GridCommandEventArgs e)
        {
            UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
        }
 
        protected void gridCustomerLocationPhone_DeleteCommand(object source, GridCommandEventArgs e)
        {
        }
 
        protected void gridCustomerLocationPhone_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked
            {
                GridEditCommandColumn editColumn = (GridEditCommandColumn)gridCustomerLocationPhoneEdit.MasterTableView.GetColumn("EditCommandColumn");
                editColumn.Visible = false;
                e.Item.OwnerTableView.InsertItem();
            }
            else if (e.CommandName == RadGrid.RebindGridCommandName && e.Item.OwnerTableView.IsItemInserted)
            {
                e.Canceled = true;
            }
            else
            {
                GridEditCommandColumn editColumn = (GridEditCommandColumn)gridCustomerLocationPhoneEdit.MasterTableView.GetColumn("EditCommandColumn");
                if (!editColumn.Visible)
                    editColumn.Visible = true;
            }
 
            if (e.CommandName == RadGrid.PerformInsertCommandName)
            {
                GridEditableItem editedItem = e.Item as GridEditableItem;
            }
            gridCustomerLocationPhoneEdit.Rebind();
        }
 
        protected void gridCustomerLocationPhone_PreRender(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                gridCustomerLocationPhoneEdit.Rebind();
            }
        }
 
        #endregion
 
        #region Methods
 
        private void InitializePageContext()
        {
            try
            {
                //Ajax
                ajaxManager.AjaxSettings.AddAjaxSetting(ManageActivityMessagesToolBar.InstanceToolbar, lblMessage, ajaxLoadPanel);
                ajaxManager.AjaxSettings.AddAjaxSetting(ManageActivityMessagesToolBar.InstanceToolbar, listViewCustomerDetail, ajaxLoadPanel);
                ajaxManager.AjaxSettings.AddAjaxSetting(listViewCustomerDetail, listViewCustomerDetail, ajaxLoadPanel);
 
                //Toolbar
                SetToolbar(ManageActivityMessagesToolBar);
            }
            catch (Exception exception)
            {
                lblMessage.Text = webApplicationManager.Framework.PublishException(exception, webApplicationManager.Framework.ApplicationContext.CurrentUser);
            }
        }
 
        private void InitializePage()
        {
            WebFormDialog webFormDialog = webApplicationManager.UI.FindDialogOwner(Page.Request.Path);
            if (webFormDialog != null)
            {
                webApplicationManager.UI.RefreshDialogsList(webFormDialog);
            }
 
            txtCustomerName.Text = this.SelectedCustomer.Name;
            //Globalization
            //Form Object Properties
            if (webApplicationManager.Framework.Form.Context.IsCustomFormParametersActive)
            {
                //IList<SystemFormParameterView> list = webApplicationManager.Framework.Form.FormParameterOperations.GetSystemFormParametersByTypeName("ManageCustomerDetail");
                //listViewCustomerDetail.PageSize = webApplicationManager.Framework.Form.SetFormParameterValue<int>(list, listViewCustomerDetail.PageSize, "listViewCustomerDetail", "PageSize"); ;
                //listViewCustomerDetail.AllowPaging = webApplicationManager.Framework.Form.SetFormParameterValue<bool>(list, listViewCustomerDetail.AllowPaging, "listViewCustomerDetail", "AllowPaging");
            }
        }
 
        private void ChangeSelectedCustomerLocation(CustomerLocation selectedCustomerLocation, string changeType)
        {
            if (changeType.Equals("Edit"))
            {
                selectedCustomerLocation.Name = txtNameEdit.Text;
                selectedCustomerLocation.Adress = txtAddressEdit.Text;
                selectedCustomerLocation.CityId = Convert.ToInt32(comboCityEdit.SelectedValue);
            }
            else if (changeType.Equals("Delete"))
            {
                selectedCustomerLocation.IsDeleted = true;
            }
            selectedCustomerLocation.ChangeDate = webApplicationManager.Framework.GetCurrentDateTime();
            selectedCustomerLocation.ChangedBy = webApplicationManager.Framework.ApplicationContext.CurrentUser.Name;
            ctBaseManager.SaveCustomerLocation(selectedCustomerLocation);
        }
 
        private void CreateSelectedCustomerLocation(CustomerLocation selectedCustomerLocation)
        {
            selectedCustomerLocation.CustomerId = this.SelectedCustomer.Id;
            selectedCustomerLocation.Name = txtNameInsert.Text;
            selectedCustomerLocation.Adress = txtAddressInsert.Text;
            selectedCustomerLocation.CityId = Convert.ToInt32(comboCityInsert.SelectedValue);
            selectedCustomerLocation.IsActive = true;
            selectedCustomerLocation.IsDeleted = false;
            selectedCustomerLocation.InsertDate = webApplicationManager.Framework.GetCurrentDateTime();
            selectedCustomerLocation.InsertedBy = webApplicationManager.Framework.ApplicationContext.CurrentUser.Name;
            ctBaseManager.SaveCustomerLocation(selectedCustomerLocation);
        }
 
        #endregion
    }
}
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="ManageCustomerDetail.aspx.cs" Inherits="ActivityManagement.Common.Pages.ManageCustomerDetail" %>
 
<%@ Register Src="~/Framework/UserControls/BILToolbar.ascx" TagName="BILToolbar"
    TagPrefix="Toolbar" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div id="FormContainer" style="width: 700px; min-width: 700px;">
        <div id="FormTitle">
            <asp:Label ID="lblFormTitle" runat="server" CssClass="StandartFormTitle" Text="Müşteri İletiÅŸim Detay"></asp:Label>
        </div>
        <div id="FormToolbar">
            <Toolbar:BILToolbar ID="ManageActivityMessagesToolBar" runat="server" />
        </div>
        <div id="FormMessage">
            <asp:Label ID="lblMessage" runat="server" CssClass="StandartMessageLabel"></asp:Label>
        </div>
        <div id="FormGroupElements">
            <div id="ParameterGroupActSubject" class="FormElement">
                <asp:Label ID="lblCustomerName" runat="server" Text="Müşteri" CssClass="StandartFormLabel"
                    Width="100px"></asp:Label>
                <asp:TextBox ID="txtCustomerName" runat="server" Width="170px" Enabled="False" BackColor="#F3F3F3"
                    Font-Bold="True" ForeColor="Red"></asp:TextBox>
            </div>
            <div id="ParameterGroupActiveDeleted" class="FormElement">
                <asp:Label ID="lblIsActive" runat="server" Text="Aktif mi?" CssClass="StandartFormLabel"
                    Width="100px"></asp:Label>
                <telerik:RadComboBox ID="comboIsActive" runat="server" Width="150px">
                </telerik:RadComboBox>
                <asp:Label ID="lblIsDeleted" runat="server" Text="SilinmiÅŸ mi?" CssClass="StandartFormLabel"
                    Width="100px"></asp:Label>
                <telerik:RadComboBox ID="comboIsDeleted" runat="server" Width="150px">
                </telerik:RadComboBox>
                <telerik:RadButton ID="btnSearch" runat="server" Text="Sorgula" OnClick="btnSearch_Click"
                    CausesValidation="True" Style="height: 20px; left: 10px;" Width="90px">
                    <Icon PrimaryIconUrl="~/Images/Buttons/Search16X16_0.png" />
                </telerik:RadButton>
            </div>
            <div id="ListViewCustomerDetail" class="FormElement">
                <asp:Panel ID="ListViewPanel1" runat="server" CssClass="ListViewPanel">
                    <telerik:RadListView ID="listViewCustomerDetail" runat="server" ItemPlaceholderID="CustomersDetailContainer"
                        DataKeyNames="Id" AllowPaging="true" OnItemCommand="listViewCustomerDetail_ItemCommand"
                        OnNeedDataSource="listViewCustomerDetail_NeedDataSource" OnItemDataBound="listViewCustomerDetail_ItemDataBound"
                        OnItemCreated="listViewCustomerDetail_ItemCreated">
                        <LayoutTemplate>
                            <fieldset id="FiledSet1" style="max-width: 100%;" class="RadListView RadListView_<%#Container.Skin %>">
                                <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td>
                                            <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="listViewCustomerDetail"
                                                PageSize="1">
                                                <Fields>
                                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="6"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                                    <%--<telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Kayıt Sayısı: ">
                                                    </telerik:RadDataPagerPageSizeField>--%>
                                                    <telerik:RadDataPagerGoToPageField CurrentPageText="Sayfa: " TotalPageText="of" SubmitButtonText="Git"
                                                        TextBoxWidth="40"></telerik:RadDataPagerGoToPageField>
                                                    <%--<telerik:RadDataPagerTemplatePageField>
                                                            <PagerTemplate>
                                                                <div style="float: right; padding-left: 50px;">
                                                                    <b>Items
                                                                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# (Container.Owner.TotalRowCount > 0)? Container.Owner.StartRowIndex + 1  : 0%>"></asp:Label>
                                                                        to
                                                                        <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# (Container.Owner.TotalRowCount > 0)? Container.Owner.StartRowIndex + Container.Owner.PageSize : 0 %>"></asp:Label>
                                                                        of
                                                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>"></asp:Label>
                                                                        <br />
                                                                    </b>
                                                                </div>
                                                            </PagerTemplate>
                                                        </telerik:RadDataPagerTemplatePageField>--%>
                                                </Fields>
                                            </telerik:RadDataPager>
                                        </td>
                                    </tr>
                                </table>
                                <asp:PlaceHolder ID="CustomersDetailContainer" runat="server"></asp:PlaceHolder>
                                <div style="clear: both">
                                </div>
                                <table style="width: 100%; margin-top: 5px;">
                                    <tr>
                                        <td style="text-align: right">
                                            <asp:Button ID="btnInitInsert" runat="server" Text="Yeni" Width="100px" OnClick="btnInitInsert_Click">
                                            </asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <fieldset>
                                <table width="100%" cellpadding="0" cellspacing="5">
                                    <tr>
                                        <td>
                                            <table width="100%" cellpadding="0" cellspacing="5">
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:Label ID="lblId" runat="server" Text='<%# Eval("Id") %>' Visible="false"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblName" runat="server" Text="Adı:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblName1" runat="server" Text='<%# Eval("Name") %>' Width="100%"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblAddress" runat="server" Text="Address:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblAddress1" runat="server" Text='<%# Eval("Address") %>' Width="100%"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCity" runat="server" Text="Åžehir:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblCity1" runat="server" Text='<%# Eval("City") %>' Width="100%"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCountry" runat="server" Text="Ülke:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="lblCountry1" runat="server" Text='<%# Eval("Country") %>' Width="100%"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblIsActive" runat="server" Text="Aktif mi?" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:CheckBox ID="chkIsActive" runat="server" Enabled="false" Checked='<%# Eval("IsActive") %>' />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblIsDeleted" runat="server" Text="SilinmiÅŸ mi?" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:CheckBox ID="chkIsDeleted" runat="server" Enabled="false" Checked='<%# Eval("IsDeleted") %>' />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table style="width: 95%; margin-top: 10px">
                                                <tr>
                                                    <td>
                                                        <asp:Button ID="btnEdit" runat="server" Text="Düzenle" CommandName="Edit" Width="70px">
                                                        </asp:Button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblLocationPhone" runat="server" Text="Telefonlar" Width="100px" Style="margin-top: 10px"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <telerik:RadGrid runat="server" ID="gridCustomerLocationPhone" AutoGenerateColumns="false"
                                                AllowPaging="true" Width="100%" OnUpdateCommand="gridCustomerLocationPhone_UpdateCommand"
                                                OnItemCreated="gridCustomerLocationPhone_ItemCreated" OnDeleteCommand="gridCustomerLocationPhone_DeleteCommand"
                                                OnInsertCommand="gridCustomerLocationPhone_InsertCommand" OnItemCommand="gridCustomerLocationPhone_ItemCommand"
                                                OnPreRender="gridCustomerLocationPhone_PreRender">
                                                <MasterTableView CommandItemDisplay="Top"  DataKeyNames="Id">
                                                    <Columns>
                                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                                                        <telerik:GridBoundColumn DataField="Id" UniqueName="Id" HeaderText="No" Display="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="CustomerLocationId" UniqueName="CustomerLocationId"
                                                            HeaderText="No" Display="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="PhoneType" UniqueName="PhoneType" HeaderText="Telefon Tipi">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="Phone" UniqueName="Phone" HeaderText="Telefon" />
                                                        <telerik:GridBoundColumn DataField="InternalPhone" UniqueName="InternalPhone" HeaderText="Dahili" />
                                                        <telerik:GridBoundColumn DataField="Pbx" UniqueName="Pbx" HeaderText="Pbx" />
                                                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                                                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                                                    </Columns>
                                                    <EditFormSettings EditFormType="Template">
                                                        <FormTemplate>
                                                            <table width="100%" cellpadding="0" cellspacing="5">
                                                                <tr>
                                                                    <td>
                                                                        <table width="100%" cellpadding="0" cellspacing="5">
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblPhoneType" runat="server" Text="Telefon Tipi:" Width="100px"></asp:Label>
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadComboBox ID="comboPhoneType" runat="server" Width="200px" OnDataBinding="comboPhoneType_DataBinding">
                                                                                    </telerik:RadComboBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblPhone" runat="server" Text="Telefon:" Width="100px"></asp:Label>
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadMaskedTextBox ID="txtPhone" runat="server" Width="160px" Mask="#### (###) ### ## ##" Text='<%#Bind("Phone")%>'  />
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblInternal" runat="server" Text="Dahili:" Width="100px"></asp:Label>
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadNumericTextBox ID="txtInternal" runat="server" Width="40px" DataType="System.Int32"
                                                                                        MaxLength="4" MaxValue="9999" MinValue="0" Text='<%#Bind("InternalPhone")%>'>
                                                                                        <NumberFormat ZeroPattern="n" DecimalDigits="0" GroupSeparator=""></NumberFormat>
                                                                                    </telerik:RadNumericTextBox>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="lblPbx" runat="server" Text="Pbx" Width="100px"></asp:Label>
                                                                                </td>
                                                                                <td>
                                                                                    <telerik:RadNumericTextBox ID="txtPbx" runat="server" Width="40px" DataType="System.Int32"
                                                                                        MaxLength="4" MaxValue="9999" MinValue="0" Text='<%#Bind("Pbx")%>'>
                                                                                        <NumberFormat ZeroPattern="n" DecimalDigits="0" GroupSeparator=""></NumberFormat>
                                                                                    </telerik:RadNumericTextBox>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                                        </asp:Button>
                                                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                                            CommandName="Cancel"></asp:Button>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </FormTemplate>
                                                    </EditFormSettings>
                                                </MasterTableView>
                                                <PagerStyle Mode="NextPrevAndNumeric" />
                                            </telerik:RadGrid>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <fieldset class="fieldset">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <table cellpadding="0" cellspacing="5">
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:Label ID="lblId" runat="server" Text='<%#Bind("Id")%>' Visible="false" Width="100px"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblName" runat="server" Text="Adı:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtName" runat="server" Text='<%#Bind("Name")%>' Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblAddress" runat="server" Text="Address:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address")%>' Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCountry" runat="server" Text="Ülke:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="comboCountries" runat="server" AutoPostBack="True" Width="200px"
                                                            OnSelectedIndexChanged="comboCountries_SelectedIndexChanged" OnDataBinding="comboCountries_DataBinding">
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCity" runat="server" Text="Åžehir:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="comboCities" runat="server" Width="200px">
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                            </table>
                                            <tr>
                                                <td>
                                                    <table style="width: 95%; margin-top: 20px">
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnUpdate" runat="server" Text="Güncelle" CommandName="Update" Width="70px">
                                                                </asp:Button>
                                                            </td>
                                                            <td style="text-align: center">
                                                                <asp:Button ID="btnDelete" runat="server" Text="Sil" CommandName="Delete" Width="70px">
                                                                </asp:Button>
                                                            </td>
                                                            <td style="text-align: right">
                                                                <asp:Button ID="btnCancel" runat="server" Text="Vazgeç" CommandName="Cancel" Width="70px">
                                                                </asp:Button>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                </table>
                            </fieldset>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <fieldset class="fieldset">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <table cellpadding="0" cellspacing="5">
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblName" runat="server" Text="Adı:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtName" runat="server" Text='<%#Bind("Name")%>' Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblAddress" runat="server" Text="Address:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address")%>' Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCountry" runat="server" Text="Ülke:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="comboCountries" runat="server" AutoPostBack="True" Width="200px"
                                                            OnSelectedIndexChanged="comboCountriesInsert_SelectedIndexChanged" OnDataBinding="comboCountriesInsert_DataBinding">
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblCity" runat="server" Text="Åžehir:" Width="100px"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="comboCities" runat="server" Width="200px">
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                            </table>
                                            <tr>
                                                <td>
                                                    <table style="width: 95%; margin-top: 20px">
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnPerformInsert" runat="server" Text="Ekle" CommandName="PerformInsert"
                                                                    Width="70px"></asp:Button>
                                                            </td>
                                                            <td style="text-align: center">
                                                                <asp:Button ID="btnCancel" runat="server" Text="Vazgeç" CommandName="Cancel" Width="70px">
                                                                </asp:Button>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                </table>
                            </fieldset>
                        </InsertItemTemplate>
                        <EmptyDataTemplate>
                            <fieldset style="width: 800px">
                            </fieldset>
                        </EmptyDataTemplate>
                    </telerik:RadListView>
                </asp:Panel>
                <div style="clear: both">
                </div>
            </div>
        </div>
    </div>
</asp:Content>
Viktor Tachev
Telerik team
 answered on 11 Dec 2013
4 answers
92 views
Hi,

I need help in hierarchical grid, in hierarchical grid I want to do expand/collapse only for those which have child items and I want to remove the duplicate rows not from the "Data Layer". From grid settings is it possible. Thanks in advance.

Thanks,
Akki
Maria Ilieva
Telerik team
 answered on 11 Dec 2013
5 answers
93 views
Greetings,

I have a RadComboBox in an EditItemTemplale that uses LoadOnDemand. In the OnItemsRequested method, I need to access the RadComboBox's input value (not selected value), but have had no luck. I have researched and tested many solutions/examples of similar issues without any success.

Thanks,
SteveO...
JSON
Top achievements
Rank 1
 answered on 11 Dec 2013
3 answers
203 views
Hi! Please see attached file for the issue. I am using Telerik version 2010. This issue occur in IE but in firefox it work well. Thanks.
Ianko
Telerik team
 answered on 11 Dec 2013
1 answer
26 views
When user select a tab in the default browser of the Android mobile phone, the page will scroll to the top.
Dimitar
Telerik team
 answered on 11 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?