Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views
I am developing an MDI-like interface similar to your demo...

http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultcs.aspx

It would be great if Telerik could create some "snap" functionality into Rad Window, similar to the window snap functionality availalble in Windows 7+. I would like to be able to drag a rad window to the side of it's container and then have some way of "snapping" it so that it occupies 100% height and 50% width, left or right. It would also be cool if you could drag the window to the top or bottom of its container and then snap it their as well  50% height, top or bottom and 100% width). I'm not sure why the Windows folks didn't include vertical snap, but maybe there's some technical issue.

Anyhow, allowing users to quickly size windowsby snapping them for side by side (or top/bottom) display would really be useful for many MDI type implementations.

I imagine the Rad Window already has client-side capabilities for detecting when one of the window edges has reached its container boundary. They key would be providing users with some sort of visual cue that they can "snap" the window to that particular boundary (left/right and, ideally, top/botom).

Of course, it would probably be necessary to provide some sort of toggle property so users could turn this functionality on/off, or perhaps an enumeration property... like  SnapBehaviors="EnableSnapVertical, EnableSnapHorizontal, EnableSnapLeft... etc.)
Marin Bratanov
Telerik team
 answered on 14 Mar 2013
2 answers
163 views

I have 3 levels
Top Level - Client Job   
2nd Level - JobTask
3rd Level  - TaskStockRequirments  

The ClentId for the TopLevel is achieved through :-

Protected Sub SqlTopLevel_Clients_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlTopLevel_Clients.Selecting
If hdnClientId.Value = "" Then hdnClientId.Value = "1"
e.Command.CommandText = "SELECT * FROM bm_ClientJob Where ClientId = " & CStr(hdnClientId.Value)
End Sub

and this is ok and the Level 2 is displayed OK but I can't understand why Level 3 doesn't appear.

