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.
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('window['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
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
How do I delete the border bottom on my RadTabStrip? See attached Picture....
I use RenderMode="Lightweight"
<%@ 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>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
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
>
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;
}
}
}
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
/*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;
}