Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
52 views

Hi,
I have an ascx that basiocally is just a tree.
this ascx is included on aspx file.
by clicking a button I want to change the tree datasource.
i see difference using ajaxmanager and triggers. First does not work the second does.
Unfortunally i need the first case

Here is a sample
(ajax)

<%@ Register TagPrefix="qsf" TagName="RTV" Src="~/Admin/CategoriesManagement/TreeCategories.ascx" %>
 
.....
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>                 
           <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>               
                <telerik:AjaxUpdatedControl ControlID="CatTree1" />               
            </UpdatedControls>
           </telerik:AjaxSetting>                      
        </AjaxSettings>
    </telerik:RadAjaxManager>   
 
     <table style="width: 100%; text-align: left; background-color:#2e2e2e;" cellspacing="0" cellpadding="0">                                  
        <tr>
            <td>
                <qsf:rtv runat="server" ID="CatTree1" ></qsf:rtv>   
            </td>
        </tr>
    </table>
        
    <asp:Button ID="Button1" runat="server" Text="Button" Width="500px" />
                                        
    </form>
...

code

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
           'change its datasource
            CatTree1.setInitialPath(PathOfThreeCategory)
 End Sub



second case (triggers)

<table style="width: 100%; text-align: left; background-color:#2e2e2e;" cellspacing="0" cellpadding="0">                                   
    <tr>
        <td>
                <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                </telerik:RadScriptManager>
 
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                            <qsf:rtv runat="server" ID="CatTree1" ></qsf:rtv>   
                    </ContentTemplate>
                                        
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="Button1" />
                    </Triggers>
                </asp:UpdatePanel>
                                    
        </td>
    </tr>
</table>
 
 
<asp:Button ID="Button1" runat="server" Text="Button" Width="500px" />

same code behind..

Please May you tell me where i'm going wrong? Thank you

Kate
Telerik team
 answered on 16 Jan 2012
