Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
143 views
hi
i have a problem with nested view templates.
my problem is that in nested view grid the parent items also are shown in background!
i attach a file to show my problem.
what the problem is?
Eyup
Telerik team
 answered on 10 Aug 2012
1 answer
51 views
Hello,

I'm using RadDatePicker in IE9 and I have this issue:

- The calendar popup shows correctly but I can not click any thing. Sometimes when I insist many times over, there are a small areas that are recognized as a link for a few moment, but I can't click.

In other browsers works fine.

I'm using the release v.2012.2.724.40

<telerik:RadDatePicker ID="FechaFin" runat="server" Width="140px" AutoPostBack="true" DateInput-EmptyMessage="Fecha de Fin" MinDate="01/01/1000" MaxDate="01/01/3000" Skin="Sunset">
     <Calendar ID="Calendar1" runat="server">
           <SpecialDays>
                  <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
           </SpecialDays>
     </Calendar>
</telerik:RadDatePicker>

Can you help me, please?

Thanks!

Kostadin
Telerik team
 answered on 10 Aug 2012
1 answer
178 views
I have a CustomValidator validating a RadTextBox. The validator calls the js method "validateEmail". However, it gets called twice which is causing an issue.

It seems to be calling twice because there are 2 input controls. 1 hidden and 1 visible. How do I make it call only once?
Vasil
Telerik team
 answered on 10 Aug 2012
3 answers
80 views
Hi
I'm using RadControlsQ1 2007. I load nodes on demand using ServerSideCallBack mode. I want to enable drag and drop on nodes created dynamically.

Drag and drop is set to true; the event handler is present. Please note, drag and drop works fine for node created declaratively on .asp page. The problem is with the nodes I create on code beside.

You may even point me to an example as long as it shows drag and drop on dynamic nodes.

Kindest regards,
Thulani
Ivana
Telerik team
 answered on 10 Aug 2012
1 answer
72 views
Is it possible to have guided search filtering as seen on Newegg's site when searching? See attached image.
Tsvetina
Telerik team
 answered on 10 Aug 2012
12 answers
284 views
I recently upgraded to the Q2 2012 controls and immediately started having an issue with my search button.  User can enter a name to search.  Pressing ENTER will begin the search.  I initiate the click event when the ENTER key (keyCode=13) is pressed.  In the previous release this worked perfectly.  Now I must put in a delay because there is no value returned from the get_value() on the first attempt.  Can this be explained??  I have included code and jpg images showing the alert get_value() in sequence.  I keyed in "bee" into the text box and pressed ENTER.  The jpgs show the results.

I am putting in a slight delay to correct for the moment.  I would really like an explanation because now I worry I'm going to find other issues.
Thanks
John

<telerik:RadTextBox ID="txtSearch" runat="server" EmptyMessage="Enter First or Last Name..."
 Width="145px" Skin="WebBlue">
 <PasswordStrengthSettings IndicatorWidth="100px" />
 <ClientEvents OnKeyPress="onKeyPressed" />
</telerik:RadTextBox>

function onKeyPressed(sender, args) {
 var search = $find("<%= btnSearch.ClientID %>");
 //ENTER key pressed on Search
 if (args.get_keyCode() == 13) {
  alert('Value=' + sender.get_value() + '  Time=' + Date());
  alert('Value=' + sender.get_value() + '  Time=' + Date());
  search.click();
  args.set_cancel(true);
 }
}


 

 

 

 

 

 

Vasil
Telerik team
 answered on 10 Aug 2012
1 answer
313 views
(The title of this thread is not quite accurate.  The title should be: "A RadComboBox event SelectedIndexChanged fires when the control is programmatically checked with exactly one checkbox item")

I have a RadComboBox that contains CheckBox items.  I programmatically set certain items as Checked, if data exists in a database table.  Here is a segment of code:

Dim idr As Data.DataRow
Dim ids As Data.DataSet
  
Dim idt As Data.DataTable
Dim idtData As New Data.DataSet
  
Dim iParameters(0 To 0) As Data.SqlClient.SqlParameter
iParameters(0) = New Data.SqlClient.SqlParameter("@intBIDOID", CheckDBNull(CInt(BIDOID), enumObjectType.IntType))
  
ids = clsEPD_DATA.StoredGetDataset("spGetBidsSystemTypeNames", iParameters)
  