<%-- CLIENT JOBS HIERARCHICAL GRIDS --%>
 <telerik:RadSlidingPane ID="rspClientJobs" Title="Client Jobs" runat="server" Height="650px">
 
     <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
         <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="grdClientJobs">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="grdClientJobs"></telerik:AjaxUpdatedControl>
                 </UpdatedControls>
             </telerik:AjaxSetting>
         </AjaxSettings>
     </telerik:RadAjaxManager>
 
     <telerik:RadGrid ID="grdClientJobs"    OnPreRender="grdClientJobs_PreRender" ShowStatusBar="True"
         DataSourceID="SqlTopLevel_Clients" runat="server"
         AutoGenerateColumns="False" PageSize="7"
         AllowSorting="True" AllowPaging="True" GridLines="None" CellSpacing="0">
         <PagerStyle Mode="NumericPages"></PagerStyle>
         <MasterTableView DataSourceID="SqlTopLevel_Clients" DataKeyNames="JobId" AllowMultiColumnSorting="True" HierarchyLoadMode="Client" Width="100%">
 
             <DetailTables>
 
                 <telerik:GridTableView DataKeyNames="JobId" DataSourceID="SqlLevel2_ClientJobs" Width="100%"
                     runat="server">
                     <ParentTableRelation>
                         <telerik:GridRelationFields DetailKeyField="JobId" MasterKeyField="JobId">
                         </telerik:GridRelationFields>
                     </ParentTableRelation>
 
                     <%--LEVEL 3 GRID TABLE - JOBTASKS COLUMNS--%>
 
                    <DetailTables>
 
                         <telerik:GridTableView DataKeyNames="TaskId" DataSourceID="SqlLevel3_ClientJobTasks" Width="100%"
                             runat="server">
                             <ParentTableRelation>
                                 <telerik:GridRelationFields DetailKeyField="TaskId" MasterKeyField="TaskId"></telerik:GridRelationFields>
                             </ParentTableRelation>
                             <Columns>
                                 <telerik:GridBoundColumn SortExpression="Requirement" HeaderText="Requirement" HeaderButtonType="TextButton"
                                     DataField="Requirement" UniqueName="Requirement">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="Supplier" HeaderText="Supplier" HeaderButtonType="TextButton"
                                     DataField="Supplier" UniqueName="Supplier">
                                 </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn SortExpression="Amount" HeaderText="Amount" HeaderButtonType="TextButton"
                                     DataField="Amount" UniqueName="Amount">
                                 </telerik:GridBoundColumn>                                                  
                                  <telerik:GridBoundColumn SortExpression="Units" HeaderText="Units" HeaderButtonType="TextButton"
                                     DataField="Units" UniqueName="Units">
                                 </telerik:GridBoundColumn>                                                  
                              </Columns>
                             <SortExpressions>
                                 <telerik:GridSortExpression FieldName="TaskName" SortOrder="Descending"></telerik:GridSortExpression>
                             </SortExpressions>
                         </telerik:GridTableView>
                     </DetailTables>
 
                    <%--LEVEL 2 GRID TABLE - CLIENT JOB COLUMNS--%>
                             <Columns>
                                 <telerik:GridBoundColumn SortExpression="TaskId" HeaderText="Task Id" HeaderButtonType="TextButton"
                                     DataField="TaskId" UniqueName="TaskId">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="TaskSeqNo" HeaderText="Seq No" HeaderButtonType="TextButton"
                                     DataField="TaskSeqNo" UniqueName="TaskSeqNo">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="TaskName" HeaderText="Name" HeaderButtonType="TextButton"
                                     DataField="TaskName" UniqueName="TaskName">
                                 </telerik:GridBoundColumn>
                             </Columns>
                             <SortExpressions>
                                 <telerik:GridSortExpression FieldName="TaskName" SortOrder="Descending"></telerik:GridSortExpression>
                             </SortExpressions>
                 </telerik:GridTableView>
             </DetailTables>
             <%--TOP LEVEL CLIENT COLUMNS--%>
                    <Columns>
                         <telerik:GridBoundColumn SortExpression="JobId" HeaderText="JobId" HeaderButtonType="TextButton"
                             DataField="JobId" UniqueName="JobId">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn SortExpression="StartDate" HeaderText="Date Start" HeaderButtonType="TextButton"
                             DataField="StartDate" UniqueName="StartDate" DataFormatString="{0:D}">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn SortExpression="JobName" HeaderText="Name" HeaderButtonType="TextButton"
                             DataField="JobName" UniqueName="JobName">
                         </telerik:GridBoundColumn>
                     </Columns>
         </MasterTableView>
     </telerik:RadGrid>
 
   <%--HIERARCHICAL GRIDS SQL DATA SOURCES--%>
 
     <asp:SqlDataSource ID="SqlTopLevel_Clients" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_ClientJob Where ClientId = @ClientId"
         runat="server">
     </asp:SqlDataSource>
 
     <asp:SqlDataSource ID="SqlLevel2_ClientJobs" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_JobTask where JobId = @JobId Order By TaskSeqNo"
         runat="server">
         <SelectParameters>
             <asp:SessionParameter Name="JobId" SessionField="JobId" Type="Int32"></asp:SessionParameter>
        </SelectParameters>
     </asp:SqlDataSource>
 
     <asp:SqlDataSource ID="SqlLevel3_ClientJobTasks" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_TaskStockRequirement where TaskId = @TaskId"
         runat="server">
         <SelectParameters>
             <asp:SessionParameter Name="TaskId" SessionField="TaskId" Type="Int32"></asp:SessionParameter>
         </SelectParameters>
     </asp:SqlDataSource>


Any ideas please?

nick chance
Top achievements
Rank 1
 answered on 14 Mar 2013
3 answers
297 views
I have hit the following scenario which I have managed to strip out in to a small example.  I have a radWindow that is opening a new aspx page.  On that page the user needs to cause a number of postbacks; after a certain number of postbacks are made and the window is closed by the user the parent page loses all state. Any subsequent postback on the parent page results in all dropdowns losing their data, it also sometimes occurs with textbox values.  This should explain it better:

This is the parent page:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function openRadWindow() {
        var oWnd = radopen("/parts/test.aspx", "RadWindow1");     
        oWnd.setSize(850, 700);
        oWnd.center();
    }
        </script>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
       <asp:DropDownList ID="lstComponent" runat="server" />
        <asp:Button ID="btnReload" runat="server" OnClick="btnReload_Click" />
        <asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClientClick="openRadWindow('', '', '', ''); return false;" CssClass="button small green" />
    <telerik:RadWindowManager ShowContentDuringLoad="false" EnableShadow="true" InitialBehaviors="Maximize"
    ID="RadWindowManager1" runat="server" Behaviors="Close" >
    </telerik:RadWindowManager>
    </form>
</body>
</html>

This is the code behind:
protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               lstComponent.Items.Clear();
               lstComponent.Items.Insert(0, new ListItem(QA.BLL.Common.Const.please_select, String.Empty));
           }
       }

