Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
My linq expression:

Root root = Root.GetInstance();
           var betriebe =
               from w in root.Query(Betrieb.Entity).ToArray()
               select new
               {
                   Betriebegruppe = "0",
                   Betrieb = w.Get(Betrieb.Werk),
                   Name = w.Get(Betrieb.Name),
                   Strasse = w.Get(Betrieb.Strasse),
                   PLZ = w.Get(Betrieb.Postleitzahl),
                   Ort = w.Get(Betrieb.Ort),
                   EKORG = w.Get(Betrieb.Einkaufsorganisation)
               };
 

returns an iterator like this:

System.Linq.Enumerable.WhereSelectArrayIterator<P0300_DAL.Data.AnyObject,<>f__AnonymousType0<string,string,string,string,string,string,string>>

If I bind this as datasource to a radgrid everything works fine. But when I bind it to an radtreelist, the columns were generated but the content is empty.

Do I have to do more than: 
treelist.DataSource = betriebe;
?
Here is my treelist declaration:
<telerik:RadTreeList runat="server" ID="rtl" AllowSorting="True" AllowMultiItemSelection="True"
    CausesValidation="false" ParentDataKeyNames="Betriebegruppe" DataKeyNames="Betrieb"
    AllowPaging="True" PageSize="20" Width="100%">
    <Columns>
    <telerik:TreeListCheckBoxColumn ></telerik:TreeListCheckBoxColumn>
    </Columns>
    <ClientSettings>
        <Selecting AllowItemSelection="true" UseSelectColumnOnly="true" />
    </ClientSettings>
</telerik:RadTreeList>


Nikolay Rusev
Telerik team
 answered on 14 Feb 2011
3 answers
134 views
hi,  i'm using a physical path with radexplorer, as mentioned in the kb article.
how is it possible that the radexplorer has permissions to access the folder even if i don't set any special permissions to the folder?
Rumen
Telerik team
 answered on 14 Feb 2011
3 answers
190 views
Hi,

We are trying to create a link button that will be used in a telerik grids edit template to launch a document that is stored in the database as a binary object. The issue is we have an encountered an error when the linkbutton is fired and runs the command in the item_command for the radgrid it errors out. We narrowed this down to being an issue with the response.Write so we were going to try the methods that were recommend in previous posts on this issue.

When we registered the control as a postbackcontrol with the scriptmanager it will not fire the command in the radgrids item_command method. The control is created in a seperate c# file from the radgrid and we need to know the datarow in order to pull the appropriate binary data for displaying the document.

Any help would be greatly appreciated,
Jonathan
Iana Tsolova
Telerik team
 answered on 14 Feb 2011
3 answers
388 views
Hi all
I have a RadGird and using Dropdownlist in RadGrid for User EditMode in RadGrid
Everything's fine, but when Editmode in RadGrid ...how i can load data in DropDownList for uers change value.?
When i debug i has error ..Object reference not set to an instance of an object.
<telerik:RadGrid ID="RadGrid1"
                        AutoGenerateColumns="False"  AllowSorting="False" AllowPaging="True" PageSize="300"
                        runat="server" GridLines="None" Width="100%"
                        onneeddatasource="RadGrid1_NeedDataSource"
                        onupdatecommand="RadGrid1_UpdateCommand"                   
                        onitemdatabound="RadGrid1_ItemDataBound" >
 <telerik:GridTemplateColumn HeaderText="UnitPrice" SortExpression="UnitPrice" UniqueName="TemplateColumn" >
                                    <ItemTemplate>
                                        <asp:Label runat="server" ID="ctract_type" Text='<%# Eval("ddlContact_type") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                       <asp:dropdownlist id="ddlContact_type" runat="server" >
                                         </asp:dropdownlist>
                                    </EditItemTemplate>
    </telerik:GridTemplateColumn>
Code behind

 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {

        DropDownList ddlContact_type = new DropDownList();
        ddlContact_type = (DropDownList)e.Item.FindControl("ddlContact_type");
        OracleConnection Conn = new OracleConnection("Data Source=ORCL;Persist Security Info=True;User ID=Test;Password=123;Unicode=True");
        OracleCommand cmd = new OracleCommand();
        cmd.Connection = Conn;
        cmd.CommandType = CommandType.Text;
        cmd.CommandText = "select ID,NAME from contact_type ";
        Conn.Open();
        try
        {
            OracleDataReader OrclReader = cmd.ExecuteReader();

            if (OrclReader.HasRows)
            {
                ddlContact_type.DataSource = OrclReader; //Error Object reference not set to an instance of an object.
               ddlContact_type.DataTextField = "NAME";
                ddlContact_type.DataValueField = "ID";
                ddlContact_type.DataBind();

            }
        }
        finally
        {
            Conn.Close();
        }
    }