2 answers
101 views
Hi!
I have the foloowing issue:
RadColorPicker can't load its client state (NullReferenceException) if CustomValidator validation fails.
Markup:
<Telerik:RadGrid runat="server" ID="statusesGrid" OnNeedDataSource="NeedStatusesDataSource"
OnDeleteCommand="HandleDelete" OnInsertCommand="HandleInsert" OnUpdateCommand="HandleUpdate"
OnItemCommand="HandleMakeDefault"
AutoGenerateColumns="false" Width="100%">
    <MasterTableView Name="StatusesGrid" EditMode="InPlace" CommandItemDisplay="Top"
        DataKeyNames="UnitTypeStatusId" ClientDataKeyNames="UnitTypeStatusId"
    >
        <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add new status" ShowRefreshButton="false" />
        <Columns>
            <Telerik:GridEditCommandColumn UniqueName="Edit" UpdateText="Save" InsertText="Save" CancelText="Cancel" ButtonType="LinkButton" />
            <Telerik:GridBoundColumn DataField="UnitTypeStatusId" UniqueName="UnitTypeStatusId" Display="false" />
            <Telerik:GridTemplateColumn UniqueName="NameWithValidator" DataField="UnitTypeStatusName" HeaderText="Name">
                <InsertItemTemplate>
                    <Telerik:RadTextBox runat="server" ID="newNameBox" Text='<%# Bind("UnitTypeStatusName") %>' />
                    <DL:UnitTypeStatusNameValidator runat="server" ID="nameVaidator" ForeColor="Red" UnitTypeIsCurrentObject="true" ThisStatusID="0"
                        ControlToValidate="newNameBox" ValidateEmptyText="true" Display="Static"  />
                </InsertItemTemplate>
                <EditItemTemplate>
                    <Telerik:RadTextBox runat="server" ID="nameEditBox" Text='<%# Bind("UnitTypeStatusName") %>' />
                    <DL:UnitTypeStatusNameValidator runat="server" ID="nameVaidator" ForeColor="Red" UnitTypeIsCurrentObject="true" ThisStatusID='<%# Bind("UnitTypeStatusID") %>'
                        ControlToValidate="nameEditBox" ValidateEmptyText="true" Display="Static"  />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Literal runat="server" Mode="Encode" Text='<%# Eval("UnitTypeStatusName") %>' />
                </ItemTemplate>
            </Telerik:GridTemplateColumn>
            <Telerik:GridTemplateColumn DataField="UnitTypeStatusColor" UniqueName="UnitTypeStatusColor" HeaderText="Color">
                <ItemTemplate>
                    <DL:ColorValueDisplay runat="server" Value='<%# Eval("StatusColor") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <DL:ColorValueEditor runat="server" ID="colPicker" HtmlColor='<%# Bind("UnitTypeStatusColor") %>' />
                </EditItemTemplate>
                <InsertItemTemplate>
                    <DL:ColorValueEditor runat="server" ID="colPicker" HtmlColor='<%# Bind("UnitTypeStatusColor") %>' />
                </InsertItemTemplate>
            </Telerik:GridTemplateColumn>
            <Telerik:GridCheckBoxColumn UniqueName="AllowUnitReshedule" DataField="AllowUnitReshedule" DataType="System.Boolean"
                HeaderText="Moveable" />
            <Telerik:GridButtonColumn ButtonType="LinkButton" Text="Make default" UniqueName="MakeDefault" CommandName="MakeDefault" HeaderText="" />
            <Telerik:GridCheckBoxColumn DataField="DefaultStatus" UniqueName="DefaultStatus" HeaderText="Default" ReadOnly="true" />
            <Telerik:GridTemplateColumn UniqueName="Delete" HeaderText="">
                <ItemTemplate>
                    <asp:MultiView runat="server" ID="view" ActiveViewIndex="<%# GetViewIndexByDeletability(Container.DataItem) %>">
                        <asp:View runat="server" ID="nonDelete">
                            <span title="This status can't be deleted">Protected</span>
                        </asp:View>
                        <asp:View runat="server" ID="delete">
                            <a href='javascript:OpenDeleteDialogForUnitTypeStatus(<%# Eval("UnitTypeStatusId") %>)'>Delete</a>
                        </asp:View>
                    </asp:MultiView>
                </ItemTemplate>
                <EditItemTemplate>
                    <!-- -->
                </EditItemTemplate>
                <InsertItemTemplate>
                    <!-- -->
                </InsertItemTemplate>
            </Telerik:GridTemplateColumn>
        </Columns>
        <NoRecordsTemplate>
            No statuses defined for this unit type
        </NoRecordsTemplate>
    </MasterTableView>
 
