Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
87 views
Hai All,

consider that , i am having one radcombo and one radgrid. if i will change the item in combo means, the appropriate data will load in radgrid.
 
In my radgrid , i have used inline EditItemTemplate.  if i will click (2nd row) edit column means,that row become edit mode. Now i am going to change the comboitem. so that the data in grid will change in comboselectedIndexchange even. But still the 2nd row in edit mode . i have used grid.rebind() too.


how to refresh the row mode when i will reload the grid?
Prabha
Top achievements
Rank 1
 answered on 12 Aug 2014
5 answers
100 views
Hi,
I would like to create a recurring appointment  for rad scheduler, these  master and child appointments should have unique appointment Id in database.
Master and child appointments should be physically present in database table.
I should also be able to edit/delete individual appointment or the series in one shot. Can someone point me to a working sample?

Thanks,
Prava
Boyan Dimitrov
Telerik team
 answered on 12 Aug 2014
3 answers
270 views
Is it possible to set default values for filters within PivotGrid?

For example, within my PivotGrid I have a Column Field 'Year', and I want this to be automatically filtered by the past 2 years on load. 
Viktor Tachev
Telerik team
 answered on 12 Aug 2014
4 answers
131 views
Hi,

    I am using a user control with the RadComobox with Header and Item Templates as follows,

.aspx,


               <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeesList.ascx.cs" Inherits="Sampige.Web.iprocessWebPortal.SiteAdmin.UserControls.EmployeesList" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>

<div style="width: 250px">
    <table>
        <tr>
            <td>
              <%-- <rad:RadComboBox ID="cmbEmployee" runat="Server" Width="150px" DataTextField="EmployeeName" DropDownWidth="200px"
                            DataValueField="EmployeeID" AutoPostBack="true" >
               </rad:RadComboBox>--%>
               <rad:RadComboBox ID="cmbemployeeselector" runat="server" Width="160px" HighlightTemplatedItems="true" ForeColor="Black" Filter="StartsWith"
                 DataTextField="EmployeeName" DropDownWidth="450px"
                DataValueField="EmployeeID" CausesValidation="false">
                
                <HeaderTemplate>
                    <table style="width: 100%;" cellspacing="0" cellpadding="0">
                        <tr>
                            <td style="width: 33%; ">
                              Employee Name
                            </td>
                            <td style="width: 33%;">
                               Area Name
                            </td>
                            <td style="width: 30%;">
                              Group Name
                            </td>
                        </tr>
                    </table>
                </HeaderTemplate>
                <ItemTemplate>
                    <table style="width: 100%;" cellspacing="1" cellpadding="1">
                        <tr>
                            <td style="width: 33%;">
                                <%# DataBinder.Eval(Container, "Attributes['EmployeeName']")%>
                            </td>
                            <td style="width: 33%;">
                                <%# DataBinder.Eval(Container, "Attributes['AreaName']")%>
                            </td>
                            <td style="width: 30%;">
                                <%# DataBinder.Eval(Container, "Attributes['GroupName']")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </rad:RadComboBox>
            </td>
           
           
        </tr>
    </table>
</div>

.aspx.cs,
========

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using Sampige.BLL.Inspector;

namespace Sampige.Web.iprocessWebPortal.SiteAdmin.UserControls
{
    [ValidationProperty("EmployeeID")]
    public partial class EmployeesList : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Page_Init(object sender, EventArgs e)
        {

            GetEmployees();
        }


        public string EmployeeID
        {

            get
            {
                return cmbemployeeselector.SelectedItem.Value;
               
            }
            set
            {
                ViewState["EmployeeID"] = value;
                SetComboItem(value, null);
            }
        }

        private void SetComboItem(string Value, string Text)
        {
            if (Value != null && Value != string.Empty)
            {
                
                cmbemployeeselector.SelectedItem.Value = Value;
            }
            else
                GetEmployees();
        }

