Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
235 views
I'm using a RadTreeList which has AllowLoadOnDemand set to true.  Everything works as expected.  On top of this functionality, we would like the ability to programmatically expand certain items in the RadTreeList depending on the situation.  For example, a user would come into the screen, start expanding nodes, and then save the state of the expansion.  Currently, I am able to retrieve the ID's for the items expanded and store them appropriately, but cannot figure out how to force that specific expansion back to the RadTreeList when the user returns.  It seems that the RadTreeList always starts with only top items and I am unable to programmatically expand to the corresponding ID's since they do not exist yet within the RadTreeList until the user manually expands (calling OnChildItemsDataBind) again to the same state.

Example:
User comes to the screen, alters RadTreeList to expand only certain nodes.  User clicks save (I capture the IDs of the items expanded and store in the db),  Later, user returns to the screen (I retrieve previously expanded nodes) and user expects to see the same expansion when save was clicked. 

Thanks!
Patrick
Top achievements
Rank 1
 answered on 16 Aug 2012
6 answers
110 views
Here we can see a part of my tree:

a

|- b
|- c
|- d
|- e


I'm expanding d:

a
|- b
|- c
|- d
|  |- f
|- e

I'm expanding f:

a
|- b
|- c
|- d
|  |- f
|  |  |- g
|- e


Now I'm expandng c:


a
|- b
|- c
|  |- h
|  |  |- i
|- d
|  |- f
|- e

f is no more expanded. Instead of f, h was expanded and I see i under h instead of g under f.

All branches are bound with needdatasource events: NeedDataSource or ChildItemsDataBind for children.

The only way to fix it is:

on Page_Load event: to find all items connected to ExpandedIndexes and save their DataKeys
on ItemDataBound set item.Expanded to true/false

But when I set item.Expanded to false, it is set up back to true.

I must remove its from ExpandedIndexes manually, using Page_PreRender...

Why

item.Expanded = false

doesn't do that?
Andrey
Telerik team
 answered on 16 Aug 2012
4 answers
113 views
Hi,
I'm using the normal asp button with form decorator and want to make the button font bold but something in form decorator is overriding that. 
would you please let me know how i can do it.  
Mohammed
Top achievements
Rank 2
 answered on 16 Aug 2012
1 answer
53 views
Hello,

I don't know if this is a bug, so I thought I'd report it:

I have a RadGrid that shows details of Human Resources. In addition to things like a First Name and Last Name field, I also have a VarBinary(MAX) field that I use to store the employee's Picture. The field is simply called "Picture". 

The data is shown in a RadGrid, including the employee's picture in a BinaryImage Column. This works just fine when you run the form.

However, let's say I want to display ONE column with the employee's full name. I add a calculated field to the grid that concatenates the first, middle and last names. I then make the columns with the first, middle and last names invisible. Then I try to run the form.

I get this error:

'Dynamicclass1' does not contain a property with the name 'Picture'

This error will continue to recur until you either:
  • Remove the Calculated Column OR;
  • Remove the BinaryImage Column

Even if you take out the BinaryImage column and replace it with a TemplateColumn that uses a BinaryImage in its ItemTemplate, you'll get the same error.

I even tried creating a new Telerik Web Application from scratch, adding a declarative RadGrid, with both a Calculated Column and a BinaryImage column with NO CODE attached to the form, and the same error occurs.

I'm using Telerik RadControls for AJAX version 2012.2.724.40 (2012 Q2 SP1).  I've repeated this experiment with previous builds of RadControls for AJAX and I'm seeing the same manifestation in previous, older projects. Can anyone reproduce this error? Can anyone confirm if this is indeed a bug?

Regards,
Jonathan

Kostadin
Telerik team
 answered on 16 Aug 2012
3 answers
107 views
Referring to the attached code for my usercontrol, the comments dialog (tooltip) pops up fine and saves fine if I do not use any validators or set the save button to causesValidation="false"
If I add one or more validators (all but 1 commented out), the validation fires if I leave the field blank but if I enter text, I dont get any validation errors but the onclick doesnt fire.

Any ideas?

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ctrlDealRatings.ascx.vb" Inherits="DealNutWebsite.ctrlDealRatings" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
    <script type="text/javascript" id="telerikClientEvents1">
        //<![CDATA[
 
        function OnClientRated(controlRating, args) {
            var tooltip = $find("<%=RadToolTip1.ClientID %>");
            tooltip.show();
        }
 
        function HideTooltip(controlRating, args) {
            var tooltip = $find("<%=RadToolTip1.ClientID %>");
            tooltip.hide();
            return (false);
        }
        //]]>
    </script>
</telerik:RadCodeBlock>
 
<div id="DealRatingDiv" runat="server" visible="true" style="position:relative;top:0px;width:200px;border:0px solid red">
    <asp:Label class="CaptionSm" ID="lblCaption" runat="server" Text="Click a Nut to Rate:" style="float:left; margin-top: 6px"></asp:Label>
 
    <div style="float:left; margin-top: 0px">
 
        <telerik:RadRating ID="RadDealRating" runat="server" Skin="MyCustomSkin" AutoPostBack="false"
                           readonly="true"  EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" OnClientRated="OnClientRated"
                           Precision="half" />
    </div>
 
</div>
 
