Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
105 views

Hi,

I have been Googling for a solution but I haven't found one. What I need to do is relatively simple I think. I am using a GridHyperLinkColumn. Sometimes the user will not have permission to view a particular link though.

So, in the code behind what I have at the moment is something like the code below. What I need to fill in is the what goes here ?????? bit. Is it possible to populate NavigateUrl with something that will make OnItemCommand fire in the normal way?

protected void OnItemDataBound(object sender, GridItemEventArgs e)
{
    var gridDataItem = e.Item as GridDataItem;
 
    if (gridDataItem != null)
    {
        var entity = gridDataItem.DataItem as MyEntity;
          
        if (entity != null)
        {
            if (CanViewThisEntity)
            {
                var url = GetLinkForEntitySomehow();
                var link = (HyperLink)gridDataItem["Name"].Controls[0];
 
                if (!string.IsNullOrEmpty(url))
                {
                    link.NavigateUrl = url;
                }
            }
            else
            {
                      what goes here ??????
            }

My problem at the moment is that OnItemCommand will fire only if the cell is clicked somewhere outside the text of the anchor tag (because the anchor is being rendered without a link).Or is there a better way maybe. I hope I am making sense! 

Thanks.

 

Eyup
Telerik team
 answered on 02 Feb 2016
3 answers
70 views

I have a legacy .net application code using AjaxManager control associated with dropdowns and a button. It works fine with earlier versions of IE but when accessing the site through IE10 the dropdown doesnot cause a postback while the button control still works fine.Can you please suggest what could be the issue and how can it be fixed?

below is the html generated for the dropdown(used alphabets for actual usercontrol names):

<select name="a$b$c$lstddl" onchange="javascript:setTimeout(&#39;window['
                a_b_c_RadAjaxManager1'].AsyncRequest(\&#39;a$b$c$lstddl\&#39;,\&#39;\&#39;)&#39;, 0)" id="a_b_c_c_listddl" style="width:310px;">
Viktor Tachev
Telerik team
 answered on 02 Feb 2016
1 answer
227 views

Is there any way to close dropdowntree but with selected item in place. Now I need to click somewhere outside tree window to select item and close dropdown.

I try to use toggleDropdow and closeDropdown in added entry event but it only close dropdown wothout selecting item.

Marko

Nencho
Telerik team
 answered on 02 Feb 2016
7 answers
500 views

I am have a user control in a parent page. The parent page has two RadGrids and the user control has one RadGrid. When an item is selected in one of the parent grids, the grid in the user control is updated. The UC grid uses batch editing, but both parent grid are read only. This all works, except a JavaScript error "Unable to get value of property 'id' object is null or undefined." which occurs in the Telerik.Web.UI.Grid.GridBatchEditingScripts.js file.

Between the two there are 4 files with lots of code. I would like to attach a zip file so that you can look at the code, but this forum will not allow it and because it seems to be a RadGrid JavaScipt error, I cannot isolate just where in the code the error is occurring. So I can't copy any code to this forum. Also there is no other JavaScript on the page or on the UC.

Does anyone have an idea of what might be causing this error or to at least give me some idea where to look?

Thanks,

~Sonny

Konstantin Dikov
Telerik team
 answered on 02 Feb 2016
1 answer
168 views

How do I delete the border bottom  on my RadTabStrip? See attached Picture....

I use RenderMode="Lightweight"

Veselin Tsvetanov
Telerik team
 answered on 02 Feb 2016
10 answers
222 views
Hi. Got an interesting issue here. I am performing a cascading drop down set of controls using comboboxes. If the browser is refreshed (either through F5 or the refresh button) in FF after the first combobox has made a selection, the first combobox will retain it's selection while IE11 and Chrome will reset to initial load settings. This example also uses RadAjaxManager and RadAjaxManagerProxy to simulate the real world problem I am having where the user control with the comboboxes is using the proxy object.
HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FF_Combobox_Test.aspx.cs" Inherits="testwebapplication.FF_Combobox_Test" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="scriptmanager" runat="server"></telerik:RadScriptManager>
        <div>
            <telerik:RadAjaxManager ID="ajaxmanager" runat="server"></telerik:RadAjaxManager>
            <telerik:RadAjaxManagerProxy ID="proxy" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="FirstBox">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="SecondBox" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <telerik:RadComboBox ID="FirstBox" runat="server" AutoPostBack="true"
                OnSelectedIndexChanged="FirstBox_SelectedIndexChanged" CausesValidation="false">
            </telerik:RadComboBox>
            <telerik:RadComboBox ID="SecondBox" runat="server" EnableLoadOnDemand="true" EnableVirtualScrolling="true" AllowCustomText="true"
                AutoPostBack="true" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" EmptyMessage="TEST TIME!" CausesValidation="false"
                OnItemsRequested="RadComboBox1_ItemsRequested">
            </telerik:RadComboBox>
 
        </div>
    </form>
</body>
</html>

Code-Behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace testwebapplication
{
    public partial class FF_Combobox_Test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            List<string> testlist = new List<string>();
            testlist.Add("Americas");
            testlist.Add("Asia");
            testlist.Add("Europe");
            FirstBox.DataSource = testlist;
            FirstBox.DataBind();
        }
 
        protected void RadComboBox1_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
 
        }
 
        protected void RadComboBox1_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
        {
            List<string> testlist;
            switch (FirstBox.SelectedItem.Text)
            {
                case "Americas":
                    testlist = AmericasList();
                    break;
                case "Asia":
                    testlist = AsiaList();
                    break;
                case "Europe":
                    testlist = EuropeList();
                    break;
                default:
                    testlist = new List<string>();
                    break;
            }
 
            foreach (string item in testlist)
            {
                SecondBox.Items.Add(new Telerik.Web.UI.RadComboBoxItem(item));
            }
        }
 
        protected void FirstBox_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            SecondBox.Text = String.Empty;
            SecondBox.DataBind();
        }
 
 
        private List<string> AmericasList()
        {
            List<string> test = new List<string>();
            test.Add("AMERICA1");
            test.Add("AMERICA2");
            test.Add("AMERICA3");
            return test;
        }
 
        private List<string> AsiaList()
        {
            List<string> test = new List<string>();
            test.Add("ASIA1");
            test.Add("ASIA2");
            test.Add("ASIA3");
            return test;
        }
 
        private List<string> EuropeList()
        {
            List<string> test = new List<string>();
            test.Add("EUROPE1");
            test.Add("EUROPE2");
            test.Add("EUROPE3");
            return test;
        }
    }
}

