Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views
I have a ListView in my page that follows example in http://demos.telerik.com/aspnet-ajax/listview/examples/appearancestyling/predefinedlayouts/defaultcs.aspx but when page page is rendered it don't show the style. By the way, it's looking ok in designer view.

code:
<telerik:RadListView ID="grdPrincipal" runat="server"
           onneeddatasource="grdPrincipal_NeedDataSource">
          
           <ItemTemplate>
               <div class="rlvI">
               <asp:Label ID="lbFeriado" runat="server" Text='<%# Eval("Motivo") %>' />
               </div>
           </ItemTemplate>
 
           <AlternatingItemTemplate>
               <div class="rlvA">
               <asp:Label ID="lbFeriado" runat="server" Text='<%# Eval("Motivo") %>' />
               </div>
           </AlternatingItemTemplate>     
           
           <EmptyDataTemplate>
               <div class="RadListView RadListView_Default">
                   <div class="rlvEmpty">
                       Nenhum feriado cadastrado.</div>
               </div>
           </EmptyDataTemplate>
           
            <LayoutTemplate>
                <div class="RadListView RadListView_Default">
                   <div id="itemPlaceholder" runat="server">
                   </div>
                              
               </div>
           </LayoutTemplate>
 
       </telerik:RadListView>
Maria Ilieva
Telerik team
 answered on 03 Nov 2011
3 answers
258 views
Dear Sir,
    I need an example of using drag and drop items but without using detailed template with a simple radtreelist, because i tried to implement it but i faced some problems with the interface.with scrolling and treelist height = 100% and width=100%, but when i drag a row it shows the height of the selected row = 100% also. please i need your help in this issue.
<telerik:RadTreeList ID="rtl_Category" runat="server" SkinID="Default_RadTreeList_Skin" AllowPaging="false" Width="100%" Height="100%" EnableNoRecordsTemplate="true" Dir='<%$ Resources:Common,res_Direction %>'
        DataKeyNames="ID" ClientDataKeyNames="ID,ParentCategory.ID" ParentDataKeyNames="ParentCategory.ID" AutoGenerateColumns="False" OnNeedDataSource="rtl_Category_NeedDataSource" >
        <ClientSettings AllowItemsDragDrop="true">
            <ClientEvents OnItemDropping="itemDropping" OnItemDragging="itemDragging" OnTreeListCreated="function(sender) { treeList2 = sender; }"  />
            <Selecting AllowItemSelection="True"  />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" ></Scrolling>
        </ClientSettings>
        <Columns>
            <telerik:TreeListBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID"
                ReadOnly="true" />
            <telerik:TreeListBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title"/>
            <telerik:TreeListBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description" />
            <telerik:TreeListDateTimeColumn DataField="CreatedOn" HeaderText="CreatedOn" UniqueName="CreatedOn"/>
            <telerik:TreeListBoundColumn DataField="CreatedBy.UserName" HeaderText="CreatedBy" UniqueName="CreatedBy" />
            <telerik:TreeListBoundColumn DataField="ParentCategory.ID" HeaderText="Parent" UniqueName="ParentCategory" Visible="false"/>
        </Columns>
        <NoRecordsTemplate>
            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="height: 40px;
                border-collapse: collapse; border: solid 1px #dddddd;">
                <tr>
                    <td align="center" valign="middle">
                        <asp:Label ID="lbl_GRD_NoRecords" runat="server" Text="No Records Found"></asp:Label>
                    </td>
                </tr>
            </table>
        </NoRecordsTemplate>
    </telerik:RadTreeList>

Daniel
Telerik team
 answered on 03 Nov 2011
1 answer
123 views
I'm using several MultipleValueResourceControls in the AdvancedForm.  I would like to have the flexibility to set the number of columns in the CheckBoxList per MultipleValueResourceControl.  I have one instance of the control where there are only 2 selections and should appear in 1 column, but another with close to 40 that I would like to spread out over 4 columns. 

Can someone please point me in the right direction?

Thanks.
Peter
Telerik team
 answered on 03 Nov 2011
3 answers
320 views
I've been beating my head against the desk for the better part of a week trying to find out why my program would not call a javascript function from an ajax postback.  I tracked the problem down to GetRadWindow not returning a window.  Searching the forums found a couple other examples of people with a similar odd problems with no solutions as yet.  The good Telerik folks have tried their best to help me in other forum posts. but this one I fear may be a Firefox issue.

Telerik 2010.1.519.35 - FireFox 3.6

  • I have a master page which has a javascript function I want to call. 
  • From the content page I open a radwindow which is defined in the radwindowmanager of the master page. 
  • When a button in the radwindow is clicked I want to registerstartupscript so I can call the javascript function in the main page.