<p></p>
<telerik:RadToolTip ID="RadToolTip1" runat="server"
                    ShowEvent="FromCode" HideEvent="FromCode"
                    TargetControlID="RadDealRating"
                    AutoCloseDelay="1000" ShowCallout="true"
                    Position="MiddleLeft" Width="275px"
                    Animation="Resize" ManualClose="True"
                    Height="300px" >
    <div class="AddDealRatingbox">
        <asp:Image ID="Image1" runat="server" ImageUrl="/Images/RateThisDeal.png" />
        <br />
        <asp:Label ID="lblName" runat="server" Text="Name:"></asp:Label>
        <br />
        <asp:TextBox ID="txtName" runat="server" style="width:260px" />
        <%--
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
        CssClass="Errors"
        ControlToValidate="txtName"
        ErrorMessage="Your name is required"
        SetFocusOnError="True" >Your name is required</asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
        ControlToValidate="txtName"
        ErrorMessage="Please use plain text only"
        Text="Please use plain text only"
        CssClass="Errors"
        ValidationExpression="[^<]+"
        SetFocusOnError="True" />
        --%>
         <br />
        <br />
        <asp:Label ID="lblInstructions" runat="server" Text="Your feedback:"></asp:Label>
        <br />
        <asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine"  Rows="5" Columns="30" style="width:260px" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                    ValidationGroup="save"    CssClass="Errors" ControlToValidate="txtComments"
                                    ErrorMessage="Your comment is required"
                                    EnableViewState="False" ViewStateMode="Disabled" >Your comment is required</asp:RequiredFieldValidator>
        <%--   
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
        ControlToValidate="txtComments"
        ErrorMessage="Please use plain text only"
        text="Please use plain text only"
        CssClass="Errors" ValidationExpression="[^<]+"
        SetFocusOnError="True" />
        --%>
        <br /><br />
 
        <asp:ImageButton ID="btnPostComment" runat="server"
                         Style="outline:0; cursor:pointer" ValidationGroup="save"
                         ImageUrl="~/Images/btnPostComment.png" OnClick="btnPostComment_Click" CausesValidation="True" />
        <asp:ImageButton ID="btnCancel" UseSubmitBehavior="false" runat="server"
                         Style="margin-left:12px; outline:0; cursor:pointer"
                         OnClientClick="HideTooltip()" ImageUrl="~/Images/btnCancel.png" />
    </div>
</telerik:RadToolTip>
Marin Bratanov
Telerik team
 answered on 16 Aug 2012
1 answer
69 views
Am facing an issue with the Combo Box, where in the expanded list is floating along with the page rather than being fixed with the combo box control.
Had any one faced a similar issue?

Nencho
Telerik team
 answered on 16 Aug 2012
1 answer
80 views
Hi,

iam using raduplaod control with  Select Customization tag and looks like button(Select) but how to apply shortcut key(accesskey) to select (select customization tag)button.

Regards,
Sathish Gai
Peter Filipov
Telerik team
 answered on 16 Aug 2012
6 answers
61 views

Hi all,
i have a problem in day veiw ,i.e appoinment columns are shrinked in day veiw ,
but where as other veiws as weekveiw ,mothview display properly.

tag used :

<

 

telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" DataKeyField="ID"

 

 

DataSourceID="ObjectDataSource1" DataStartField="Start" DataSubjectField="Subject"

 

 

HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" ColumnWidth="100%"

 

 

OverflowBehavior="Expand" StartInFullTime="true" ShowFooter="true" StartInsertingInAdvancedForm="True"

 

 

StartEditingInAdvancedForm="false" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"

 

 

CssClass="ScheduleAviable" Width="100%" DayView-UserSelectable="True">

 

 

</telerik:RadScheduler>

can any body tell whats the peoblem.

Thanks and Regards,
Sriharsha

 

Ingmar
Top achievements
Rank 1
 answered on 16 Aug 2012
5 answers
366 views
Hi,

I am working RadWindow control. I want to get values from RadWindow and use these in parent window (web page) using C#.Net (code behind).

I have already saw/read some demo but i am not getting because most them are not based on code behind those examples are using aspx.

for example: http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx?product=window

I want these type of code in code behind file like C#.Net.

Please guide me.

Thanks 



Princy
Top achievements
Rank 2
 answered on 16 Aug 2012
1 answer
73 views
Hello,
I use a TreeView with Checkboxes. I refresh my TreeView every 30 seconds with a timer. This works very well. Unfortunately, when i have selected any Items after the refresh my Selecting is lost. Is it possible, that i get my old Selection after the Refresh?

I use a ObjectDataSource (ODSLoadPlayerFromScheduler) for my TreeView.
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        LoadDB();
    }
    else if (IsPostBack)
    {
        LoadDBAfterPostback(); 
    }
}
 
 
 
private void LoadDB()
{
    int projectGroupID = pgID;
 
    if (!parameter.ToLower().Contains("administrators"))
    {
        ODSLoadPlayerFromScheduler.SelectParameters.Add("GroupName", parameter);
        ODSLoadPlayerFromScheduler.SelectParameters.Add("projectGroupID", projectGroupID.ToString());
    }
    else
    {
        ODSLoadPlayerFromScheduler.SelectParameters.Add("projectGroupID", projectGroupID.ToString());
    }       
}
 
private void LoadDBAfterPostback()
{
    int projectGroupID = pgID;
 
    if (!parameter.ToLower().Contains("administrators"))
    {
        ODSLoadPlayerFromScheduler.SelectParameters["GroupName"].DefaultValue = parameter;
        ODSLoadPlayerFromScheduler.SelectParameters["projectGroupID"].DefaultValue = projectGroupID.ToString();
    }
    else
    {
        ODSLoadPlayerFromScheduler.SelectParameters["projectGroupID"].DefaultValue = projectGroupID.ToString();
    }
}
 
protected void Timer1_Tick(object sender, EventArgs e)
    {
        LoadDBAfterPostback();
    }

Can you help me with the solution to my problem?

BR
Reiner
Nencho
Telerik team
 answered on 16 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?