Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
235 views
I have a radmenu with SiteMap source and I am trying to show the seperator in certain places. I have code and also style to show them but it's not showing property in Metro skin. It shows fine in other skin. What's going on?
protected void RadMenu1_ItemDataBound(object sender, Telerik.Web.UI.RadMenuEventArgs e)
       {
 
           if (e.Item.Level == 1 && e.Item.Value == "Units")
           {
               Telerik.Web.UI.RadMenuItem separator = new Telerik.Web.UI.RadMenuItem();
               separator.IsSeparator = true;
 
               Telerik.Web.UI.RadMenuItem itm = (Telerik.Web.UI.RadMenuItem)e.Item;
               itm.Owner.Items.Insert(e.Item.Index + 1, separator);
           }
 
       }
<style type="text/css">
        /* <Separators> */
 
 .rmSeparator  {
            height: 1px !important;
            margin: 1px 0 0 !important;
            width: 25px !important;
            background-color: #A8A8A8 !important;
        }
    </style>
Kate
Telerik team
 answered on 02 Dec 2013
3 answers
445 views

 

<telerik:RadComboBox Filter="Contains" runat="server" ID="cmbTechnicalServicePerson" Width="420px"
    MarkFirstMatch="true" DataSourceID="DSGetTechnicalServicePerson" EnableLoadOnDemand="true"
    HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
    OnDataBound="cmbTechnicalServicePerson_DataBound" OnItemDataBound="cmbTechnicalServicePerson_ItemDataBound"
    LabelWidth="100" Label="Technical Service Name:" Skin="Office2010Black" Style="position: absolute; top: 310px; left: 21px; z-index: 6500; height: 16px;" Text="Select  a Value" TabIndex="3">
    <HeaderTemplate>
        <ul>
            <li class="col1">Name</li>
            <li class="col2">Position</li>
            <li class="col2">Unit</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1">
                <%# DataBinder.Eval(Container.DataItem, "[FULLNAME]")%></li>
            <li class="col2">
                <%# DataBinder.Eval(Container.DataItem, "Position")%></li>
            <li class="col3">
                <%# DataBinder.Eval(Container.DataItem, "[Department]")%></li>
        </ul>
    </ItemTemplate>
    <FooterTemplate>
        A total of
                <asp:Literal runat="server" ID="RadComboItemsTCount" />
        items
    </FooterTemplate>
 
</telerik:RadComboBox>

This is how my combo box set up in aspx page

 

I wanted to select the value from combo box using vb.net it select the value but the selected text will always “Select  a Value” which is default value.

This is how I am change the selected value inside the code

Me.cmbTechnicalServicePerson.SelectedValue = DRProjectDetailsinfo.Item("TechnicalServicePerson")

Or Me.cmbTechnicalServicePerson.SelectedValue = 12551

But it is not selecting the text any idea

Thanks

Syed

Nencho
Telerik team
 answered on 02 Dec 2013
4 answers
343 views
Hi,

I have below  javascript  function in code-behind file for expand & collapse node:

private void SetActions()

{

String sString =

@"

function SaveTreeState(action)

{

var tree = $find('" + RadTreeView1.ClientID + @"');

if(tree == null) { return; }

var nodes = tree.get_allNodes();

if(action == 'expand')

{

for(var cnt=0; cnt<nodes.length; cnt++)

{

nodes[cnt].expand();

}

}

if(action == 'collapse')

{

for(var cnt=0; cnt<nodes.length; cnt++)

{

nodes[cnt].collapse();

}

}

var expandedNodes = '';

for(var cnt=0; cnt<nodes.length; cnt++)

{

if(nodes[cnt].get_expanded())

{

expandedNodes += nodes[cnt].get_value() + '|';

}

}

SaveCookie('mpnotetreestate',expandedNodes);

}

function SaveCookie(name,value,days) {

if (days) {

if (days>730) {

days=730;

}

var date = new Date();

date.setTime(date.getTime()+(days*24*60*60*1000));

var expires = '; expires='+date.toGMTString();

}

else var expires = '';

document.cookie = name+'='+value+expires+'; path=/';

}

";

ScriptManager.RegisterClientScriptBlock(this, typeof(ViewNotes), "SaveTreeStateBlock", sString, true);

ViewToolBar1.btnExpandAll.Attributes.Add("onclick", "try{SaveTreeState('expand');}catch(err){return;}return false;");

ViewToolBar1.btnCollapseAll.Attributes.Add("onclick", "try{SaveTreeState('collapse');}catch(err){return}return false;");

}



In UI I am using the below:
<cc2:MPTreeView BorderStyle="None" OnNodeDataBound="RadTreeView1_NodeDataBound" OnClientNodeCollapsed="SaveTreeState"

OnClientNodeExpanded="SaveTreeState" ShowLineImages="false" ID="RadTreeView1" runat="server">

