Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
173 views
Hello,

For client-side binding, it doesn't seem like it uses the <AppointmentTemplate>; is there a template it can use on client-side, or pretty much to display a custom template I need to create it programmatically through the AppointmentDataBound event?

Thanks.
Peter
Telerik team
 answered on 16 Feb 2012
1 answer
111 views
Hi Telerik,

To reproduce the scenario:

1. Create a .aspx page.
2. Add one script manager.
3. Add one update panel.
4. Add two buttons A and B (or whatever other controls to make postbacks) and one RadGrid inside the update panel.
5. Configure the grid to show some items in a column template. Configure the data binders.
6. Add a RadSocialShare control in the column template (to show for each item).
7. Configure the RadSocialShare control with some buttons (facebook, twitter, etc). Important: Do not add the SendEmail button yet!
8. Configure the two buttons A and B added in number 4. Do some kind of task to change the grid (sort, filter, ...). 
9. Run the page and you will see that everything is Ok. Buttons A and B, grid and social share buttons are working.
--> Now the BUG
10. Add the SendEmail button to the RadSocialShare control and run the page. The two buttons A and B don't work anymore. It seems that the autogenerated form for the SendEmail button generates some kind of js conflict. The error message follows.

(Error displayed in Chrome's dev tools):

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Impossible d'annuler l'inscription de UpdatePanel avec l'ID '', car il n'était pas inscrit auprès de ScriptManager. Cela peut se produire si UpdatePanel a été supprimé de l'arborescence du contrôle et rajouté ensuite, ce qui n'est pas pris en charge.
 
Nom du paramètre : updatePanel
Sys.WebForms.PageRequestManager._endPostBackTelerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._parseDeltaTelerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._onFormSubmitCompletedTelerik.Web.UI.WebResource.axd:15
(anonymous function)Telerik.Web.UI.WebResource.axd:6
(anonymous function)Telerik.Web.UI.WebResource.axd:6
Sys.Net.WebRequest.completedTelerik.Web.UI.WebResource.axd:6
_onReadyStateChange
 
Thanks,

John.
Marin Bratanov
Telerik team
 answered on 16 Feb 2012
5 answers
91 views
ChartSeries objSeriesActual = new ChartSeries("Actual", ChartSeriesType.Bar);
foreach (FinanceData objFinanceData in actualFinanceDataList)
{
    objSeriesActual.AddItem(objFinanceData.Revenue, objFinanceData.Revenue.ToString());
}
 
 
ChartSeries objSeriesBudget = new ChartSeries("Budget", ChartSeriesType.Bar);
foreach (FinanceData objFinanceData in budgetFinanceDataList)
{
    objSeriesBudget.AddItem(objFinanceData.Revenue, objFinanceData.Revenue.ToString());
}
 
 
revenueFinanceChart.Series.Add(objSeriesActual);
revenueFinanceChart.Series.Add(objSeriesBudget);
revenueFinanceChart.DataBind();

Dear Telerik,

I have made a chart that displays two series of actual and budget finance data for some companies. I would like to now replace the xaxis labels 1, 2, 3 etc underneath the bars with the name of the companies. I want this to be picked up from the financedata lists such as
using objSeriesActual.PlotArea.XAxis.AxisLabel.TextBlock.Text = objFinanceData.Name but this does not work; reference to object not found.
How can I accomplish this?
Evgenia
Telerik team
 answered on 16 Feb 2012
1 answer
80 views
Hi,

I see a few posts here on the slider.repaint(); and RadSlider1.ClientID as a possible fix.  We implemented this in order to allow a div/modal to appear without reloading the whole page.  No joy.

Here's the code:
function ShowDiv() {
                            var MainSearchDivID = '<%=MainSearchDiv.ClientID %>';
                            var MainD = document.getElementById(MainSearchDivID);
                            MainD.style.display = "block";

                            var btnShowDivID = '<%=btnShowDiv.ClientID %>';
                            var btnHideDivID = '<%=btnHideDiv.ClientID %>';

                            var btnShow = document.getElementById(btnShowDivID);
                            var btnHide = document.getElementById(btnHideDivID);

                            btnShow.style.display = "none";
                            btnHide.style.display = "block";
                            var slider = $find("<%= RadSlider1.ClientID %>");

                            slider.repaint();
                            return false;

                        }

We add the ShowDiv on the link which opens the div and yet the first panel shows nothing with the slider.  The slider uses letters a through z.  When you click 'b' you'll see the values associated with letter b and when you select a, you'll see the values associated with letter a.  It is as if the radslider1.clientid isn't recognized and that's why the results aren't populating.

Before my forehead finds the keyboard one more time...thoughts?   What are we missing.
Svetlina Anati
Telerik team
 answered on 16 Feb 2012
3 answers
189 views
I am creating a keyboard shortcuts for various actions on a page that uses the Telerik toolbar. In particular, I want Ctrl+S to save the inputted form info. There is already a Save button on our toolbar, so we want to just use a script to generate a click on that button rather than reconstruct the POST manually (which would be quite complicated). I am using John Resig's jQuery hotkey plugin, which is what is handling the bind statement. In all browsers, the selection of the Save button element or any of the related divs works.

The click registers perfectly in Firefox and IE9, but in Chrome the click does not work at all. Why might this be? The actual code is within a product that I can't really replicate here, but I've made a dummy page to the same effect. Here are the relevant snippets:

JS:
(function($) {
    $(document).ready(function() {
        $(document).bind('keydown', 'ctrl+s', function() {
        $("div#RadToolBar .rtbOut").click();
            return false;
        });
    });
})(jQuery);

ASPX:
<div class="save-button">
<telerik:radtoolbar id="radToolBar" runat="server" cssclass="toolbar">
  <items>
    <telerik:radtoolbarbutton navigateurl="~/default.aspx" postback="false" text="Goto Default Page" causesvalidation="false"/>
  </items>
</telerik:radtoolbar>
</
div>
Dimitar Terziev
Telerik team
 answered on 16 Feb 2012
3 answers
88 views

Why does my horizontal and vertical menus which use a background image and are totally controlled by the CSS settings work fine in IE 8, and Firefox and Safari

While in Chrome there is no images, no text formatting - just blue underlined links?  The sub menus do slide in and out but they are also just boring blue links?

Where do I hit Chrome to make it behave like the others?

Kate
Telerik team
 answered on 16 Feb 2012
1 answer
210 views
I am trying to access datakeyvalue in itemdatabound event of inner grid.This is code I am trying.
aspx;
<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="true"
            DataSourceID="SqlDataSource1" AllowSorting="true" OnItemDataBound="RadGrid1_ItemDataBound"
            OnItemCreated="RadGrid1_ItemCreated">
<MasterTableView DataKeyNames="Storename" CommandItemDisplay="Top">
               
                <NestedViewSettings DataSourceID="SqlDataSource2">
                    <ParentTableRelation>
                        <telerik:GridRelationFields MasterKeyField="CustomerID" DetailKeyField="CustomerID" />
                    </ParentTableRelation>
                </NestedViewSettings>
                <NestedViewTemplate>
<telerik:RadGrid runat="server" ID="RadGrid2" DataSourceID="SqlDataSource2" OnItemDataBound="RadGrid2_ItemDataBound"
                            AllowSorting="true" AutoGenerateColumns="false">
                            <MasterTableView DataKeyNames="Orders" >
</MasterTableView>
                        </telerik:RadGrid>
                    
                </NestedViewTemplate>
 </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 16 Feb 2012
2 answers
80 views

i have a slider without items. i want to create items manually and set selected style bold. 
is it possible?

regards

Ömer
Slav
Telerik team
 answered on 16 Feb 2012
6 answers
148 views

Hi,

I am debugging a lot the last days and I was wondering if it's normal that VS2010 get flooded by script blocks.
Just run the following markup without any code behind in debug and watch your project-explorer.
After a few seconds the view is flooded with script blocks ... it seems that the same script blocks from the controls get registered again on every ajax request. Is there a way to prevent that ?
My VS 2010 sometimes needs 2 minutes to stop debugging and I can watch it removing the script blocks which is a real pain in the a..

<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Timer1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<asp:Timer ID="Timer1" runat="server" Enabled="true" Interval="1000">
</asp:Timer>   
<div>
    <telerik:radgrid ID="grid1" runat="server"></telerik:radgrid>
</div>
</form>

 

Frans
Top achievements
Rank 1
 answered on 16 Feb 2012
3 answers
121 views
I am using the ItemCreated event to retrieve a logo from the database for any items that are added to it.  The code also updates a "Point Total" for the items in the ListBox once the new item has been created.  This all is working fine.

However when I step through the code I find that the ItemCreated method is getting called for all existing items in the ListBox as well as the newly added one.  To make it worse it seems the ItemCreated method is called for every existing item in the ListBox whenever the SelectedIndexChanged event is raised as well.  Is this normal behaviour?

Here is my ItemCreated code snippet:

protected void listEntity_ItemCreated(object sender, RadListBoxItemEventArgs e)
        {
            RadListBox listBox = (RadListBox)sender;
 
            RadListBoxItem item = e.Item;
 
            LMEntityEntity entity = new LMEntityEntity(int.Parse(item.Value));
 
            RadBinaryImage entityLogo = (RadBinaryImage)item.FindControl("entityLogo");
            if (entity.Logo.Length > 0)
                entityLogo.DataValue = entity.Logo;
            else
                entityLogo.ImageUrl = "~/images/faction-icons/" + _factionName.ToLower() + ".jpg";
            item.DataBind();
 
            UpdatePointTotal(listBox);
        }

And here is my ListBox declaration in the HTML:

<telerik:RadListBox ID="upgradesListBox" runat="server" width="400px" DataKeyField="LMEntityIdChild"
                                Height="170px" CssClass="list-box" Skin="Black" AllowDelete="False" DataValueField="LMEntityIdChild"
                                AllowTransfer="True" TransferToID="listEntityListBox"
                                AutoPostBack="false" AllowReorder="False"
                                onitemdatabound="upgrades_ItemDataBound" AllowTransferDuplicates="True"
                                AllowTransferOnDoubleClick="True" AutoPostBackOnTransfer="True"
                                ontransferring="upgrades_Transferring" TransferMode="Copy">
                                <ItemTemplate>
                                    <telerik:RadBinaryImage id="logoImage" runat="server" CssClass="list-box-icon"
                                        DataValue='<%# (int)(Eval("LMEntity.Logo.Length"))>0?Eval("LMEntity.Logo"):null %>' height="20px" ResizeMode="Fit" width="20px" />
                                    <span class="list-box-text"><asp:Label ID="itemLabel" runat="server"></asp:Label></span>
                                </ItemTemplate>               
                                <ButtonSettings ShowTransferAll="False" TransferButtons="TransferFrom" />
                            </telerik:RadListBox>

Regards,
Andrew
Peter Filipov
Telerik team
 answered on 16 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?