I should also note that after the page is refreshed, if the second combobox is opened, it will fire the first combobox's selectionchanged event.

Any clue what its doing, what I may be doing wrong and if this is a real bug?

Also, this is using v2013.2.611.45.

Thanks!
Veselin Tsvetanov
Telerik team
 answered on 02 Feb 2016
1 answer
58 views
Hi,
I have radtreeview control which has been bound with data.  I’ve like to search all the nodes (server side) and return all those with a specific attribute.
I tried findbyattribute but this only returns a single node.  I’ve like to return a collection of nodes?
Any idea how this can be accomplished please?
Ivan Danchev
Telerik team
 answered on 02 Feb 2016
5 answers
94 views
How i can change behavior of click on Button "Open Item" in Reminder dialog?

There are events for Triggering, Snoozing, Dismissing, but not for this. I don't wont to open AdvancedForm, but my own page in radwindow.
Nencho
Telerik team
 answered on 02 Feb 2016
1 answer
145 views

Hi Admin,

 We have a requirement that we need to open the multi page tif files and select /save individual tif page using ASP.net application... i did't find any control which will do this functionality in UI for ASP.NET AJAX.

Recently we purchased this controls. is it possible to implement this functionality using 2015 release version? please let me know your thoughts

Thanks

Dev

 

Vessy
Telerik team
 answered on 02 Feb 2016
2 answers
233 views
Hello

I try to set a new arrow image in the combobox.
But I am not able to

Code below:

/*global*/

.RadComboBox_Wkb,

.RadComboBox_Wkb .rcbInput,

.RadComboBoxDropDown_Wkb

{

font-family: Calibri !important;

font-size: 14px !important;

color:rgb(255,71,71);

}

/* combobox */

div.RadComboBox_Wkb table

{

height: 16px !important;

line-height: 15px;

}

div.RadComboBox_Wkb table td.rcbInputCell

