Hi,
.NET provides a standard mechanism to resolve any needed assembly via the AssemblyResolve event (https://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.110).aspx).
Besides self-implementing this event there are tools (like SmartAssembly) which use this mechanism.
We use this mechanism to make application deployment (including ASP.NET applications) as painless and easy as possible.
With Telerik ASP.NET this does not work :-(
Please provide some way/sample/API to make it possible to embed Telerik ASP.NET assemblies.
Thanks in advance.
Best Regards
Yahia El-Qasem
Hello,
I have a Radnavigation usercontrol that is registered on a page (<%@ Register Src="../controls/NavPanelAdmin.ascx" TagName="NPA" TagPrefix="ucNPA" %>)
I need to select that radnav items based on the item click (serverside)
When i perform a search for the control in the page that has the UC registered i am able to find the RADNAV but i cannot access it due to the following error
Unable to cast object of type 'ASP.controls_navpaneladmin_ascx' to type 'Telerik.Web.UI.RadNavigation'.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'ASP.controls_navpaneladmin_ascx' to type 'Telerik.Web.UI.RadNavigation'.
Source Error:
Line 274: controlList.Add(c.ID) Line 275: If c.ID = "mymenu123" Then Line 276: Dim smenu As RadNavigation = c Line 277: smenu.ForeColor = Drawing.Color.Aquamarine Line 278: End If
Stack Trace:
[InvalidCastException: Unable to cast object of type 'ASP.controls_navpaneladmin_ascx' to type 'Telerik.Web.UI.RadNavigation'.]
Private
Sub
ListControlCollections()
Dim
controlList
As
New
ArrayList()
AddControls(Page.Controls, controlList)
For
Each
str
As
String
In
controlList
Response.Write(str & Convert.ToString(
"<br/>"
))
Next
Response.Write(
"Total Controls:"
+ controlList.Count.ToString)
End
Sub
Private
Sub
AddControls(page
As
ControlCollection, controlList
As
ArrayList)
For
Each
c
As
Control
In
page
If
c.ID IsNot
Nothing
Then
controlList.Add(c.ID)
If
c.ID =
"mymenu123"
Then
Dim
smenu
As
RadNavigation = c
smenu.ForeColor = Drawing.Color.Aquamarine
End
If
End
If
If
c.HasControls()
Then
AddControls(c.Controls, controlList)
End
If
Next
End
Sub
Hi,
I am trying to use a jquery ajax call to get my data for an htmlchart and am fine with the data itself but when I come to add it to the chart I would like to dynamically create the series on the fly. With that in mind please could someone supply me with an example of how to create a new (or several new) series on a chart?
Note that I don't want to declare the series in the tags - these need to be declared from the JS...
Regards
Jon
i am using raidGrid
void BindData()
{
grid_1.DataSource = Names.GetDeailesByGetall(con);
grid_1.DataBind();
}
Hello I am having one issue on RadGrid. I have a simple Employee list which I am binding in Page_Load inside !IsPostBack check.
As soon as, a postback happens (whether it is due to a button click or due to allowsorting (automatic sort)); the grid disappears. This is because NeedDataSource is not executed on postback.
However, if I write RadGrid1.Rebind() then NeedDataSource is executed.
Does this means everytime when a postback happens, I have to call RadGrid1.Rebind() to bind the grid (whether it is due to a button click or due to allowsorting (automatic sort))?
I remember in earlier version we did not needed to call Rebind() method to make NeedDataSource execute.
Please help.
Scenario:
Grid with a GridDropDown column. The source for the drop down is a simple table of name/id pairs. If doing an update in batch mode, and the drop down's ListTextField has trailing spaces, the ListValueField won't be passed back during an update.
See sample below. At line 20 is the code to create the sample SQL data.
When running this sample, if you attempt to update a row and use any of the drop downs that end in spaces, the update will not assign the correct id value. If you change the edit mode from batch to popup, it will work fine. If you change line 42 to read:
ListTextField="name_trimmed" or ListTextField="name_appended"
both of which change the field to NOT end in trailing spaces, it will work as well.
I was able to work around this, but it's definitely a bug in the control. Trailing spaces should not throw of the ListValueField. I'm currently using version 2016.2.607.45
01.
<%@ Page Language="C#" %>
02.
03.
<!DOCTYPE html>
04.
05.
<
script
runat
=
"server"
>
06.
07.
</
script
>
08.
09.
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
10.
<
head
runat
=
"server"
>
11.
<
title
></
title
>
12.
</
head
>
13.
<
body
>
14.
<
form
id
=
"form1"
runat
=
"server"
>
15.
<
div
>
16.
17.
<
asp:ScriptManager
runat
=
"server"
ID
=
"scriptmgr"
/>
18.
19.
<%--
20.
/* SQL code to create tables and test data */
21.
create table dropdownvalues (id int identity(1,1), name varchar(200))
22.
create table datalist (id int identity(1,1), dropdown_id int)
23.
insert into dropdownvalues (name) values('no spaces'), ('spaces ')
24.
25.
insert into datalist(dropdown_id)
26.
select top 2 id from dropdownvalues
27.
28.
insert into dropdownvalues (name) values('three spaces ')
29.
insert into dropdownvalues (name) values('forty spaces ')
30.
insert into dropdownvalues (name) values('zero spaces')
31.
--%>
32.
33.
<
telerik:GridDropDownListColumnEditor
runat
=
"server"
ID
=
"ddeditor"
DropDownStyle-Width
=
"200"
/>
34.
35.
<
telerik:RadGrid
runat
=
"server"
DataSourceID
=
"sql_source"
AllowAutomaticUpdates
=
"true"
AutoGenerateColumns
=
"false"
>
36.
<%--Works fine in PopUp edit mode--%>
37.
<
MasterTableView
EditMode
=
"Batch"
CommandItemDisplay
=
"Top"
DataKeyNames
=
"id"
>
38.
<
Columns
>
39.
<
telerik:GridEditCommandColumn
/>
40.
<
telerik:GridBoundColumn
DataField
=
"id"
HeaderText
=
"id"
ReadOnly
=
"true"
/>
41.
<
telerik:GridDropDownColumn
DataField
=
"dropdown_id"
HeaderText
=
"dropdown_id"
DataSourceID
=
"sql_dropdown"
42.
ListValueField
=
"id"
ListTextField
=
"name"
HeaderStyle-Width
=
"400"
ColumnEditorID
=
"ddeditor"
/>
43.
<
telerik:GridBoundColumn
DataField
=
"saved_dropdown_id"
HeaderText
=
"saved_dropdown_id"
ReadOnly
=
"true"
/>
44.
</
Columns
>
45.
</
MasterTableView
>
46.
</
telerik:RadGrid
>
47.
48.
<
asp:SqlDataSource
ConnectionString="<%$ ConnectionStrings:MyDB%>" ID="sql_source" runat="server"
49.
SelectCommand="select *, dropdown_id as saved_dropdown_id from datalist"
50.
UpdateCommand="update datalist set dropdown_id=@dropdown_id where id=@id"
51.
/>
52.
53.
<
asp:SqlDataSource
ConnectionString="<%$ ConnectionStrings:MyDB%>" ID="sql_dropdown" runat="server"
54.
SelectCommand="select id,name, rtrim(name) name_trimmed, name + '-' name_appended from dropdownvalues order by name" />
55.
</
div
>
56.
</
form
>
57.
</
body
>
58.
</
html
>