Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views
I have a simple RadMenu inside a Template Column of a RadGrid.  I can't figure out how to eval the column to the navigationurl of any of the radmenu items.   The template column has uniquename of gui.   Anyone have any pointers for me?

<Items><telerik:RadMenuItem Text="Download" Value="1"   > 
<Items> 
<telerik:RadMenuItem Text="Download File" Value="1" NavigateUrl='<%# BuildDownloadUrl(Bind("Gui"))  %>'></telerik:RadMenuItem> 
<telerik:RadMenuItem Text="Have a question about file?" Value="2"></telerik:RadMenuItem> 
</Items> 

Peter
Telerik team
 answered on 26 May 2008
1 answer
143 views
I have followed this link and able to create a standalone imagemanager along with some textboxes, editors.

http://www.telerik.com/support/kb/article/b454K-htg-b454T-bme-b454c-bme.aspx

I have a save button, which store the change to the database.

When I click 'save', values from textboxes and editors are updated, but not the image source.  It returns empty.

It seems that the value of the image source is reset to blank when I click the 'save' button (and thus a postback).

Is there a way I can store the value of the new image source.

Here's the aspx file

 <form id="form1" runat="server">
  <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
  </telerik:RadScriptManager>
  <telerik:RadCodeBlock runat="server">
   <script type="text/javascript">
     function ImageManagerFunction(sender, args)
     {
       var selectedItem = args.SelectedItem;
       var logo = $get('<%= imgLogo.ClientID %>');
       var lbl = $get('<%= lblImageFileName.ClientID %>');
       logo.src = selectedItem.getPath();
      
       lbl.innerText = selectedItem.getPath();
     }

    //This code is used to provide a reference to the radwindow "wrapper"
    function GetRadWindow()
    {
     var oWindow = null;
     if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
     else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)    
     return oWindow;
    }
    
    function CloseWindow()
    {
     GetRadWindow().close();
    }
   
   </script>

  </telerik:RadCodeBlock>
  <telerik:DialogOpener runat="server" ID="doLogo">
  </telerik:DialogOpener>
  <div style="height: 100px">
   <div style="float: left; width: 280px; padding: 2px;">
    <b style="width: 70px; float: left">
     Brand ID:</b>
    <asp:Label ID="lblBrandID" runat="server" Text='<%# Eval("BrandID") %>' /><br />
    <b style="width: 70px; float: left">
     Name:</b>
    <asp:TextBox ID="tbxBrandName" runat="server" Text='<%# Bind("BrandName") %>'
     Width="140px" MaxLength="255" /><br />
    <b style="width: 70px; float: left">
     Active:</b>
    <asp:CheckBox ID="chbActiveCheckBox" Width="40px" Checked='<%# Bind("Active") %>'
     runat="server" />
   </div>
   <div style="padding: 2px;">
    <b>
     Logo:</b><br />
    <asp:Image ID="imgLogo" runat="server" />
<%--    <span style="display: none">--%>
     <asp:Label ID="lblImageFileName" runat="server" />
<%--    </span>--%>
    <br />
    <asp:LinkButton ID="lnkGetImage" runat="server" Text="Select/Insert Logo" />
   </div>
  </div>
  <div style="padding: 2px; width: 380px; clear: both; margin-top: 20px">
   <telerik:RadTabStrip ID="ts1" runat="server" Skin="Telerik" MultiPageID="mpage1"
    SelectedIndex="0">
    <Tabs>
     <telerik:RadTab runat="server" Text="Default Short Description">
     </telerik:RadTab>
     <telerik:RadTab runat="server" Text="Default Long Description" Selected="True">
     </telerik:RadTab>
    </Tabs>
   </telerik:RadTabStrip>
   <telerik:RadMultiPage ID="mpage1" runat="server" SelectedIndex="0">
    <telerik:RadPageView ID="pvShort" runat="server">
     <telerik:RadEditor ID="editorDefaultShortDesc" runat="server" Skin="Vista"
      ToolsFile="~/Common/CustomizedRadXML/ToolsFile2.xml" EditModes="Design">
      <ImageManager SearchPatterns="*.gif,*.jpg" MaxUploadFileSize="20000" EnableImageEditor="false" />
      <FlashManager SearchPatterns="*.swf" MaxUploadFileSize="20000" />
      <DocumentManager SearchPatterns="*.pdf,*.doc" />
      <Content>
            
      </Content>
     </telerik:RadEditor>
    </telerik:RadPageView>
    <telerik:RadPageView ID="pvLong" runat="server">
     <telerik:RadEditor ID="editorDefaultLongDesc" runat="server" Skin="Vista"
      ToolsFile="~/Common/CustomizedRadXML/ToolsFile2.xml" EditModes="Design">
      <ImageManager SearchPatterns="*.gif,*.jpg" MaxUploadFileSize="20000" EnableImageEditor="false" />
      <FlashManager SearchPatterns="*.swf" MaxUploadFileSize="20000" />
      <DocumentManager SearchPatterns="*.pdf,*.doc" />
      <Content>
           
      </Content>
     </telerik:RadEditor>
    </telerik:RadPageView>
   </telerik:RadMultiPage>
  </div>
  <asp:Button ID="btnSave" Text="OK - Save" runat="server" />
  <asp:Button ID="btnCancel" Text="Canel" OnClientClick="CloseWindow()" runat="server" />
  <asp:Label ID="lblInjectionScript" runat="server" />
 </form>