{

height: 16px !important;

line-height: 15px;

border: solid 1px rgb(71,71,71) !important;

background: rgb(255,255,255) !important;

}

* html div.RadComboBox_Wkb table td.rcbInputCell

{

height: 16px !important;

line-height /**/: 16px;

}

div.RadComboBox_Wkb table td.rcbInputCellLeft { border-width: 1px 0 1px 1px; }

div.RadComboBox_Wkb table td.rcbInputCellRight { border-width: 1px 1px 1px 0; }

* html div.RadComboBox_Wkb .rcbInputCell .rcbInput

{

height: 16px !important;

padding /**/: 2px 0; /* This should fix the ajax introduced height in IE7 and not break IE6 */

}

.RadComboBox_Wkb .rcbInputCell .rcbEmptyMessage

{

color:rgb(71,71,71);

}

.RadComboBox_Wkb .rcbInputCell .rcbInput

{

font-family: Calibri !important;

font-size: 14px !important;

color:rgb(71,71,71);

height: 15px !important;

}

.RadComboBox_Wkb .rcbHovered .rcbInputCell .rcbInput

{

color:rgb(71,71,71);

height: 15px !important;

}

.RadComboBox_Wkb .rcbFocused .rcbReadOnly .rcbInputCell .rcbInput {

color:rgb(71,71,71);

height: 13px !important;

}

.RadComboBox_Wkb .rcbFocused .rcbInputCell .rcbInput

{

color:rgb(71,71,71);

height: 13px !important;

}

div.RadComboBox_Wkb table td.rcbArrowCell

{

border: solid 1px rgb(71,71,71) !important;

background: rgb(240,240,240)  url("~/CustomStyles/images/icons/normal/rcbSprite.png") no-repeat -1px 50%;

}

div.RadComboBox_Wkb .rcbReadOnly .rcbArrowCellLeft,

div.RadComboBox_Wkb .rcbArrowCellHidden.rcbArrowCellLeft { border-width: 1px 0 1px 1px; }

div.RadComboBox_Wkb .rcbReadOnly .rcbArrowCellRight,

div.RadComboBox_Wkb .rcbArrowCellHidden.rcbArrowCellRight { border-width: 1px 1px 1px 0; }

.RadComboBox_Wkb td.rcbArrowCell { background-position: -1px 50%; }

.RadComboBox_Wkb .rcbHovered .rcbArrowCell { background-position: -21px 50%; }

.RadComboBox_Wkb .rcbFocused .rcbArrowCell { background-position: -41px 50%; }

.RadComboBox_Wkb .rcbDisabled .rcbArrowCell { background-position: -61px 50%; }

.RadComboBox_Wkb .rcbReadOnly td.rcbArrowCell { background-position: -2px 50%; }

.RadComboBox_Wkb .rcbHovered .rcbReadOnly .rcbArrowCell { background-position: -22px 50%; }

.RadComboBox_Wkb .rcbFocused .rcbReadOnly .rcbArrowCell { background-position: -42px 50%; }

.RadComboBox_Wkb .rcbDisabled .rcbReadOnly .rcbArrowCell { background-position: -62px 50%; }

.RadComboBox_Wkb td.rcbArrowCellHidden,

.RadComboBox_Wkb .rcbHovered td.rcbArrowCellHidden,

.RadComboBox_Wkb .rcbFocused td.rcbArrowCellHidden,

.RadComboBox_Wkb .rcbReadOnly td.rcbArrowCellHidden,

.RadComboBox_Wkb .rcbHovered .rcbReadOnly .rcbArrowCellHidden,

.RadComboBox_Wkb .rcbFocused .rcbReadOnly .rcbArrowCellHidden,

.RadComboBox_Wkb .rcbDisabled .rcbReadOnly .rcbArrowCellHidden,

.RadComboBox_Wkb table.rcbDisabled td.rcbArrowCellHidden { background: none; }

 

.RadComboBox_Wkb .rcbHovered .rcbArrowCell,

.RadComboBox_Wkb .rcbHovered .rcbReadOnly .rcbInputCell,

.RadComboBox_Wkb .rcbHovered .rcbReadOnly .rcbArrowCellHidden

{

}

.RadComboBox_Wkb .rcbFocused .rcbArrowCell,

