Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
637 views
Hi there.

How would I iterate through the DataSource of a grid? I have items that are not in a column, but are part of the datasource that I need to get at.

Thanks, Mike
robertw102
Top achievements
Rank 1
 answered on 21 Apr 2010
3 answers
174 views
I'm trying to use a ColorPicker in a DetailView to allow a user to change the assigned color of a matching record. Below is my code:

<asp:TemplateField>   
<HeaderStyle/>   
<HeaderTemplate>AssignedColor:</HeaderTemplate>   
<EditItemTemplate><telerik:radcolorpicker ID="rcpAssignedColor" runat="server" preset="Standard" SelectedColor='<%#Bind("AssignedColor")%>'></telerik:radcolorpicker></EditItemTemplate>  
<ItemTemplate><%#Eval("AssignedColor")%></ItemTemplate>  
</asp:TemplateField>

But when I view the page with loaded data and switch to Edit mode I'm getting the following error on the EditItemTemplate line: System.InvalidCastException: Specified cast is not valid.

Is there another way to bind data to the ColorPicker control?
Michael
Top achievements
Rank 1
 answered on 21 Apr 2010
0 answers
78 views
Some of our comboboxes have thousands of items. The end result is when the user clicks the drop down to expand the list of items, there is a very noticeable delay. I've tried different features like load on demand and type ahead, but they don't all work for every situation.

For example, for combo boxes that have a selected item, I'm not sure I can use load on demand. If, say, I set the combo box to load 100 at a time, but the selected item is number 300, will it cause an exception?

And type ahead helps, but the user still might click the drop down.

Any help?
e
Top achievements
Rank 2
 asked on 21 Apr 2010
2 answers
103 views
We're having a problem with the RadFileExplorer.OnClientItemSelected javascript method.  The method always gets the data for the first file item instead of the selected one.  Here is the javascript:

            function OnClientItemSelected(sender, args)
            {
               if (args.get_item().get_type() == Telerik.Web.UI.FileExplorerItemType.File)
               {
                   // if the item is a file
                   var file = ""File path : "" + args.get_item().get_path() + ""\n"";
                   file = file + ""File size : "" + args.get_item().get_size();
                   var label = $get(""" + labelClientID + @""");
                   label.innerText = file;
                   alert(""Selected file: \n"" + file);
               }
               else
               {// folder
                   alert(""The selected item is a directory"");
               }
               alert(""OnClientItemSelected : "" + (args instanceof Telerik.Web.UI.RadFileExplorerEventArgs).toString());
            }

So it seems that the args.get_item() is always selecting the first file item.  How do we fix this?  I've also attached a screenshot.  You can see the info in the label is for the first file instead of the selected one.
Ryan Fligg
Top achievements
Rank 1
 answered on 21 Apr 2010
1 answer
89 views
Just the title suggests, Firefox is turning <br> into two and two into four at each page submit.  IE is fine.  Default Content Filters are applied (or just not set) in this case.  I am linking to a Tools File to add aditional Symbols and only use the Ajax Spellchecker as the tools for the editors.

Both styles of Javascript Event attaching yield the same result

Method 1: using OnClientSubmit="OnClientSubmit" to attach the JS

 

function OnClientSubmit(editor)

 

{

    editor.fire(

"FormatStripper", { value: "ALL_NO_BRAKES" });

 

}


Method 2: using OnClientLoad="OnClientLoad" to attach the JS

 

function OnClientLoad(editor, args)

 

{

    editor.add_submit(

function ()

 

    {

        editor.fire(

"FormatStripper", { value: "ALL_NO_BRAKES" });

 

    });

}

I will be trying an update set of Controls, but the version of Telerik.Web.UI.dll used is 2009.3.1208.20.

Tom
Top achievements
Rank 1
 answered on 21 Apr 2010
3 answers
207 views
I currently have am working on encrypting all of the URLs in my web application and was thinking about using a control adapter to find any window.location changes and encrypting the URL.

However I cannot find which properties I would use in order to find out what is inside the RadCodeBlock.  Any ideas?
Kalina
Telerik team
 answered on 21 Apr 2010
3 answers
178 views
I have looked at all the samples and decided the one theat was displayed with the entity datasource would work perfect
Except it does not work at all.
The code below is exactly the same as the demo. It shows all the items after clicking if you give it five minutes or so even thoughtit is in a radajaxpanel and I have tried with a cached Datatable as well nothing seems to work. It is getting very frustrating. I am not sure what the problem is there are 2,700+ but that should display in a few seconds flat especially with a cached datatable...It does not do anything like what the samples are displaying, and I have a project to get done in a short period.
Example

 

<telerik:RadComboBox ID="cboAgent" runat="server" DataSourceID="SqlDataSource1" DataTextField="AgentsName" DataValueField="AgentID" EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true" />

 

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dbLookUpsConnection %>" SelectCommand="sp_HomeInfoLine_GetAgents" SelectCommandType="StoredProcedure"></asp:SqlDataSource>

 

Ok so I went back to the demo and the linqDatasource one does not work either it sticks on loading and never comes back. the enitydatasource one works great on the site but not here

 

Simon
Telerik team
 answered on 21 Apr 2010
1 answer
82 views
Hi all.
I have a radgrid with template columns populating on the client by webservice.
I have a problem, when I want to set page size to value bigger than on the beginning. I see in firebug that, in the added row, there aren't my fields which I added to the templates, so grid thrown a exception from the OnRowDataBound client event. What can I do with it?
Rosen
Telerik team
 answered on 21 Apr 2010
1 answer
106 views
Hi,

I have a RadCalendar inside a Datalist. I want to pass each item's ID value in the OnDayRender method of the RadCalendar..


Thnx a lot!!!
robertw102
Top achievements
Rank 1
 answered on 21 Apr 2010
1 answer
104 views

Hi All,

I have a rad combo inside a div which is collapsable by jquery.But since the combo is within this div it gets hanged or freezed when there  is postback event.if we remove the jquery for the div then it works fine how do I make it to work fine along with jquery.your help would be highly appreciated.

Regards,
Newton

Kalina
Telerik team
 answered on 21 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?