If ids.Tables(0).Rows.Count >= 1 Then
    idt = ids.Tables(0)
  
    For Each idr In idt.Rows
  
        ' "BUG" - when one and ONLY one item is check-marked, here, it causes the control to
        ' be in a state as if SelectedIndex has been changed (Telerik states this is expected).
        ' And, it stays that way, even though we set it here, and the user did NOT change anything.
        ' This is a "bug" in our scenario, where I must determine if the USER DID THE CHANGE,
        ' not the program.
  
        Dim cboSTObject As RadComboBoxItem = cboSystemType.FindItemByValue(CheckDBNull(idr("SYSTOID"), enumObjectType.IntType))
        cboSTObject.Checked = True
        cboSTObject.Dispose()
  
    Next
  
    ids.Dispose()
  
End If
  
'------------ end of System Type checkboxed combobox ----------------------

Here is the aspx snippet:

<telerik:RadComboBox ID="cboSystemType" runat="server" Width="200px"
EmptyMessage="Select the System Type (if any):"
Height="250px" DataTextField="ST_Name" DataValueField="SYSTOID"
DataSourceID="SqlDataSource5" TabIndex="8" CheckBoxes="True"
CausesValidation="False"></telerik:RadComboBox>
<br/>
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:EPD_DATAConnectionString %>"
SelectCommand="spGetBidSystemTypeNames" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>

What I would like to do is create code such that when my programmatic method changes the index (which appears only to occur when only ONE items is check-marked, but never when zero, or two or more, items are check-marked by the program), that I can somehow set the SelectedIndex code to ignore it, but when the USER MAKES A CHANGE, then I pay attention to it.  Should I create an internal variable "flag" in my program to somehow watch for when I make changes programmatically, but clear the flag?  This seems clunky.

Any guidance would be appreciated.  Thank you.
Kalina
Telerik team
 answered on 10 Aug 2012
3 answers
129 views

I got what I thought was a really simple example to test the drilldown capability of the orgchart, but I'm getting an errror:
Sys.WebForms.PageRequestManagerServerErorrException :Object reference not set to an instance of an object.
I get this when I click on the little icon next to someone's name to drill down.
The page comes up fine and displays the chart, so I know there's nothing wrong with the query.
Here's the bare bones code:
Thanks ... Ed

<%@ Page Title="" Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="TestOrgChart.aspx.cs" Inherits="SysAdmin_TestOrgChart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cntHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cntPageBody" Runat="Server">
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" >
        <telerik:RadOrgChart runat="server" ID="org1" EnableDrillDown="true">
 
        </telerik:RadOrgChart>
</telerik:RadAjaxPanel>
 
 
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using MyDB;
 
public partial class SysAdmin_TestOrgChart : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadChart();
        }
    }
    private void LoadChart()
    {
        MyDataContext db = new MyDataContext();
            var qry = from a in db.STAFFs
                      select new { a.STAFF_SEQ,
                                          a.PARENT_STAFF_SEQ,
                                          FullName = a.LAST_NAME + ", " + a.FIRST_NAME };
 
 
            org1.DataSource = qry.ToDataTable();
            org1.DataFieldID = "STAFF_SEQ";
            org1.DataFieldParentID = "PARENT_STAFF_SEQ";
            org1.DataTextField = "FullName";
            org1.DataBind();
            org1.DisableDefaultImage = true;
    }
}
 
  
</asp:Content>


Ed Staffin
Top achievements
Rank 1
 answered on 10 Aug 2012
