Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
126 views
Hi!

I'm setting the default text in the radsearchbox serverside. how can I perform a automatic dropdown with search results of the radsearchbox?

is it possible to trigger the ondatarequest event with javascipt?

Thank you!

Bernie
Top achievements
Rank 1
 answered on 12 Aug 2014
1 answer
131 views
Hi,

I am unable to do filtering on the GridTemplateColumn. 

<telerik:GridTemplateColumn HeaderText="<%$ Resources:UI, EmployeeNotesTab_HeaderText_coContact_Contact %>" UniqueName="Contact" DataField="coContact.ExtFormattedFullName">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<ItemTemplate>
<asp:Literal ID="lblContact" runat="server" Text='<%# Eval("coContact.ExtFormattedFullName") %>' />
<div>
<small><asp:Label ID="lblFormattedPhone" runat="server" CssClass="darkBlueFont" Text='<%# GetFormattedPhone(Eval("coContact")) %>' /></small></div>
<div><small><asp:Label ID="lblContactType" runat="server" CssClass="darkBlueFont" Text='<%# Eval("coContact.coContactType.typeName") %>' /></small></div>
</ItemTemplate>
</telerik:GridTemplateColumn>

coContact.ExtFormattedFullName is throwing "Object reference not set to an instance of an object" NullReferenceException. 

The <asp:Literal> is displaying the data properly in the column. (Attached is the screenshot).

Please share your thoughts as to how this can be fixed.

Regards,
Sriram
Radoslav
Telerik team
 answered on 12 Aug 2014
2 answers
118 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
121 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
302 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
176 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
671 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
168 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
93 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
150 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?