Thank you
Chris
Shinu
Top achievements
Rank 2
 answered on 14 Feb 2011
1 answer
51 views
I have a date input where a user can choose to enter a date and time, or they can click on a button to load the current date and time.  I would prefer to set the value with client-side code if they click the button, but I cannot get it to work.  It will enter the current date, but not the time.  My control looks like:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script language="javascript" type="text/javascript">
      function setDateTimeAcknowledged() {
        var toDay = new Date();
        alert("toDay = " + toDay);
        var dateInput = $find("<%= dateAcknowledged.ClientID %>");
        dateInput.set_selectedDate(toDay);
      }
      function setEstReturnDate() {
        var toDay = new Date();
        var dateInput = $find("<%= dateEstimatedReturn.ClientID %>");
        dateInput.set_selectedDate(toDay);
      }
    </script>
</telerik:RadCodeBlock>
...
<telerik:RadDateInput ID="dateAcknowledged" runat="server" DisplayDateFormat="MM/dd/yyyy HH:mm" Width="125" CssClass="NotRequired" />
<telerik:RadToolTip ID="tipDateAcknowledge" runat="server" HideEvent="LeaveTargetAndToolTip" TargetControlID="dateAcknowledged" 
    Position="BottomRight" RelativeTo="Element" ShowEvent="OnMouseOver" 
    Text="mm/dd/yyyy HH:mm (24HR) format less than or equal to today's date" />
<asp:Button ID="btnAckNow" runat="server" Text="Now" CausesValidation="false" 
    OnClientClick="setDateTimeAcknowledged(); return false;" />

If I click on the button, the results will have the right date but not the time.  For example, if I run it right now I get "02/11/2011 00:00" inserted in the raddateinput field, while the alert shows "toDay = Fri Feb 11 15:56:36 CST 2011".

If I remove the OnClientClick parameter from the button, it will execute the server-side code that I have coded for the button.  It looks like:

Protected Sub btnAckNow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAckNow.Click
    dateAcknowledged.SelectedDate = Date.Now
  End Sub

The results are now '02/11/2011 15:57".

How do I need to code the client-side code so that it properly loads both the date and the time in the control?

Thank you!


Shinu
Top achievements
Rank 2
 answered on 14 Feb 2011
4 answers
106 views
Hello,

I have what is most likely a common scenario and I'm sure there's a solution lingering in these forums that I can't find.  I have a RadTabStrip and corresponding RadPageViews.  The content of each PageView is a UserControl on which is a RadGrid.  Each RadGrid has a RadToolBar within the CommandItemTemplate.  Here's my use case.  On tab A, user selects a bunch of rows on the grid and clicks the toolbar button "Move to Trash".  This in turn removes these items from the RadGrid on tab A and moves them into the RadGrid on tab B.  I would like to use the RadAjaxManager and specify that the grid on Tab A should update the grid on Tab B.  Given that these controls are logically seperated using UserControls, the RadAjaxManager does not see the other grid as an updatable control.

It's extremely important that these grids remain on seperate user controls so their corresponding code is logically seperated from each other.  I also do not want to update the entire TabStrip as that will cause huge performance issues.  Is there a solution to this?

Thanks,
Chris
TeleriikLover
Top achievements
Rank 1
 answered on 14 Feb 2011
15 answers
209 views
Telerik Team,

I would like to report the following problem which appear on 3 DotNetNuke Community 5 instance.

When I access the Document Library, I can access the first folder level only. When I try to access a folder contained in the Document Library root folder, the control loads indefinitly.

Is there is a known fix to this issue ?

Thank you

Environnement : 
Telerik.Web.UI.dll v2009.3.1115.20

ConfigFile.xml
<?xml version="1.0" encoding="utf-8" ?> 
<!-- ============================================================================================== 
    Config File valid structure: 
    <configuration> 
    <property>...</property> 
    ... 
        <property> 
            <item>...</item> 
            <item>...</item> 
            ... 
        </property> 
        ... 
    </configuration> 