         public void GetEmployees()
        {
            DataTable dt = InspectorReport.LoadEmployeesList();
            cmbemployeeselector.Enabled = true;
            cmbemployeeselector.Items.Clear();
            RadComboBoxItem itemAll = new RadComboBoxItem();
            itemAll.Text = "--Select--";
            itemAll.Value = "-1";
            itemAll.Attributes.Add("EmployeeName", "--Select--");
            itemAll.Attributes.Add("AreaName", "--Select--");
            itemAll.Attributes.Add("GroupName", "--Select--");
            cmbemployeeselector.Items.Add(itemAll);
            cmbemployeeselector.SelectedValue = "-1";
            itemAll.DataBind();
            
            foreach (DataRow dataRow in dt.Rows)
            {
                RadComboBoxItem item = new RadComboBoxItem();

                item.Text = (string)dataRow["EmployeeName"];
                item.Value = dataRow["EmployeeID"].ToString();

                string ItemCode = dataRow["EmployeeName"].ToString();
                string ItemType = dataRow["AreaName"].ToString();
                string AreaName = dataRow["GroupName"].ToString();

                item.Attributes.Add("EmployeeName", ItemCode);
                item.Attributes.Add("AreaName", ItemType);
                item.Attributes.Add("GroupName", AreaName);

                cmbemployeeselector.Items.Add(item);
                item.DataBind();
            }

            //cmbemployeeselector.SelectedValue = "-1";
        }

    }
    
}





When i use this user control in some another page i'm not getting the Required Filed Message in a Message box,

  <employeecombo:EmployeesList ID="Enteredby" runat="server" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator98" Display="Dynamic" runat="server"
                    ValidationGroup="Inspection" ErrorMessage="Entered by is Required" ControlToValidate="Enteredby"
                    InitialValue="-1"></asp:RequiredFieldValidator>


In this aspx page I am using that user control and i am not getting the Required Field Validation Message in a Message Box..
But it is showing a message(summary message) after i click on a save button.....
But no where i am able to get the Message box..,


Pls Help me...
Thanks in Advance.









    
Balageetha
Top achievements
Rank 1
 answered on 12 Aug 2014
1 answer
640 views
Hi,
till now I tried to search forums for about 3 hrs, no effort.

I have a RadGrid w MasterTable and DetailTable in it.
The Master contains list of groups, Detail can show members of groups.
Both table data are persisted in viewstate, having added column to store selection of records.

I've added a checkbox for selecting the whole group to the MasterTable. The detail table also contains an added checkbox to select any of the members individually. On checkedChanged the values in underlying data tables are set accordingly (when group is selected, all members are selected too, when any member is unselected, the group is set to loose selection thus not all member are selected any more) - that works fine.

What i am trying to do is:
If there exists at least 1 selected member in the group, I want the detail to remain expanded, but cannot find any way to do this.

My last try was to place a foreach loop in pageload_Complete to iterate through the underlying data searching for checked (selected) members.
When such a member is found, I tell the RadGrid to .Expanded = true for the according group, but it does not happen.

Even when I step through the methods and check the state of .Expanded after setting it to true, it still remains false. Why?
Vladimír
Top achievements
Rank 1
 answered on 12 Aug 2014
3 answers
137 views
Hello all,

I am using RadScheduler with reminder. When i schedule an recurring activity with an alert. Then Alert window will appear for me. From the Alert window i can open my activity. But it will open all occurrence of the recurring activity. And if i do any changes in that activity then changes will applied to all occurrences. Is there any way that if i want to open the recurring activity from an alert window then it will ask for Open Single Occurrence of the activity  or Open all occurrence of the activity.
Boyan Dimitrov
Telerik team
 answered on 12 Aug 2014