This does not work the first time the radwindow is opened, but only in FireFox

If I click the button that opens the radwindow, and then click the button in the radwindow to make the call, it fails, not having gotten a valid radwindow from GetRadWindow.  I can click the button multiple times, it still does not work.  If I close the radwindow, and click the button to open the radwindow again, the second (and subsequent) times if functions as it should.

If I execute the same code from Internet Explorer it functions properly every time.  It's as if Firefox doesn't add the radwindow to it's internal list of windows until after it's been closed (just a guess)

A simpler example with just a webpage and radwindow had no problems, only the combination of master page, content page, and radwindow exhibited the problem for me

live example at  http://www.steeltoad.com/ajaxdialogtest
full source at  http://www.steeltoad.com/ajaxdialogtest2.zip


MasterPage
<%@ Master Language="Oxygene" AutoEventWireup="true" CodeBehind="MasterPage.master.pas" Inherits="AjaxDialogTest2.MasterPage" %>
<%@ Register assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
     
    <script language="javascript" type="text/javascript">
      function MasterPageTest(arg)
        { alert('Master Page : '+arg); }
    </script>
     
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
 
<body>
  <form id="form1" runat="server">
 
  <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
  </telerik:RadScriptManager>
 
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  </telerik:RadAjaxManager>
       
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
      Skin="Sunset" ShowContentDuringLoad="False" VisibleStatusbar="False"
      KeepInScreenBounds="True" EnableViewState="False"
      Behavior="Close, Move" Behaviors="Close, Move"
      InitialBehavior="Resize, Close, Move" InitialBehaviors="Resize, Close, Move" ReloadOnShow="True">
      <Windows>
        <telerik:RadWindow ID="wDialog" runat="server"
          NavigateUrl="DialogForm.aspx" Title="Dialog Form"
          Height="345px" Width="540px" >
        </telerik:RadWindow>
      </Windows>
    </telerik:RadWindowManager>
 
    <div>
      <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
      </asp:ContentPlaceHolder>
    </div>
 
  </form>
</body>
</html>

Content Page
<%@ Page Title="" Language="Oxygene" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="ContentPage.aspx.pas" Inherits="AjaxDialogTest2.ContentPage" %>
<%@ Register assembly="Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
    <script language="javascript" type="text/javascript">
      function ShowDialogForm(id)
        {
        var oWnd = window.radopen("DialogForm.aspx","wDialog");
        oWnd.SetTitle("Dialog Form");
        return false;
        }
    </script>
 
    <asp:Button ID="Button1" runat="server" Text="Open Dialog" onclientclick="ShowDialogForm(); return false;" />
  
</asp:Content>

Dialog Page
<%@ Page Language="Oxygene" AutoEventWireup="true" CodeBehind="DialogForm.aspx.pas" Inherits="AjaxDialogTest.DialogForm" %>
<%@ Register assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
<title>Untitled Page</title>
 
    <script language="javascript" type="text/javascript">
      function GetRadWindow()
        {
        var oWindow = null;
        if (window.radWindow)
          { oWindow = window.RadWindow; }   
        else if (window.frameElement.radWindow)
          { oWindow = window.frameElement.radWindow; }     
        return oWindow;
        }
 
      function DialogCommand(arg)
        { 
        var rw = GetRadWindow();
        alert('About to call MasterPageTest');
        rw.BrowserWindow.MasterPageTest(arg);
        alert('Called MasterPageTest');
        }
    </script>   
     
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
      <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
      </telerik:RadScriptManager>
     
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="AjaxButton">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="AjaxButton" />
            </UpdatedControls>
          </telerik:AjaxSetting>
        </AjaxSettings>
      </telerik:RadAjaxManager>
      <asp:Button ID="AjaxButton" runat="server" Text="Test" onclick="ButtonClicked" />
 
    </div>
    </form>
</body>
</html>


Dialog Page server side code    Delphi Prism but the one line of code translates easily to C#
namespace AjaxDialogTest;
 
interface
 
uses
  Telerik.Web.UI,
  System,
  System.Data,
  System.Configuration,
  System.Linq,
  System.Web,
  System.Web.Security,
  System.Web.SessionState,
  System.Web.UI,
  System.Web.UI.WebControls,
  System.Web.UI.WebControls.WebParts,
  System.Web.UI.HtmlControls;
 
type
  DialogForm = public partial class(System.Web.UI.Page)
  protected
    method ButtonClicked(sender: System.Object; e: System.EventArgs);
    method Page_Load(sender: Object; e: EventArgs);
  end;
 
implementation
 
