Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
92 views
Hi,

I'm using the RadGrid in WebUserControl EditMode, and I've dynamically added two dropdownlists (they are inherited extensions of the ASP dropdownlists) and one CascadingDropDown from the AjaxControlToolkit.
If I do this inside my edit user control, I get a NullReference exception, the stacktrace is here:
   at AjaxControlToolkit.ExtenderControlBase.GetScriptDescriptors(Control targetControl)
   at System.Web.UI.ExtenderControl.System.Web.UI.IExtenderControl.GetScriptDescriptors(Control targetControl)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)
   at Telerik.Web.UI.ProxyScriptControl.GetScriptDescriptors()
   at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at Telerik.Web.UI.ProxyScriptControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
[...]

The edit control works if I don't add the CascadingDropDown to the control tree, and everything works if I add it outside the grid.

What should I try?

Thanks,


   At.
Sebastian
Telerik team
 answered on 11 Nov 2009
1 answer
261 views

I use problems binding RadGrid to Entity Framework-objects.

I have two tables:

User:
UserID
Name
Age
GroupID

Group:
GroupID
Name

In entity framework, i get two Entitytypes. First User with properties UserID, Name, Age and Navigation property Group. Entity set name is set to Users. Second EntityType is Group with GroupID and Name as properties, and a navigation property named Users pointing to a collection of User-entities.

To fetch all users and include the group i use the following code:

private List<User> GetUsers()  
{  
 var users = from u in entities.Users  
   .include("Group")  
   select u;  
 return users.ToList();  
    
} 

Binding the grid to the list of User-objects is no problem.

Grid.Datasource = GetUsers();  
Grid.Databind();  
 
 

I add the following columns to the grid.

<telerik:GridBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name" />  
<telerik:GridBoundColumn DataField="Age" UniqueName="Age" HeaderText="Age" />  
<telerik:GridBoundColumn DataField="Group.Name" UniqueName="Group" HeaderText="Group Name" />  
 
 

All data is displayed, no problem yet.

I want the 3rd column to be a GridDropDownColumn instead. I tried to use a GridDropDownColumn, but it didn't work, all rows were blank:

<telerik:GridDropDownColumn DataField="Group.Name" UniqueName="Group" HeaderText="Group" />  
 
 

I read in another thread that GridDropDownColumn is mainly for DataTables, so i tries to use GridTemplateColumn instead, and it almost works.

 

<telerik:GridTemplateColumn DataField="Group.Name" UniqueName="Group" HeaderText="Group">  
 <ItemTemplate>  
  <asp:Label ID="Label1" runat="server" Text='<%#Bind("Group.Name") %>'></asp:Label>  
 </ItemTemplate>  
 <EditItemTemplate>  
  <telerik:RadComboBox ID="EditGroupRadComboBox"  runat="server" />  
 </EditItemTemplate>  
</telerik:GridTemplateColumn>  
 

The RadComboBox is bound to data in ItemDataBound:

if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode)  
{  
 GridEditableItem editedItem = e.Item as GridEditableItem;  
 RadComboBox combo = (RadComboBox)editedItem.FindControl("EditGroupRadComboBox");  
 
 combo.DataSource = GetGroups(); //returns List<Group>  
 combo.DataTextField = "Name";  
 combo.DataValueField = "GroupID";  
 
 combo.DataBind();  
 combo.SelectedValue = ((User)editedItem.DataItem).Group.GroupID.ToString();   
}  
 
 

It works as expected, the groups are displayed in the RadComboBox, and the correct option is selected.

Now to the problem, how do I perform the update? I tried he following in ItemCommand-event, but the user-object contains the old values

if (e.CommandName == "Update")  
{  
 User user = e.Item.DataItem as User;  
}  
 

I looked at the following thread, with a similar problem: http://www.telerik.com/community/forums/aspnet-ajax/grid/radcombobox-in-gridtemplatecolumn.aspx
I tried to set SelectedValue='<%#Bind("Group.GroupID") %>', but i get an exception, saying Group.GroupID is invalid.

 
Kind Regards, Johan

Sebastian
Telerik team
 answered on 11 Nov 2009
2 answers
119 views
Hi,

In a hierarchical datagrid with two levels I am trying to keep the edited item expanded through

Public Sub Command_Row(ByVal Sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) 
 
If (TypeOf (e.Item) Is GridDataItem) Then 
'do the stuff here 
 
dtgProducts.ReBind() 
e.Item.OwnerTableView.ParentItem.Expanded = True 
End if 
 
End Sub 
Does anybody have a clue why this isn't working?

Marc






Fit2Page
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 11 Nov 2009
1 answer
50 views
Everytime that we click an image button inside an RadAjaxPanel in Firefox we get the same error:

"Input string was not in a correct format."

And the event onClick is not executed

In IE works fine.

We are using Q3 2009.

Thanks,

Ricard.
Martin
Telerik team
 answered on 11 Nov 2009
1 answer
72 views
Please let us know how to avoid autocomplete in Rad Date Input. Pls find the screen shot
Dimo
Telerik team
 answered on 11 Nov 2009
2 answers
93 views
Hi
I'm using RadTreeView and some other RadControls in a form.(two GridView and another TreeView)
I load's the page element's and then it waits about 10 seconds (that in this period the page freezes and even page doesn't scroll)
you can try it on our production server at these addresses:
http://95.38.44.247:12/UI/Items/ItemsClassification.aspx?Type=2
http://95.38.44.247:12/UI/Financial/AccountCoding.aspx



and the page layout complete.
I save the page and it has about 800 KB axd file that related to telerik, also we use jquery and some script codes that make all script size (plus AJAX axd) to about 1.1 MB.
I think this is the problem, isn't it?
if ti's, so how can I resolve this issue?
Thanks in advance
Mahdi
Top achievements
Rank 1
 answered on 11 Nov 2009
1 answer
100 views
Hello,

I try to make a page with some AJAX features.
The page contains the following telerik components:
    - RadSplitter
    - RadTreeView
    - RadScriptManager
    - RadAjaxManager
    - RadCodeBlock
    - RadTabStrip
    - RadMultiPage
The other things are plain html.
I had added some AJAX functionality. It worked fine and had a fast response time (0,03 s). Now I have the problem that the response time of the AJAX requests slow down if I add more Items in the RadTreeMenu. In this special case I have added 500 Items and the responsetime is 1,8s. During this time the server load is 100%. The rest of the page is still the same code, only the added items make it slow.
How can I solve this problem?
Paul
Telerik team
 answered on 11 Nov 2009
3 answers
154 views
Hi All,

I updated to the Q3 release and now my skins are a bit bugged. There seem to be some spacing problems in some controls, see the attached files.

Anyone having the same problem?

Augusto
Top achievements
Rank 1
 answered on 11 Nov 2009
5 answers
125 views
Is it possible to replicate the animation occur when you drag the dock to the dock command?
If yes, could you kindly show me a sample on how to archieve this?
Thanks.
Pero
Telerik team
 answered on 11 Nov 2009
3 answers
171 views
Hi,

I have integrated Telerik Ajax Controls in our asp.net web application. They seem to be working fine at most of the time. But occasionally, they do not completely render, for some reason. I am attaching an image of the produced bug, to give you better understanding of the problem.

Is any other person facing this problem. Is it a known issue in the SDK. I have found some people complaining that they are facing such problems using specific controls like Chart control. For chart, images are produced at run time, and the request for the image is processed by the server before the image is generated sometimes, due to which it produces the error of image not being found. But in this case, I think the images would be static. This should not be the problem then?

Regards
Athir Gillani
arnaud
Top achievements
Rank 1
 answered on 11 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?