</Telerik:RadGrid>
All this markup is in RadAjaxPanel.
The bug happens if CustomVaidator's check fails duirng item Insertion. During Item Editing it all works well.
A null reference exception happens when this bug taking place. Stack trace is below:
at Telerik.Web.UI.RadColorPicker.LoadClientState(Dictionary`2 clientState)
Thanks for your attention.



Konstantin Isaev
Top achievements
Rank 1
 answered on 16 Jan 2012
1 answer
145 views
I just deployed my first site with the RADEditor and the client does not like it.  Here is his comment:
"Also, the editor is not very user friendly at all (tinymce was way better at this point)... where are the options for it? For example, ctrl-z doesn't work in Chrome and I have to select paragraph format first before I add content or the content won't have <p> </p>... it also adds <br> when it shouldn't, and it sometimes makes urls urls (if I copy them from a browser address bar) and sometimes it doesn't and makes them just text"

ouch.

If I can't provide answers, he will make me rip this out and go back to tinymce.

Here is the editor, note that I set the newLineMode property.  Hitting Enter in IE and FF works for me.
<telerik:RadPageView ID="RadPageView2" runat="server">
    <telerik:RadEditor ID="RadEditor2" runat="server" Content='<%# Bind("habitat") %>'
        NewLineMode="P" ToolsFile="EditorTools.xml" Width="750" Height="472px">
        <ImageManager ViewPaths="~/upload" UploadPaths="~/upload" DeletePaths="~/upload" />
    </telerik:RadEditor>
</telerik:RadPageView>

Here is the toolbar.
<?xml version="1.0" encoding="utf-8" ?>
<root>
  <cssFiles>
    <item name="~/_n/css/EditorContentAreaStyles.css" />
  </cssFiles>
  <tools>
    <tool name="PastePlainText" />
    <tool name="PasteFromWord" />
    <tool name="ConvertToLower" />
  </tools>
  <tools>
    <tool name="ApplyClass" />
    <tool name="FormatBlock" />
    <tool separator="true" />
    <tool name="Bold" />
    <tool name="Italic" />
    <tool name="Underline" />
    <tool name="Superscript" />
    <tool name="Subscript" />
    <tool name="BackColor" />
    <tool name="ForeColor" />
    <tool name="InsertSymbol" />
  </tools>
  <tools>
    <tool name="JustifyLeft" />
    <tool name="JustifyCenter" />
    <tool name="JustifyRight" />
    <tool name="JustifyFull" />
    <tool separator="true" />
    <tool name="Indent" />
    <tool name="Outdent" />
    <tool separator="true" />
    <tool name="InsertUnorderedList" />
    <tool name="InsertOrderedList" />
  </tools>
  <tools>
    <tool name="ImageManager" />
    <tool name="LinkManager" />
    <tool name="Unlink" />
  </tools>
  <tools name="Tables" tab="Insert">
    <tool name="InsertTableLight" size="large" />
    <tool name="InsertTable" />
  </tools>
  <tools name="Proofing" tab="Review">
    <tool name="XhtmlValidator" size="large" />
    <tool name="FindAndReplace" />
  </tools>
</root>

and the styles.  Is there anything about this CSS that would cause the problems?
body{font-family:arial,helvetica,"helvetica neue",sans-serif !important;
font-size:82% !important;
color:#4d3345 !important;
line-height:1.6em !important;}
 
h1{color:#0085cf !important;
font-weight:normal !important;
font-size:1.8em !important;
margin:25px 0 15px 30px !important;
line-height:1.4em !important;
text-shadow:2px 2px 2px #ccc !important;}
 
h2{color:#000 !important;
font-weight:normal !important;
font-size:1.5em !important;
margin:25px 0 15px 30px !important;
line-height:1.4em !important;
text-shadow:2px 2px 2px #ccc !important;}
 
h3{color:#0085cf !important;
font-weight:normal !important;
font-style:italic !important;
font-size:1.3em !important;
margin:25px 0 15px 30px !important;
line-height:1.4em !important;
text-shadow:2px 2px 2px #ccc !important;}
 
h4{color:#0085cf !important;
font-weight:bold !important;
font-size:1.3em !important;
margin:25px 0 15px 30px !important;
line-height:1.4em;text-shadow:2px 2px 2px #ccc !important;}
 
h5{color:#000 !important;
font-weight:normal !important;
font-size:1.4em !important;
margin:25px 0 15px 0 !important;
line-height:1.4em !important;
text-align:center !important;
text-shadow:2px 2px 2px #ccc !important;}
 
h6{color:#0085cf !important;
font-style:italic !important;
font-size:1.15em !important;
margin:25px 0 15px 30px !important;
line-height:1.4em !important;
text-shadow:2px 2px 2px #ccc !important;}
 
a{color:#0085cf !important;
text-decoration:none !important;
outline:none !important;}
 
a:hover{color:#00F !important;
text-decoration:underline !important;}
 
a:visited{color:#006daa !important;}
 
a[href^="mailto:"]{display:inline-block !important;
padding-right:15px !important;
background:transparent url(/_n/i/icons/mailto.png) right no-repeat !important;}
 
.nav1 {font-size:11px !important;
line-height:14px !important;}
 
.i-r{float:right !important;
margin:20px 10px 20px 20px !important;}
 
.i-l{float:left !important;
margin:20px 20px 20px 10px !important;}
 
.i-c{display:block !important;
margin-left:auto !important;
margin-right:auto !important;
padding:10px 10px 10px 10px !important;}
 
.news{color:#0085cf !important;
font-size:1.7em !important;
line-height:1.1em !important;}
 
.bk{background:#0085cf !important;}
 
.input{color:#fff !important;
font-size:10px !important;
background-color:#006daa !important;
padding:1px !important;}
 
.input2{color:#006daa !important;
background-color:#fff !important;
padding:1px !important;}

Any help much appreciated.
Richard
Top achievements
Rank 1
 answered on 16 Jan 2012
1 answer
92 views

My Asp Panel has a usercontrol inside it...User control is dynamicaly loaded.
Asp panel is placed inside RadAjaxManager..
User control contains drop down list and text boxes..

on page load user control is loaded...
But when I change selected index of drop down list inside user control...and do a postback....I receive an error...
which says...

"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request."

Maria Ilieva
Telerik team
 answered on 16 Jan 2012
3 answers
69 views
Hi,

We are facing issue with RadCombo arrow image.
The width of image were getting increase for some page.

Attached the image for your reference.

I also follow the link to resolve the above issue, but still not working properly.

 http://www.telerik.com/community/forums/aspnet-ajax/combobox/radcombobox-rcbarrowcell-image-getting-cut-off-after-upgrading-to-q2-2010.aspx

i.e. adding the style

div.RadComboBox .rcbArrowCell td,
div.RadComboBox .rcbArrowCell a
{
    width: 23px !important;
}


If possible please send a small demo application with solution.


Regards,
Shirish
Shirish Lokhande
Top achievements
Rank 1
 answered on 16 Jan 2012
3 answers
63 views
I have a grid with a detail table. When I do a multiple sort on that sub grid I would like the UI changed to reflect in which order the sorting is in. I have attached two screen shots representing what I want. I would prefer the header option. The problem is that the user can not tell which sort is the prominent one.

How would I achieve this using your grids? I can not find out how to put a header on the GridTableView or inside the detail table.

Any help would be appreciated
Thanks
Mira
Telerik team
 answered on 16 Jan 2012
1 answer
83 views
Is there a way to populate radgrid filters with values from a database table instead of the default conditions(contains, equalsto, etc)?

Thanks,
arnie
Richard
Top achievements
Rank 1
 answered on 16 Jan 2012
4 answers
60 views
OK It is really off topic. Can someone just point me in the right direction how Telerik accomplishes this?
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/a4cf3d1e-55a5-4a01-a68e-e8e7505443cc

Thank You
JB
Ramjet
Top achievements
Rank 1
 answered on 16 Jan 2012
7 answers
399 views
Hello,

I want to change the color of the file TextBox server side.
From the helpfiles I know that the appearance of the text box is set with the .ruFakeInput class

When I put this piece of code in my aspx page it overloads the default values of the .ruFakeInput and the TextBox becomes red on page load.

<style type="text/css"> 
div.RadUpload_Skin1 .ruFakeInput
    {
        border-color:#93070a;
        /* background-image:url('Input/sprite.gif') 100% -148px no-repeat; */
        color:#ff9000;
        background-color: #9C362A;
        color: #FFF;
    }
</style>

But this puts it directly on page load in red. I want to put it red after a condition is true after a postback via a button (for example no file selected).

How can this be done? It seems that the textbox itself, inside the RadUpload, can't be accessed server side, only the RadUpload control?

Thanks.
shinu rag
Top achievements
Rank 1
 answered on 16 Jan 2012
3 answers
126 views
I'm sure there is a simple answer to this, but when I modify the height of the RadListBoxItem the text isn't centered. How can I fix this?


<telerik:RadListBox runat="server" Height="50px" Width="100px">
    <Items>
        <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Height="10px" Font-Size="10px" Text="Just" />
        <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="Say" />
        <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="No" />
        <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="Drugs" />
    </Items>
</telerik:RadListBox>


Princy
Top achievements
Rank 2
 answered on 16 Jan 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?