method DialogForm.Page_Load(sender: Object; e: EventArgs);
begin
end;
 
 
method DialogForm.ButtonClicked(sender: System.Object; e: System.EventArgs);
begin
  RadScriptManager.RegisterStartupScript(self,GetType(),"addScript","DialogCommand('Test');",true);
end;
 
 
end.

Tobias
Top achievements
Rank 1
 answered on 03 Nov 2011
1 answer
130 views
I'm trying to use the FIleExplorer control.  It seems to be fine using Chrome, but when I try opening a file in safari, I have to double click on the file to open it, and then when I click the close icon in the upper right of the window, the window stays on screen.

Any Ideas?


Thanks!

Dave
Rumen
Telerik team
 answered on 03 Nov 2011
4 answers
274 views
Hello,

I have an ASP.NET application that uses a frameset (header frame, left-menu frame, and then content frame).  I've searched for frame related posts and have found a few talking about the fact other frames don't disable, how to render above the frameset, etc, but none for this issue.

The behavior is this:

* Open a RadWindow (in this case, a modal dialog) in the content frame
* Left-click and hold the title bar and start dragging around.  
* While dragging, move your cursor to another frame in the frameset.  You'll note that the window stays in the content frame (good)
* While still in the other frame, release the mouse button.
* Move the cursor back over the content frame.  Once you do, the radwindow will snap to the cursor position, and follow the cursor - even though the mousebutton is not being held.  To "release" you have to left- click on the window again.

This issue is frustrating for a client; what they would like to see is the window is "released" as soon as the mouse is released.  I suspect the combination of a frameset and browser capabilities may make this impossible - perhaps the browser is still firing the ondrag...   But I'd love to know if there's a workaround.
Marin Bratanov
Telerik team
 answered on 03 Nov 2011
2 answers
94 views
Hello,

I have finally managed to get the radgrid to work with all its features (insert, edit, delete, details view). However, the details table is showing me the same table that the original grid is showing. (Screenshot)

I have 2 table:

news:
- N_id
- title
- article
- time
- U_id

users
- U_id
- member

I have already populated the data manually. What I want to do when I click on the expand button to see the details table, is to see the user who wrote that article. And I have to SqlDatasources, I just have to edit one to show the user WHERE news.userid = users.id, but how?

EDIT: I figured out the query and I'm not getting any error when I load the page. But when I click on the expand button, I get something weird (Screenshot). 

I just want to show the Name (member) of the person who wrote that article. Just 1 row.

SELECT users.member, news.U_id
FROM users
INNER JOIN news
ON users.U_id=news.U_id
Shinu
Top achievements
Rank 2
 answered on 03 Nov 2011
1 answer
107 views
Hi
I have successfully been using a custom skin for a PanelBar, and it is working fine as required.
I now want to make another version of the same skin, but I haven't been able to figure out the syntax
for setting the colours of the sub menu item when it is both selected and hovered.

Q32010 version running on asp.net 4.0

This is what I have at the moment

div.RadPanelBar_Scargill2 .rpGroup a.rpLink:hover,
div.RadPanelBar_Scargill2 .rpGroup a.rpFocussed,
div.RadPanelBar_Scargill2 .rpGroup a.rpFocused:hover,
div.RadPanelBar_Scargill2 .rpGroup a.rpSelected,
div.RadPanelBar_Scargill2 .rpGroup a.rpSelected:hover
  
{
background-color: white;
    color: #666;
}

This does what it should for the sub items, until one is selected. Then it seems to revert to the colours of the top level items.

Please help!

Thanks

Clive
Kate
Telerik team
 answered on 03 Nov 2011
3 answers
413 views
Hi,

I Have an imge column in rad grid. I want to apply custom filter to filter the records on the basis of image name as default filter function available are not of my use.

I want to keep the new menu items on filter menu for that column only and rest of column in grid will be using the default filter function by using allowing filter=true.

Please suggest how to achieve this.Help on this would be highly appreciated.


Thanks,
Manjeet
Manjeet
Top achievements
Rank 1
 answered on 03 Nov 2011
2 answers
173 views
Greetings,

I'd like to set a GridButtonColumn invisible in the case the user does not have the rights to delete a row ( for instance )

The GridButtonColumn is declared like this:

<telerik:GridButtonColumn CommandName="Delete" Text="Supprimer" UniqueName="column2">
</telerik:GridButtonColumn>


The condition is this one :
string req = " SELECT rights from utilisateur WHERE login = '" + login + "'";
int test = DA.DAConnexion.executeQueryScalar(req);
Session["rights"] = test;
if Session["rights"] gets the value 0, the GridButtonColumn must not be visible


Thanks in advance for your help
Adigard
Top achievements
Rank 1
 answered on 03 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?