<CollapseAnimation Duration="100" Type="None" />

<ExpandAnimation Duration="100" Type="None" />



I am not able to collapse the treeview control on button click nor able to expand ? Could u please suggest.

Thanks
Bikash
Bikash
Top achievements
Rank 1
 answered on 02 Dec 2013
2 answers
106 views
Hi,

I want to show a RadConfirm when a certain ribbon bar button is clicked (in the client-side event handler), so the user can cancel the event.
Because the RadConfirm uses a callback, I have to cancel the click event, show the RadConfirm, and in the callback I have to do a postback if the user clicked "yes".
If found this example: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx
How can I use this approach for a RibbonBarButton?

I have so far (pseudocode):
function OnRibbonBarButtonClicking(sender, args) {
   if (args.get_button().get_value() == "delete") {
      args.set_cancel(true);
      radConfirm("Sure?", _callbackFunc);
   }
}
 
function _callbackFunc(arg) {
   if (arg) {
      // do postback, but how?
   }
}

JP
Top achievements
Rank 1
 answered on 02 Dec 2013
6 answers
718 views
Greetings,

I'm currently evaluating RadGrid as my manager considers using it in a new project.
My manager asked me to examine the batch mode. One of his requirements is that new rows should be added to the bottom of the grid instead of the current behaviour of adding to the top.

addNewRecord adds to the top by default. Can I configure the grid to change this behaviour?
And if the answer is no, can I resort to a DOM hack to add the record TR element to the bottom? Will this be safe?
أشرف
Top achievements
Rank 1
 answered on 02 Dec 2013
1 answer
280 views
How to get value form select autocomplete entrise 
Princy
Top achievements
Rank 2
 answered on 02 Dec 2013
1 answer
116 views
When you add the filter and EnableRangeFiltering is set to true it shows the to and the from on the same line, is there a way to have it right justified and on 2 lines?
Venelin
Telerik team
 answered on 02 Dec 2013
1 answer
92 views

Hi There

I have a RadComboBox

And definition look like this

<telerik:RadComboBox Filter="Contains" runat="server" ID="cmbTechnicalServicePerson" Width="420px"

        MarkFirstMatch="true" DataSourceID="DSGetTechnicalServicePerson"

        HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"

        OnDataBound="cmbTechnicalServicePerson_DataBound" OnItemDataBound="cmbTechnicalServicePerson_ItemDataBound"

        LabelWidth="100" Label="Technical Service Name:" Skin="Office2010Black" Style="position: absolute; top: 310px; left: 21px; z-index: 6500; height: 16px;" EmptyMessage="Select  a Value" TabIndex="3">

        <HeaderTemplate>

            <ul>

                <li class="col1">Name</li>

                <li class="col2">Position</li>

                <li class="col2">Unit</li>

            </ul>

        </HeaderTemplate>

        <ItemTemplate>

            <ul>

                <li class="col1">

                    <%# DataBinder.Eval(Container.DataItem, "[FULLNAME]")%></li>

                <li class="col2">

                    <%# DataBinder.Eval(Container.DataItem, "Position")%></li>

                <li class="col3">

                    <%# DataBinder.Eval(Container.DataItem, "[Department]")%></li>

            </ul>

        </ItemTemplate>

        <FooterTemplate>

            A total of

                    <asp:Literal runat="server" ID="RadComboItemsTCount" />

            items

        </FooterTemplate>

 

    </telerik:RadComboBox>

Some time user would like to un select the selected value but this setting  does not allow them. Initial the EmptyMessage="Select  a Value" appear but as soon as they select something they will not be able to unselect to the empty value

Can someone please give some suggestion?

Many thanks

Syed

Nencho
Telerik team
 answered on 02 Dec 2013
5 answers
91 views
Greetings,

My manager asked me to achieve some UI behaviours that I thought should be implemented by creating a new grid column type.

I read through the documentation but still can't make my mind on how to achieve the required functionality.

Is it necessary to create a custom column editor (inheriting from GridColumnEditorBase)? Or just inheriting from GridEditableColumn will be sufficient? Taking into account that we plan to use the batch mode heavily, so we will need some client side coding.

Are there any examples covering this subject?
Antonio Stoilkov
Telerik team
 answered on 02 Dec 2013
2 answers
119 views
Hell friends,
I have used RadTabStrip in my one of my application asp.net page. When the page is rendering in the IE browser the RadTabStript width is going weird to some about 5310px width and stretching the page horizontally. When I see in the developer toolbar the width="5310px"  is being written to <ul> tag. This <ul> tag is part of RadTabStrip. Can anybody help me to solve this problem.

P.S: I have already tried to set ul { width:100%!important; } but not working
Sumit
Top achievements
Rank 1
 answered on 02 Dec 2013
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?