=============================================================================================== --> 
<configuration> 
  <property name="Skin">Telerik</property> 
    <property name="ImagesPaths"
        <item>Contenus/images</item> 
    </property>  
    <property name="DocumentsPaths"
        <item>Contenus/documents</item> 
    </property>  
    <property name="FlashPaths"
        <item>Contenus/flash</item> 
    </property>  
    <property name="MediaPaths"
        <item>Contenus/flash</item> 
    </property>  
    <property name="TemplatePaths"
        <item>Templates</item> 
    </property>  
    <property name="FlashFilters">  
        <item>*.flv</item> 
        <item>*.mp3</item>   
    </property>  
  <property name="MaxFlashSize">81920000</property> 
  <property name="MaxMediaSize">81920000</property> 
  <property name="MaxImageSize">5120000</property> 
  <property name="MaxDocumentSize">10240000</property> 
  <property name="MaxTemplateSize">1024000</property> 
    <property name="UploadFlashPaths">Contenus/flash</property>  
</configuration> 


ToolsFile.xml
<?xml version="1.0" encoding="utf-8" ?> 
<root> 
    <modules> 
        <module name="RadEditorStatistics" dockingZone="Bottom"/> 
            <module name="RadEditorDomInspector" dockingZone="Module" enabled="true" visible="true" dockable="true" /> 
            <module name="RadEditorNodeInspector" dockingZone="Module" enabled="true" visible="true" dockable="true" /> 
            <module name="RadEditorDiagnostics" dockingZone="Module" enabled="true" visible="true" dockable="true" /> 
            <module name="RadEditorXhtmlValidator" dockingZone="Module" enabled="true" visible="true" dockable="true" /> 
            <module name="RadEditorHtmlInspector" dockingZone="Module" enabled="true" visible="false" dockable="true" /> 
    </modules> 
    <tools name="MainToolbar"
        <tool name="Print" shortcut="CTRL+P"/> 
        <tool name="AjaxSpellCheck"/> 
        <tool name="FindAndReplace" shortcut="CTRL+F"/> 
        <tool name="Cut" /> 
        <tool name="Copy" shortcut="CTRL+C"/> 
        <tool name="Paste" shortcut="CTRL+V"/> 
        <tool name="PasteStrip"/> 
        <tool separator="true"/> 
        <tool name="Undo" shortcut="CTRL+Z"/> 
        <tool name="Redo" shortcut="CTRL+Y"/> 
    </tools> 
    <tools name="InsertToolbar" > 
        <tool name="ImageManager" shortcut="CTRL+G"/> 
        <tool name="FlashManager" /> 
 
        <tool name="MediaManager" /> 
        <tool name="DocumentManager" /> 
        <tool name="TemplateManager" /> 
        <tool separator="true"/> 
        <tool name="LinkManager" shortcut="CTRL+K"/> 
        <tool name="Unlink" shortcut="CTRL+SHIFT+K"/> 
    </tools> 
     
    <tools> 
        <tool name="InsertParagraph" /> 
        <tool name="InsertGroupbox" /> 
        <tool name="InsertHorizontalRule" /> 
    </tools> 
     
    <tools> 
        <tool name="FormatBlock"/> 
        <tool name="FontName" shortcut="CTRL+SHIFT+F"/> 
        <tool name="RealFontSize" shortcut="CTRL+SHIFT+P"/> 
    </tools> 
 
    <tools> 
        <tool name="Bold" shortcut="CTRL+B"/> 
        <tool name="Italic" shortcut="CTRL+I"/> 
        <tool name="Underline" shortcut="CTRL+U"/> 
        <tool name="StrikeThrough" /> 
        <tool separator="true"/> 
        <tool name="JustifyLeft" /> 
        <tool name="JustifyCenter" /> 
        <tool name="JustifyRight" /> 
        <tool name="JustifyFull" /> 
        <tool name="JustifyNone" /> 
        <tool separator="true"/> 
        <tool name="Indent" /> 
        <tool name="Outdent" /> 
        <tool separator="true"/> 
        <tool name="InsertOrderedList" /> 
        <tool name="InsertUnorderedList" /> 
        <tool name="ToggleTableBorder" /> 
    </tools> 
     
    <tools> 
        <tool name="ForeColor"/> 
        <tool name="BackColor"/> 
        <tool name="ApplyClass" PopupHeight="1000"/> 
        <tool name="FormatStripper"/> 
    </tools> 
 
    <tools name="DropdownToolbar" > 
        <tool name="InsertSymbol"/> 
        <tool name="InsertTable"/> 
        <tool name="InsertSnippet"/> 
        <tool name="ImageMapDialog"/> 
        <tool name="InsertCustomLink" shortcut="CTRL+ALT+K" PopupHeight="1000"/> 
        <tool separator="true"/> 
        <tool name="AboutDialog" /> 
        <tool name="ModuleManager" /> 
        <tool name="ToggleScreenMode" shortcut="F11"/> 
    </tools> 