This is the page that is opened:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
     <script type="text/javascript">
         function CloseAndRebind(args) {
             //GetRadWindow().BrowserWindow.refreshGrid(args);
             GetRadWindow().close();
         }
 
         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 as well)
 
             return oWindow;
         }
 
         function CancelEdit() {
             GetRadWindow().close();
         }
 
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
         <asp:Button ID="Button1" runat="server" Text="Nothing" OnClick="Button1_Click" />
    <asp:Button ID="btnTest" runat="server" OnClick="btnTest_Click" />
    </div>
    </form>
</body>
</html>

And its code behind:

public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void btnTest_Click(object sender, EventArgs e)
        {
            int test = 1;
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('Rebind');", true);
        }
 
        protected void Button1_Click(object sender, EventArgs e)
        {
            btnTest.Text = DateTime.Now.ToShortTimeString();
        }
    }

Now to make the issue occur perform the following steps:
  1.  press the btnAddNew button on the parent page to make the window appear
  2. on the window press Button1 a number of times (x10)
  3. Press the btnTest button to close the window
  4. Press the btnReload button on the parent page to force a postback
  5. The option that had been added to the dropdown is gone.

This is a simplistic example but my parent page in my actual website has a number of dropdown controls all of which lose their state.

I am using version 2012.1.215.40. 

Thanks,
Richard
Marin Bratanov
Telerik team
 answered on 14 Mar 2013
3 answers
52 views
hello,
 if i use in my web page this radwindow:
<telerik:RadWindow ID="RadWindowCard" runat="server" AutoSize="true" IconUrl="/image/iconlogo.png"
ReloadOnShow="True" NavigateUrl="publicard.aspx" Behaviors="Close" RestrictionZoneID="NavigateUrlZone"
Height="100" Skin="Office2010Silver" VisibleStatusbar="false" Title="Caricamento biglietto da visita..."
ShowContentDuringLoad="False" Width="300" Modal="true"
KeepInScreenBounds="true" Style="z-index: 8000">
</telerik:RadWindow>
 
the datapager does not work anymore. that is, the DataPager no longer avanto or back pages ... not compatible? or where am I wrong? Here is the html code of my page:

<form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ImageButtonRicerca">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadListView1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadWindowCard"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <asp:HiddenField ID="_search" runat="server" /><asp:HiddenField ID="_search1" runat="server" />
        <telerik:RadWindow ID="RadWindowCard" runat="server" AutoSize="true" IconUrl="/image/iconlogo.png"
            ReloadOnShow="True" NavigateUrl="publicard.aspx" Behaviors="Close" RestrictionZoneID="NavigateUrlZone"
            Height="100" Skin="Office2010Silver" VisibleStatusbar="false" Title="Caricamento biglietto da visita..."
            ShowContentDuringLoad="False" Width="300" Modal="true"
            KeepInScreenBounds="true" Style="z-index: 8000">
        </telerik:RadWindow>
        <telerik:RadFormDecorator ID="RadFormDecorator" Runat="server"
            DecoratedControls="Default, Textbox, Textarea, Label, H4H5H6, Select, Zone, GridFormDetailsViews, ValidationSummary, LoginControls"
            Skin="Sunset" />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
            BorderColor="#D5842B" BorderStyle="Double" BorderWidth="1px" Skin="Simple">
        </telerik:RadAjaxLoadingPanel>
            <div align="center" class="backgroundup">
                <div align="center" class="banner">
                    <div style="padding-left:200px;">
                        <div class="profilesearch">
                            <asp:Panel ID="Panel1" runat="server" DefaultButton="ImageButtonRicerca" Height="55px" Width="685">
                                <div id="txt1" style="width:350px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
                                    <telerik:RadTextBox ID="Txt_ricerca1" Runat="server"
                                    EmptyMessage="Nominativo o azienda o categoria" Width="350px" Height="22px" Skin="" Font-Italic="True"
                                    Font-Names="Verdana">
                                    <EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
                                    <HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
                                    </telerik:RadTextBox>
                                </div>
                                <div id="txt2" style="width:250px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
                                    <telerik:RadTextBox ID="txt_ricerca2" runat="server"
                                    EmptyMessage="Città di residenza" Width="250px" Height="22px" Skin=""
                                    Font-Italic="True" Font-Names="Verdana">
                                    <EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
                                    <HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
                                    </telerik:RadTextBox>
                                </div>
                                <div id="btn" style="width:80px; height:40px; border:0px; margin:0px; padding-top:7px; float:right">
                                    <asp:ImageButton ID="ImageButtonRicerca" runat="server" ImageUrl="~/Image/cerca.png" />
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div id="menu" class="divresultmenu">
                        <div id="lbresult" class="lbresult">
                            <asp:Label ID="Label1" runat="server" Text="Biglietti da visita trovati:"
                            style="font-size: small; font-family: Verdana"></asp:Label>
                        </div> <!-- end div lbresult -->
                        <div class="divbuttonmenu">
                            <telerik:RadButton ID="btnhome" runat="server" Text="Home page">
                            </telerik:RadButton>
                            <telerik:RadButton ID="btnreg" runat="server" Text="Registrati in trycontact">
                            </telerik:RadButton>
                        </div>
                    </div> <!-- end div menu -->
                    <div class="resultseparator">
                    </div> <!-- end div separator -->
                    <asp:Panel ID="PanelRadlist" runat="server" Width="700px">
                    <div id="div_radlistview" class="divradlistview">
                        <telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente"
                            ItemPlaceholderID="Contenitore" AllowPaging="True"
                            Width="650px" OnNeedDataSource="RadListView1_NeedDataSource">
                                <LayoutTemplate>
                                    <fieldset style="width: 700px; border:0px" id="FieldSet1">
                                        <legend></legend>
                                        <asp:Panel ID="Contenitore" runat="server">
                                        </asp:Panel>
                                        <telerik:RadDataPager ID="RadDataPager1" runat="server"
                                            PagedControlID="RadListView1" Width="700px" Culture="it-IT" BackColor ="#ecede5">
                                                <Fields>
                                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                                </Fields>
                                        </telerik:RadDataPager>
                                    </fieldset>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <div class="item">
                                        <div class="image">
                                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
                                        </div>
                                    <div class="content">
                                        <div class="user">
                                            <b><%# CType(Container.DataItem, PropertyUtente).utente%></b>
                                        </div>
                                        <div class="description_category">
                                            Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
                                        </div>
                                        <div class="description_city">
                                            Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div>
                                        <div class="description_phone">
                                            Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div>                                       
                                        <div class="description_email">
                                            Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
                                        </div>
                                        <div class="item_button">
                                            <telerik:RadButton ID="RadButton1" runat="server" Text="Biglietto completo" Width="150px"
                                            OnClick="RadButton1_Click">
                                            <Icon PrimaryIconCssClass="rbOpen"></Icon>
                                            </telerik:RadButton>
                                        </div>                                                                              
                                    </div>
                                    </div>
                                </ItemTemplate>
                        </telerik:RadListView>
                    </div> <!-- end div radlist -->
                    </asp:Panel>
                </div> <!-- end div banner -->
            </div<!-- end div background -->
     </div>
    </form>





Marin Bratanov
Telerik team
 answered on 14 Mar 2013
1 answer
117 views
Hi All,

I've a portal page which consists of multiple portlet. Each portlet will load different data individually and asynchronously. Now I use asp.net timer to perform the update. But I found that when a portlet start to perform update and manual interaction with other portlet will interrupt the auto update. How can I solve this problem?

Thanks,
Gary
Dobromir
Telerik team
 answered on 14 Mar 2013
3 answers
141 views
Since our upgrade to Sharepoint 2010 both editors now show up when attempting to edit and content. See attached. What needs to be done to only show the Telerik editor?
Stanimir
Telerik team
 answered on 14 Mar 2013
5 answers
160 views
Is there a planned future to include PDF417 and 2D barcodes?
Vasil
Telerik team
 answered on 14 Mar 2013
1 answer
829 views
I added the Radtreeview to asp:content and got this error msg. But if I added the RadTreeview to the following:

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

 

<telerik:RadTreeView ID="RadTreeView1" runat="server">

 

 

</telerik:RadTreeView>

 

 

 

</div>

 

 

</form>

 

</

 

body>

no error message. Did anybody have similar issue before? thanks

 

Kate
Telerik team
 answered on 14 Mar 2013
5 answers
445 views
Hi Folks can anyone let me know how to access the RadgridFooteritem in a function like

function foo()

{
how to access the RadgridFooteritem????
}

Awaiting for your reply.


Thanks
Satya
kollam2003
Top achievements
Rank 1
 answered on 14 Mar 2013
3 answers
120 views
i've a drop down list called  ("DropDownList4") i want to make check if it's contain value the edit button is disappeared if n\t it will appear to choose from it .
             

Kostadin
Telerik team
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?