1 answer
63 views
 <telerik:RadWindow ID="RadWindow1AddProductFromQuote" runat="server" IconUrl="none" AutoSizeBehaviors="Default" Behaviors="Close" Width="595px" Skin="Black" Height="365px" AutoSize="false" Modal="true" >
            <ContentTemplate>
                <telerik:RadGrid ID="radgridProductfromqoute" Width="97%" Style="margin: 0 auto;" runat="server" AutoGenerateColumns="false" EnableHierarchyExpandAll="true"
                    PageSize="20" Skin="Black" OnNeedDataSource="radgridProductfromqoute_NeedDataSource" AllowFilteringByColumn="false" OnDetailTableDataBind="radgridProductfromqoute_DetailTableDataBind">
                      <ClientSettings>
                    <ClientEvents OnHierarchyExpanded="OnHierarchyExpanded" />
                    
                </ClientSettings>
                    <MasterTableView DataKeyNames="QuotationID" ClientDataKeyNames="QuotationID"  HierarchyLoadMode="Client">
                        <Columns>
                             <telerik:GridTemplateColumn HeaderText="Quotation No" UniqueName="QuotationID">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationID" runat="server" Text='<%# Eval("QuotationID") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Quotation No" UniqueName="QuotationNo">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationn" runat="server" Text='<%# Eval("QuotationNo") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Quotation Date" UniqueName="Quotationdate">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationDate" runat="server" Text='<%# Eval("QuotationDates") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Company Name" UniqueName="Company">
                                <ItemTemplate>
                                    <asp:Label ID="lblCompanyName" runat="server" Text='<%# Eval("CompanyName") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>

                        <DetailTables>
                            <telerik:GridTableView Name="calldetails"  Width="100%" AllowPaging="false" ItemStyle-BackColor="#6C7170" AlternatingItemStyle-BackColor="#666666"
                                AutoGenerateColumns="false" align="center" CssClass="Businessgrid" AllowFilteringByColumn="false">
                                <Columns>
                                    <telerik:GridTemplateColumn HeaderText="Description">
                                        <ItemTemplate>
                                            <asp:Label ID="lblItemDescription" runat="server" Text='<%# Eval("ItemDescription") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Qty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblQty" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="VAT">
                                        <ItemTemplate>
                                            <asp:Label ID="lblVAT" runat="server" Text='<%# Eval("VATPercentage") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Cost Price">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCost" runat="server" Text='<%# Eval("CostPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Selling Price">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSelling" runat="server" Text='<%# Eval("SellingPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Sub Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSubTotal" runat="server" Text='<%# Eval("TotalAmount") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTotal" runat="server" Text='<%# Eval("MarginAmount") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblItemID" runat="server" Text='<%# Eval("QuotationTransID") %>'></asp:Label>
                                            <asp:CheckBox ID="chkProduct" runat="server" ></asp:CheckBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <NoRecordsTemplate>
                                    <div>
                                        No call details found
                                    </div>
                                </NoRecordsTemplate>
                            </telerik:GridTableView>
                        </DetailTables>
                        <NoRecordsTemplate>
                            <div>
                                No call details found
                            </div>
                        </NoRecordsTemplate>
                    </MasterTableView>
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                </telerik:RadGrid>  here i need "lblItemID" this control value find any buddy help me........







Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
1 answer
119 views
I have a saved the multiple checked items into my database, when I retrieve out the records, it only checked one item in the listbox instead of multiple. I have also verified that the records returned in the datatable contains 3 records.

aspx:
 <telerik:RadListBox ID="lbxDevelopmentComponent" SelectionMode="Multiple" runat="server" OnClientItemChecked="OnClientItemChecked"
                                        CheckBoxes="true" DataTextField="Text" DataValueField="Value" Width="500px" Height="150px">
                                    </telerik:RadListBox>

.cs:
var dtDevelopmentComponent = _objSqlManager.ExecuteSQL(sqlDevelopmentComponent.ToString(), paramDevelopmentComponent);

                        if (dtDevelopmentComponent.Rows.Count > 0)
                        {
                            for (int i = 0; i < dtDevelopmentComponent.Rows.Count; i++)
                            {
                                RadListBoxItem item = lbxDevelopmentComponent.FindItemByText(dtDevelopmentComponent.Rows[0]["DEVELOPMENT_COMPONENT_NAME"].ToString());
                                if (item != null)
                                    item.Checked = true;
                            }
                        }
Bozhidar
Telerik team
 answered on 12 Aug 2014
3 answers
138 views
Hi , 