.RadComboBox_Wkb .rcbFocused .rcbReadOnly .rcbInputCell,

.RadComboBox_Wkb .rcbFocused .rcbReadOnly .rcbArrowCellHidden

{

border: solid 2px rgb(86,152,197) !important;

}

 

div.RadComboBox_Wkb .rcbHovered .rcbArrowCell,

div.RadComboBox_Wkb .rcbHovered .rcbInputCell

{

font-family: Calibri !important;

font-size: 14px !important;

color:rgb(71,71,71);

height: 15px !important;

border-color: #F739BB;

}

div.RadComboBox_Wkb .rcbFocused .rcbArrowCell,

div.RadComboBox_Wkb .rcbFocused .rcbInputCell

{

font-family: Calibri !important;

font-size: 14px !important;

color:rgb(71,71,71);

height: 13px !important;

border-color: #F739BB;

}

div.RadComboBox_Wkb .rcbDisabled .rcbArrowCell,

div.RadComboBox_Wkb .rcbDisabled .rcbInputCell

{

border-color: rgb(171,171,171);

font-family: Calibri !important;

font-size: 14px !important;

color: rgb(171,171,171);

}

div.RadComboBox_Wkb .rcbArrowCell a

{

height: 16px !important;

}

div.RadComboBox_Wkb td.rcbArrowCellHidden,

div.RadComboBox_Wkb .rcbArrowCellHidden a

{

width: 1px;

}

div.RadComboBox_Wkb td.rcbArrowCellHidden.rcbArrowCellRight

{

border-left: 0;

}

/* dropdown */

.RadComboBoxDropDown_Wkb

{

border-color: rgb(86,152,197) !important;

border-style: solid !important;

border-width: 2px !important;

background-color: #ffffff;

}

 

.RadComboBoxDropDown_Wkb .rcbHeader,

.RadComboBoxDropDown_Wkb .rcbFooter

{

padding-top: 2px;

padding-bottom: 2px;

color: #FF0000;

background-color: #F739BB;

}

.RadComboBoxDropDown_Wkb .rcbHeader

{

border-bottom-color: rgb(86,152,197) !important;

}

.RadComboBoxDropDown_Wkb .rcbFooter

{

border-top-color: rgb(86,152,197) !important;

}

html .RadComboBoxDropDown_Wkb .rcbHeader,

html .RadComboBoxDropDown_Wkb .rcbFooter

{

margin: 0;

padding-top: 2px;

padding-bottom: 2px;

border: 0;

}

.RadComboBoxDropDown_Wkb .rcbItem em

{

background: rgb(86,152,197) !important;

color: rgb(255,255,255) !important;

}

div.RadComboBoxDropDown_Wkb .rcbHovered

{

padding: 1px 5px;

border: 1px solid rgb(86,152,197) !important;

color: #ffffff;

background-color: rgb(86,152,197) !important;

}

.RadComboBoxDropDown_Wkb .rcbSeparator

{

color: rgb(255,0,0) !important;

background-color: rgb(200,100,200) !important;

}

.RadComboBox_Wkb .rcbDisabled .rcbInputCell .rcbInput,

.RadComboBoxDropDown_Wkb .rcbDisabled

{

border-color: rgb(171,171,171);

font-family: Calibri !important;

font-size: 14px !important;

color: rgb(171,171,171);

}

.RadComboBoxDropDown_Wkb .rcbLoading

{

}

.RadComboBoxDropDown_Wkb .rcbMoreResults

{

border-top-color: rgb(86,152,197) !important;

background: rgb(86,152,197) !important;

color: rgb(255,255,255) !important;

}

.RadComboBoxDropDown_Wkb .rcbMoreResults a

{

background: url("~/CustomStyles/images/icons/normal/rcbSprite.png") no-repeat -41px -3px;

}

 

div.RadComboBox_Wkb .rcbDisabled .rcbInputCell {

background: rgb(230,230,230) !important;

font-family: Calibri !important;

font-size: 14px !important;

color: rgb(171,171,171);

}

div.RadComboBox_Wkb .rcbDisabled .rcbArrowCell {

background-image: url("~/CustomStyles/images/icons/normal/arrow.png");

background-repeat: repeat-x;

}


William
Top achievements
Rank 1
 answered on 01 Feb 2016
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?