Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
364 views
Hi,

I use <telerik:RadButton CssClass="sth" runat="server" />.

Is it possible to set class for rendered <input> tag instead of <a>?
In my example class "sth" will be set for <a> tag.
<a class="sth" ...>
...
<input type="button" ...>
...
</a>

I wanted to modify <input> CSS class.

Regards,
Dawid Niedzwiedz
Bozhidar
Telerik team
 answered on 05 Oct 2011
1 answer
73 views
Hi
I am finding that controls listed in the UpdatedControls section of an AjaxManager or AjaxMangerProxy perform partial postbacks.
Is this the expected behaviour? Is there a way to stop this?

Below are the details of my problem
As shown below an  AjaxManagerProxy has been configured to update a datarepeater after a button is clicked (or postsback).
telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManager1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RefreshDasboardButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="DashboardRepeater" LoadingPanelID="LoadingPanel1"/>
            </UpdatedControls>
        </telerik:AjaxSetting>                      
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

Inside the repeater i have a list of asp linkbuttons. Clicking one of the link buttons should cause changes to a radgrid. Instead the linkbutton does a partial postback (executes all the code as expected and rebinds new data to a radgrid) but does not display the changes to the radgrid.

If the repeater is removed from the updatedcontrols list then the link buttons perform a full postback as expected and refreshes the radgrid.

Once again I would like to know
1. After controls have been listed in the UpdatedControls section will they perform parital or full postbacks?
2. Has anyone got any ideas on how I can fix this.
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Oct 2011
1 answer
130 views
Hi,

<Tree AllowNodeEditing="True" SingleExpandPath="True" CheckChildNodes="True" EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" OnClientNodeClicking="DontClick" DataNavigateUrlField="NavigateUrl" AppendDataBoundItems="True" DataTextField="Text" DataValueField="Text" Skin="WebBlue" EnableAjaxSkinRendering="False" Height="382px" Width="300px" DataSourceID="XmlDataSource1">
  <Node Text="Menu item With SubMenu" Value="menu with submenu" NavigateUrl="~/somelink">
    <Node Text="submenuitem" Value="submenuitem" NavigateUrl="~/item" />
  </Node>
</Tree>

I have an xml structure like above. This structure is created in a different page by drag-dropping from 2 dynamic treeviews.

My problem is
1. I want to have some "Menu with Submenu" items where I don't want a navigate url. I don't want my page to navigate to a url when the user clicks on that item. How should I change the structure of the xml for that?

2. I'm generating it in a different page by drag-drop. I drag an item from a different treeview to this one to design the menu and serialize it as this xml. Is there any way to put a different property to the node identify it as "Menuitem without navigate url"

3. I want to put a context menu on my TreeView. Any samples.

I'm quite new to Telerik and I couldn't find a fix for my problems by a small search. I would appreciate for a sample or documentation.

Thanks
Kate
Telerik team
 answered on 05 Oct 2011
1 answer
125 views
I am using the latest radskin objects dnn module, but need to change the font color of the menu item when the relavent DNN page is displayed.  Can this be achieved via javascript?  If so please help :-)
Peter
Telerik team
 answered on 05 Oct 2011
1 answer
91 views
Hi,
I need to scroll the root menu(horizontal) when menu with greater than windows with. I know this is possible in new rad menu controller. But I am using radmenu.net2 dll (old version). Is this possible in this version. If it is possible then how can I do it.
Kate
Telerik team
 answered on 05 Oct 2011
3 answers
345 views
Hi,
I'm developing webform with radgrid...it has textbox and when we type or press key in textbox it should start searching in radgrid and should disply onluy those records inside master-detail gris both...I'm new and do not have much idea...Could you please help me out??

code:

 

 

<telerik:RadGrid ID="RadGridComment" runat="server" OnItemCommand="RadGridComment_ItemCommand" AutoGenerateColumns="False" AllowMultiRowSelection="False"

 

 

 

GridLines="None" ShowGroupPanel="true" ShowHeader="false" MasterTableView-CommandItemDisplay="Top" >

 

 

 

<MasterTableView>

 

 

 

 

<CommandItemTemplate>

 

 

 

<asp:Table ID="tblSearch" runat="server" CssClass="search__background-image_png" Width="100%" Height="20%" CellPadding="0" CellSpacing="0">

 

 

 

<asp:TableRow>

 

 

 

<asp:TableCell Width="5%" Height="37px">

 

 

 

</asp:TableCell>

 

 

 

<asp:TableCell>

 

 

 