</root> 

web.config
<add  
name="RadEditorProvider"  
type="Telerik.DNN.Providers.RadEditorProvider"  
ExternalDialogsPath="~/Portals/_Default/RadEditorDialogs"  
providerPath="~/DesktopModules/TelerikWebUI"  
AutoCreatePaths="False"  
LinksUseTabNames="False"  
Language="fr-FR"  
LocalizationPath="~/App_GlobalResources/" /> 

Rumen
Telerik team
 answered on 14 Feb 2011
4 answers
262 views
Hi,

I am trying to add a dropdown column in the edit form of a RadGrid that is bound to an ObjectDatasource and populated by a WCF Service and using the Entity Framework for Data Access.

Sample: Item has a Item Type Foreign Key.

I can display the text of the foreign key in the RadGrid by using the GridTemplateColumn and Eval("{ForeignKeyEntity}.{DisplayValue}"). I can also display the dropdown column in the edit form but as soon as I change the selected item and I update the row I get a script error where the selected value cannot be converted to a EntitySet.

Can someone please help me with a sample of the proper way to edit the Foreign Key items on an entity using a object datasource.

Thank you,
Obed
Top achievements
Rank 1
 answered on 14 Feb 2011
9 answers
319 views

Hi,

We are using Modal Popup extender from AjaxToolkit version 3.5.40.412.2 and hosted Radgrid on this modal popup extender- We are using Asp.net 3.5.

Now while we open modal popup exteder background color does not apply.

Also, we are using skins for Radgrid and skin applies only when modal popup extnder opens second time.

Request you to please suggest.

Thanks and regards,

Manishkumar Patel

Tsvetina
Telerik team
 answered on 14 Feb 2011
3 answers
177 views
Hi,
 I have 2 issues. below I mention please feel free to give the solution.
1.  In my application folder structure I have a folder inside I kept a some .pdf files, I'm using Telerick:radeditor (Q2 2010 version). when It's editable mode , I'm using Hyperlink manager Icon in toolbar(Insert Hyperlink icon), here I specify the link of particular .pdf file(http://~Common/StaticContent/test.pdf). but when I run the application when I click on link the path(url path of the file).pdf file is not open. Please help me.I need a urgent solution on that.

 2. and also previosully I'm using classic (Q2 2009 version) rad editor, I  implemented below event EditableChanged.
This can be work fine to me. but when I update my telerick control(Q2 2010 ) and implemented same event I got a error in Toolbars propertie.
  Below message /error I got when I run the application.
'Telerik.Web.UI.RadEditor' does not contain a definition for 'Toolbars' and no extension method 'Toolbars' accepting a first argument of type 'Telerik.Web.UI.RadEditor' could be found (are you missing a using directive or an assembly reference?) 

 

 

protected void RadEditor1_EditableChanged(object sender, Telerik.WebControls.EditableChangedEventArgs e)

 

{

 

 

 

try

 

 

{

 

 

Toolbar toolbar = RadEditor1.Toolbars["DecisionsToolbar"];

 

 

 

 

if (toolbar == null)

 

{

toolbar =

 

 

new Toolbar("DecisionsToolbar");

 

toolbar.ShowToolsText =

 

 

true;

 

toolbar.IsDockable =

 

 

false;

 

RadEditor1.Tools.Add(toolbar);

}

 

 

 

ToolbarButton button = toolbar.Tools.FindToolByCommandName("button") as ToolbarButton;

 

 

 

 

if (button == null)

 

{

button =

 

 

new ToolbarButton("button");

 

 

 

 

//button.ShowText = true;

 

 

button.ShowIcon =

 

true;

 

toolbar.Tools.Add(button);

}

}

 

 

 

catch (Exception)

 

{

 

 

 

 

throw;

 

}

 

}
 Below message /error I got when I run the application.
'Telerik.Web.UI.RadEditor' does not contain a definition for 'Toolbars' and no extension method 'Toolbars' accepting a first argument of type 'Telerik.Web.UI.RadEditor' could be found (are you missing a using directive or an assembly reference?) 

  Please give me solution asap to me.

 Thanks in Advance
 Mr. Perfect.

 

Rumen
Telerik team
 answered on 14 Feb 2011
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?