I am trying to display line chart dynamically and get displayed in my panel. I don't understand what I am doing wrong. Please help.

I have this in my .aspx file
      <asp:Panel ID="Panel3" runat="server"  style="float:left;width:45%;">
             <telerik:RadHtmlChart ID="RadHtmlChart3"  runat="server" ChartTitle-Text="Dynamic Line Series">
             </telerik:RadHtmlChart>         
      </asp:Panel>

and the following code in aspx.cs file
 if (DropDownList1.SelectedValue == "Line")
        {
            SqlConnection sqlConn3 = new SqlConnection(ConfigurationManager.ConnectionStrings["xxxx"].ConnectionString);
            SqlCommand SqlCmd3 = new SqlCommand("Select ST as state, count(*) as no_of_cust FROM CUSTOMER group by ST", sqlConn3);
            SqlCmd3.Connection.Open();
            SqlDataReader reader3 = SqlCmd3.ExecuteReader();

            DataTable dt = new DataTable();
            dt.Columns.Add("State_col");
            dt.Columns.Add("No_Customers");
            if (reader3.HasRows)
            {
                while (reader3.Read())
                {
                    dt.Rows.Add(reader3.GetValue(0).ToString(), reader3.GetInt32(1));
                }
            }

            var columns = new List<string>();
            for (int i = 0; i < reader3.FieldCount; i++)
            {
                columns.Add(reader3.GetName(i));
            }
            RadHtmlChart3.ChartTitle.Text = "My dynamic Line Chart";
            RadHtmlChart3.ChartTitle.Appearance.Align = Telerik.Web.UI.HtmlChart.ChartTitleAlign.Center;
            RadHtmlChart3.ChartTitle.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartTitlePosition.Top;
            RadHtmlChart3.Legend.Appearance.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.Legend.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartLegendPosition.Bottom;
            RadHtmlChart3.PlotArea.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
 //           RadHtmlChart3.PlotArea.XAxis.Color = System.Drawing.Color.Azure;
            RadHtmlChart3.PlotArea.XAxis.MajorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.MinorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.Reversed = false;
            RadHtmlChart3.PlotArea.XAxis.DataLabelsField = columns[0];

            RadHtmlChart3.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0}";
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.YAxis.MajorGridLines.Color =  System.Drawing.ColorTranslator.FromHtml("#EFEFEF");
            RadHtmlChart3.PlotArea.YAxis.MinorGridLines.Color = System.Drawing.ColorTranslator.FromHtml("#F7F7F7");
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Position = Telerik.Web.UI.HtmlChart.AxisTitlePosition.Center;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.TextStyle.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.XAxis.TitleAppearance.Text = columns[0];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];

           ScatterLineSeries slineSeries = new ScatterLineSeries(); 
            slineSeries.LabelsAppearance.Visible = false;
            slineSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.LineAndScatterLabelsPosition.Below;
            slineSeries.LabelsAppearance.DataFormatString = "{0}%";
            slineSeries.TooltipsAppearance.DataFormatString = "{0}%";
            slineSeries.DataFieldX = columns[0];
            slineSeries.DataFieldY = columns[1];
         
           RadHtmlChart3.PlotArea.Series.Add(slineSeries);
            RadHtmlChart3.DataSource = reader3;
            RadHtmlChart3.DataBind();
   }
}


Thank you
    







Danail Vasilev
Telerik team
 answered on 12 Aug 2014
5 answers
594 views
I have searched the forums and google to try and figure this out but I am at a loss, any help is much
appriciated.

Problem is when the content page is not in the same folder as the masterpage, the rad controls stop working

Folder structure
WebApplication
       Site1.Master  - contains radtreeview
Admin
    WebForm1.aspx  - blank content page
In this example the radtreeview in master page stops working, the javascript seems to be the problem,
no client side features work, not even just the default expand collapse

If I put the master page and the content page in the same directory all works as expected.

An example page that is not working can be viewed here
http://simplyfundraising.ageektech.com/webapplication/admin/webform1.aspx

Thank you.
      

Sunit
Top achievements
Rank 1
 answered on 12 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?