<asp:TextBox ID="txtSearch" runat="server" Width="225px" Height="20px" OnTextChanged="txtSearch_TextChanged"></asp:TextBox>

 

 

 

</asp:TableCell>

 

 

 

<asp:TableCell Width="40%" Height="25%">

 

 

 

<asp:RadioButton ID="rbtnSearchOption1" runat="server" GroupName="MessageSearch"

 

 

 

Text="Search in Titles only" Checked="true" Style="font-family: verdana; color: Black; font-style: normal;

 

 

 

 

font-size: 8pt; font-weight: lighter;" />

 

 

 

<asp:RadioButton ID="rbtnSearchOption2" runat="server" GroupName="MessageSearch"

 

 

 

Text="Search in all text" Style="font-family: verdana; color: Black; font-style: normal;

 

 

 

 

font-size: 8pt; font-weight: lighter;" />

 

 

 

</asp:TableCell>

 

 

 

<asp:TableCell Width="5%" Height="25%" HorizontalAlign="Right">

 

 

 

<div class="collapsed_ICON_png" >

 

 

 

</div>

 

 

 

</asp:TableCell>

 

 

 

<asp:TableCell Width="55%" Height="25%" HorizontalAlign="Left">

 

 

 

<asp:Label ID="lblSearchMsg" runat="server" Text="(1) records found" Style="font-family: Verdana;

 

 

 

 

color: Black; font-style: normal; font-size: 9pt; font-weight: lighter;"></asp:Label>

 

 

 

</asp:TableCell>

 

 

 

</asp:TableRow>

 

 

 

</asp:Table>

 

 

 

</CommandItemTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn SortExpression="id" Display="false" DataField="id" UniqueName="id">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn SortExpression="Name" HeaderButtonType="TextButton" DataField="title"

 

 

 

UniqueName="companyName">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn SortExpression="Date" HeaderButtonType="TextButton" DataField="commentDate"

 

 

 

UniqueName="commentDate">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="DeleteComment" ImageUrl="Images/delete_msg.png">

 

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

<NestedViewSettings>

 

 

 

<ParentTableRelation>

 

 

 

<telerik:GridRelationFields DetailKeyField="id" MasterKeyField="id" />

 

 

 

</ParentTableRelation>

 

 

 

</NestedViewSettings>

 

 

 

<NestedViewTemplate>

 

 

 

<asp:Panel ID="pnlNotices" runat="server" ScrollBars="Auto">

 

 

 

<fieldset style="padding: 10px;">

 

 

 

<asp:Table ID="tblMsg" runat="server">

 

 

 

 

<asp:TableRow Width="999px" Height="30px">

 

 

 

<asp:TableCell ID="tdcn" Text='<%#Bind("comment")%>'>

 

 

 

 

</asp:TableCell>

 

 

 

</asp:TableRow>

 

 

 

</asp:Table>

 

 

 

</fieldset>

 

 

 

</asp:Panel>

 

 

 

</NestedViewTemplate>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 


thanks
patel
Tsvetina
Telerik team
 answered on 05 Oct 2011
3 answers
141 views
Hello,

Problem:
I've a combobox (A) with some items in it. This combobox is dependant of an another combobox (B). When I select an item B a clientside event is fired which will obtain new items for A. I'm going to process those items and on the end I hit commitChanges(). I see values changed but not the expected result.

Explanation:
In A I make use of a DataBinder which will render my text from custom attributes that I've added in the codebehind. When I call in the codebehind .databind my data of the custom attributes are shown. When my page is loaded and I select an option in B, A must be updated with the new resultset that I've got from my Ajax request. This result set contains objects that have 4 properties (ObjectId, Name, AddressCode, FullLocation) and I'm going to process those items (see the code example below):

    var dropdown = $find($("[id $= 'rbLocation']").attr("id"));
    dropdown.clearSelection();
    dropdown.trackChanges();
    dropdown.clearItems();

    for (var i = 0; i < obj.length; i++) {
        var item = new Telerik.Web.UI.RadComboBoxItem();
        item.set_text(obj[i].AddressCode);
        item.set_value(obj[i].ObjectId);

        item.get_attributes().setAttribute("Name", obj[i].Name);
        item.get_attributes().setAttribute("FullLocation", obj[i].FullLocation);

        dropdown.get_items().add(item);
    }

    dropdown.commitChanges();