2 answers
106 views
Hello.
I have grid with custom aggregate in one column and export to PDF/Excel abilities. When I view in browser aggregation works ok, but there is no aggregation in exported documents. Here is my code:

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
    OnItemCreated="RadGrid1ItemCreated" OnNeedDataSource="RadGrid1NeedDataSource"
    OnCustomAggregate="RadGrid1CustomAggregate" OnExcelMLExportRowCreated="RadGrid1ExcelMlExportRowCreated"
    OnExcelMLExportStylesCreated="RadGrid1ExcelMlExportStylesCreated" AllowFilteringByColumn="True"
    AllowSorting="True" CellSpacing="0" OnItemDataBound="RadGrid1ItemDataBound">
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
        <Excel Format="ExcelML" />
        <Pdf PageTitle="Charity Print-Out" Title="Charity Print-Out" PageHeight="210mm" PageWidth="500mm"
            DefaultFontFamily="Arial Unicode MS" PageBottomMargin="20mm" PageTopMargin="20mm"
            PageLeftMargin="20mm" PageRightMargin="20mm" />
    </ExportSettings>
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="DonationId" CommandItemDisplay="Top"
        Width="100%" AllowPaging="True" NoDetailRecordsText="" NoMasterRecordsText=""
        ShowGroupFooter="true" UseAllDataFields="True">
        <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="False"
            ShowRefreshButton="False" ShowExportToPdfButton="True" />
        <PagerStyle Mode="NextPrevAndNumeric" />
        <Columns>
            <telerik:GridBoundColumn DataField="CHR_CHARITY_NAME" HeaderText="Charity Name" ReadOnly="True"
                UniqueName="CHR_CHARITY_NAME" Visible="False" />
            <telerik:GridBoundColumn DataField="DonationInternalId" HeaderText="Client Donation ID"
                ReadOnly="True" UniqueName="DonationInternalId" />
            <telerik:GridBoundColumn DataField="DonorName" HeaderText="Donor's Name" ReadOnly="True"
                UniqueName="DonorName" />
            <telerik:GridBoundColumn DataField="DonorAddress" HeaderText="Donor's Address" ReadOnly="True"
                UniqueName="DonorAddress" />
            <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="Email" ReadOnly="True"
                UniqueName="EmailAddress" />
            <telerik:GridBoundColumn DataField="PermissionToContact" HeaderText="Permission To Contact"
                ReadOnly="True" UniqueName="PermissionToContact" />
            <telerik:GridBoundColumn DataField="DateOfDonation" HeaderText="Donation Date" ReadOnly="True"
                UniqueName="DateOfDonation" />
            <telerik:GridBoundColumn DataField="NotesToCharity" HeaderText="Donor Notes" ReadOnly="True"
                UniqueName="NotesToCharity" />
            <telerik:GridBoundColumn DataField="DonationAmount" HeaderText="Donation Amount"
                ReadOnly="True" UniqueName="DonationAmount" DataFormatString="{0:C}" Aggregate="Custom"
                FooterText=" " />
        </Columns>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="CHR_CHARITY_NAME" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="CHR_CHARITY_NAME" HeaderText=" " HeaderValueSeparator=" " />
                    <telerik:GridGroupByField FieldName="CHR_BN_NUMBER" HeaderText="-" HeaderValueSeparator=" " />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
    </MasterTableView>
</telerik:RadGrid>

And code-behind:

protected void RadGrid1CustomAggregate(object sender, GridCustomAggregateEventArgs e)
{
    if (e.Item.DataItem == null)
    {
        return;
    }
    const string result = "<table style=\"border-collapse:collapse;text-align:left;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" +
                          "<tr><td style=\"text-align:left;\">Total Donations:</td><td>${0}</td></tr>" +
                          "<tr><td style=\"text-align:left;\">Processing & Transaction Fees @ 8%:</td><td>${1}</td></tr>" +
                          "<tr><td style=\"text-align:left;\">Net Donation Amount:</td><td>${2}</td></tr>" +
                          "</table>";
    double totalDonations = 0, netDonationAmount = 0, fees = 0;
    foreach (DataRow row in dataTable.Rows)
    {
        if (row["CHR_CHARITY_NAME"].ToString() != ((DataRowView)e.Item.DataItem).Row.ItemArray[0].ToString())
        {
            continue;
        }
        if (row["DonationAmount"] != null)
        {
            totalDonations += (double)row["DonationAmount"];
        }
        if (row["NetDonationAmount"] != null)
        {
            netDonationAmount += (double)row["NetDonationAmount"];
        }
        if (row["Fees"] != null)
        {
            fees += (double)row["Fees"];
        }
    }
    e.Result = String.Format(result, totalDonations.ToString("0.00"), fees.ToString("0.00"), netDonationAmount.ToString("0.00"));
}

What I am doing wrong?
Daniel
Telerik team
 answered on 10 Aug 2012
1 answer
153 views

Is it possible to apply RadGrid Styles to asp.net Grid View? Any code sample?

I found this sample (BUT this one is for Generic HTML table)
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/using-telerik-skin-on-generic-table.aspx 
 It is applying webblue theme and it is NOT applying hover color..

I am looking for Hay or Forest theme. Where can I download those files?
Tsvetina
Telerik team
 answered on 10 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?