Thanks


Raymond Mui
Top achievements
Rank 1
 answered on 26 May 2008
2 answers
137 views
A designer in our company wants to "add padding / margin to left and bottom " of Images using the editor. Can this be done?
Julian Roberts
Top achievements
Rank 1
 answered on 26 May 2008
2 answers
319 views
Dear All!

My code example. Question is below
code behind:

DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add("Translation", Type.GetType("System.String"));

dr = dt.NewRow();
dr["Translation"] = "TEST";
dt.Rows.Add(dr);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
Session["translationDS"] = ds;

aspx:

<telerik:radtextbox Width="195px" id="RadTextBox3" runat="server" Value='<%# DataBind.Eval ???%>' ... />

Question: How can I bind the Session["translationDS"]'s specified row (for ex. 5th row Translation column->ds.Tables[0].Rows[4]["Translation"]) to RadTextBox not in runtime on aspx side. C# side is ok. 

Many thanks


alsi
Top achievements
Rank 1
 answered on 26 May 2008
5 answers
205 views

I have tried codeless save in a Database for asp.net AJAX RadEditor, its working fine for text. I am able to edit and save the changes.  But when I tried inserting an Image from local drive it doesnt allow me to because the Image Manager +Upload can't be clicked.

I am using SQL SERVER 2005 using ObjectDatasource and FormView


Thank you very much.

Rumen
Telerik team
 answered on 26 May 2008
1 answer
176 views
Hi,

I have a GridDropDownColumn, and two data sources (objectDatasource1, objectDatasource2).

The GridDropDownColumn uses objectDatasource1.
 
However, for inserts, I want the GridDropDownColumn (in the insert row) to use objectDatasource2.  How do I accomplish this?

Thanks!
John
Sebastian
Telerik team
 answered on 26 May 2008
5 answers
259 views
Hi,
I am using RAD Editor AJAX with visual studio 2008, and when i am trying to open the photos dialog a message appears that the web.config HttpHandlers registation is missing, then I registerd the HttpHandler in the web.config using the Editor smart tag and the message still appear, please tell me what is the problem.
Rumen
Telerik team
 answered on 26 May 2008
1 answer
123 views
Hi,

The outer div (class rsApt) have hardcoded html style

(style=height: 200%; width: 90%; padding-bottom: 2px; left: 0%;)

I need set height = 150px and width = 100%

How can I override this style. I look at my code but I didn't set style.
I think that Style has been set by Telerik.

Regrads,

J
Peter
Telerik team
 answered on 26 May 2008
1 answer
143 views
I am opening a RadWindow from another RadWindow.  The child window is a delete confirmation window.  If the user confirms, I need to update a grid on the parent window's page.  I am doing this on numerous other pages without a problem.  However for some reason it does not work for me on this page.

Here is my code for opening the window:
        function ShowItemTypeIndexDeleteForm(indexAssignmentID, indexID)  
        {  
 
            GetRadWindow().BrowserWindow.radopen("ItemTypeIndexDelete.aspx?IndexAssignmentID=" + indexAssignmentID + "&IndexID=" + indexID, "rwIndexDelete");  
     
            return false;   
        }  
 

Here is my code on the child page for updating the grid on the parent page:
    function CloseAndRebind()  
    {  
        GetRadWindow().Close();  
        GetRadWindow().BrowserWindow.refreshIndexesGrid('Rebind');  
    }  
    function GetRadWindow()  
    {  
        var oWindow = null;  
        if (window.radWindow)  
        {  
            oWindow = window.radWindow;  
        }  
        else if (window.frameElement.radWindow)  
        {  
            oWindow = window.frameElement.radWindow;  
        }  
          
        return oWindow;  
    }  
 

Here is my code for attempting to update the grid on the parent page:
        function AjaxRequestMethod(target, arguments)  
        {  
            var ajaxManager = $find("<%= ramMain.ClientID %>");  
            ajaxManager.ajaxRequestWithTarget(target, arguments);  
        }  
        function refreshIndexesGrid(arg)     
        {     
            AjaxRequestMethod('<%= rgAssignedIndexes.UniqueID %>', 'Rebind');     
        }     
 

I am calling the refreshIndexGrid in the code behind using:
        InjectScript.Text = "<script type='text/javascript'>CloseAndRebind('Rebind')</" & "script>"  
 

Thanks.

Seth
Svetlina Anati
Telerik team
 answered on 26 May 2008
1 answer
389 views
Is it possible to handle a change in the view?

I want to be able to load diary events when ever a view changes from say day to week or week to month. I don't want to pre-load all the appointments because the system would be too slow.

Thanks
Jon
T. Tsonev
Telerik team
 answered on 26 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?