It works but it does not give me the expected result. I've set those attributes but the only thing I see is the AddressCode and nothing more. I've decleared the HTML in this way:

                                        <telerik:RadComboBox ID="rbLocation" runat="server" EmptyMessage="Select a location" HighlightTemplatedItems="true" Filter="StartsWith"
                                            Height="200px" Width="142px" DropDownWidth="300px" RegisterWithScriptManager="false" Skin="Default" AutoPostBack="false">
                                            <HeaderTemplate>
                                                <table cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="width: 100px;"><asp:Label ID="lblAddressCode" runat="server">AddressCode</asp:Label></td>
                                                        <td style="width: 100px;"><asp:Label ID="lblName" runat="server">Name</asp:Label></td>
                                                        <td style="width: 100px;"><asp:Label ID="lblFullLocation" runat="server">Full Location</asp:Label></td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td style="width: 100px;"><%# DataBinder.Eval(Container, "Text") %></td>
                                                        <td style="width: 100px;"><%# DataBinder.Eval(Container, "Attributes['Name']") %></td>
                                                        <td style="width: 100px;"><%# DataBinder.Eval(Container, "Attributes['FullLocation']")%></td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </telerik:RadComboBox>

So my question is how can I set my custom attributes clientside? Or at least that they will show up in my dropdown in the corresponding column. Or must I add it manually?

Thank you in advance.

Environment:
Visual Studio 2010
Q2 2011
jQuery 1.6.2
Michiel
Top achievements
Rank 1
 answered on 05 Oct 2011
1 answer
105 views
Hi

 

EnableCustomAttributeEditing="true"

 

 

CustomAttributeNames="Color

 


I have added an attribute wich I Bind and it work fine

 

protected void rdsSchedule_FormCreated(object sender, SchedulerFormCreatedEventArgs e)

 

{

 

if((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))

 

{

ddlColor.SelectedValue = e.Appointment.Attributes[

"Color"];

 

}

}

but it is empty in the update, my database receives an empty string for Color

 

 

protected void rdsSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

{

 

this.SqlProcessor.AddParameter("ID", e.Appointment.ID);

 

 

this.SqlProcessor.AddParameter("Users_ID", this.CurrentUserId);

 

 

this.SqlProcessor.AddParameter("Subject", e.ModifiedAppointment.Subject);

 

 

this.SqlProcessor.AddParameter("Description", e.ModifiedAppointment.Description);

 

 

this.SqlProcessor.AddParameter("Color", e.ModifiedAppointment.Attributes["Color"]);

 

 

this.SqlProcessor.AddParameter("DateStart", xStart.ToString("yyyy-MM-dd HH:mm"));

 

 

this.SqlProcessor.AddParameter("DateEnd", xEnd.ToString("yyyy-MM-dd HH:mm"));

 

 

this.SqlProcessor.Execute("stpUsersSchedule", CommandType.StoredProcedure);

 

}

Am I missing something

Plamen
Telerik team
 answered on 05 Oct 2011
5 answers
137 views
We ar building a new system for a customer. We use EpiServer as our base system.
Mostly we have pages and usercontrols to display and get data from the user.

My senario is as follows:

#Masterpage
   #Page
       #Panel (used as a wrapper for updated controls, eg all controls inside can be updated)
           #Cusom usercontrol A (Contains a button with a click evenhandler defined)
           #Custom usercontrol B (Basicly only a specialised RadGrid inside and properties to feed the grid datasource)

I want to bind the button on usercontrol A to update the panel on the page.
I tried the following:
RadAjaxManager1.AjaxSettings.AddAjaxSetting((Button)SearchMember.FindControl("Button1"), PanelWrapper, RadAjaxLoadingPanel1);
The event fires but no loading panel is shown and the wrapper panel is not updated (the grid does not popout as it should.
However the following does make the grid popout but it stil does not display any loading panel.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="UserControl_A">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelWrapper" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
        Width="75px" BackgroundPosition="Center" Skin="Windows7">
    </telerik:RadAjaxLoadingPanel>

Any ideeas about what im doing wrong here ?
Iana Tsolova
Telerik team
 answered on 05 Oct 2011
1 answer
102 views
Hello,

I have created a treeview with a contextmenu, the problem I am experiencing is that the contextmenu isn't positioning itself correctly.

The reason for this is that the treeview is very long and is inside a div which has set overflow to auto, so the page itselft doesn't have scrollbars, instead the div has them.
This is causing the problem.

I've tried listening to showing/shown events on the contextmenu and I have tried manipulating the position with limited success. I've also tried to do a set_cancel on showing and then running a showAt(,,) on the desired position but that only worked halfway because the event bubbled up and the browser context menu also displayed.

Hope somebody can help me with this.
Plamen
Telerik team
 answered on 05 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?