Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
196 views
Hi,

I'm testing Telerik Suite which is my best choice actually.

I'm trying to reproduce a Window MDI BackOffice using ASP.NET with floating and dockable window. I have tried RadDock but in floating mode it becomes transparent hover some components as RadRibbonBar and Maximize, Minimize, Resize command are not already implemented on it.

So I decided to do that with RadWindow. I have read somewhere in the forum that RadWindow do not support loading UserControl. But I think it is now possible because I wrote the following code

protected override void Page_Load(object sender, EventArgs e)
{
    base.Page_Load(sender, e);
 
    windowsManager.MinimizeZoneID = minimizeZone.ClientID;
    windowsManager.RestrictionZoneID = viewPane.ClientID;
}
 
public void OpenWindow(string name)
{
    RadWindow window = new RadWindow();
    window.ID = name;
    window.ContentTemplate = Page.LoadTemplate("~/ControlPanel/Views/" + name + ".ascx");
 
    windowsManager.Windows.Add(window);
 
    window.VisibleOnPageLoad = true;
}

<div id="viewPane" runat="server" class="cellDiv" style="height:100%;">
    <telerik:RadWindowManager ID="windowsManager" runat="server" Behaviors="Default" EnableShadow="true">
    </telerik:RadWindowManager>
    <div id="minimizeZone" runat="server" class="minimizeZone">
    </div>
</div>

Remark: Maybe it is because this is implemented also into usercontrol which is loaded in a MasterPage but when I set RestrictionZoneID in ASPX code on RadWindowManager. RadWindow are not restricted to this zone. I'm obliged to set viewPane.ClientID on Page_Load. It does not work also if I set viewPane.ID to RestrictionZoneID programmatically.

So my RadWindow load correctly my UserControl I have passed. In floating mode, the window is ok but if I maximize window I'm getting right padding. By using FireBug, it is rwWindowContent how manage this section but have set border, padding, margin to 0 but no change.

Another question will be on RadGrid loaded inside RadWindow, how to set RadGrid to fit height available. When I remove TitleBar, StatusBar of RadWindow and RadGrid ShowGroupPanel, RadGrid looks to have the right height.
Davy
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
140 views
Hi

I want to display the latest message from database server.So is it possible to refresh the rotator every 5 minutes, without reload the page.
Please provide the code for refresh the control.


Thanks

Naga.
Slav
Telerik team
 answered on 27 Sep 2012
3 answers
246 views
Hello,

I have a RadGrid with a UserControl as the EditForm template. There's a RadComboBox with LoadOnDemand enabled on the UserControl. RadComboBox has client-side SelectedItemChanged event handler defined to populate values of other controls on the same UserControl in the grid's insert or edit form.

Since there are 4 different grids that use the same UserControl, I've set up 4 different SelectedItemChanged event handlers for each grid's current edit/insert form - generating and registering it on the fly in the UserControl's Page_PreRender event:
if (txtParentGridID.Text != string.Empty)
{
    string cmbZipHandlerName = txtParentGridID.Text + "_cmbZip_SelectedIndexChanged";
    string script = "function " + cmbZipHandlerName + "(sender, args) {"
                + "var grd = $telerik.findGrid('" + txtParentGridID.Text + "', null);"
                + "ZipAutoFillCurrentEditForm(grd, args.get_item());"
                + "}";
    // Set event handler
    cmbZip.OnClientSelectedIndexChanged = cmbZipHandlerName;
 
    // registering to the Page object works
    ScriptManager.RegisterStartupScript(Page, typeof(Page), cmbZip.ClientID + "_handler", script, true);
}

The event handlers are invoked just fine. But the problem is that when when I try to access each of the grid's edit form, the master table view's edit items are blank (in GetCurrentFormItem()). get_insertItem returns an object just fine. :
// These zip autofill related functions are separated in a script file
function ZipAutoFillCurrentEditForm(grd, selectedItem) {
    var formItem;
    formItem = GetCurrentFormItem(grd);
 
    if (formItem)
    {
        var city;
        var state;
        var island;
        var county;
        var country;
        city = FindInputInTemplateForm(formItem, 'txtCity');
        state = FindInputInTemplateForm(formItem, 'txtState');
        island = FindInputInTemplateForm(formItem, 'txtIsland');
        county = FindInputInTemplateForm(formItem, 'txtCounty');
        country = FindInputInTemplateForm(formItem, 'txtCountry');
        FillZipFields(selectedItem, city, state, island, county, country);
    }
}
 
// Get current form item of a grid
function GetCurrentFormItem(grd) {
    var master = grd.get_masterTableView();
    var formItem;
    if (master.get_isItemInserted()) {
        // insert mode
        formItem = master.get_insertItem();
    } else {
        // @todo check Edit mode
        // get_editItems() is blank
        var editItem = master.get_editItems()[0];
        if (editItem) {
            formItem = editItem.get_editFormItem();
        }
    }
    return formItem;
}
 
/*
    Looks for a HTML element (inputbox) for a given server control
    - FormItem: HTML element of RadGrid's Insert/Edit form
    - ServerID: Server-side Control ID
*/
function FindInputInTemplateForm(formItem, serverID) {           
    if (formItem != null) {
        var inputs = formItem.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            var input = inputs[i];
            // test with city
            if (input.id.indexOf(serverID) < 0)
                continue;
            if (input.type && input.type == "text") {
                return input;
            }
        }
    }
}
 
 
/*
    Full all of the address fields that are dependent on zip code
    - selected: selected item (RadComboBoxItem object)
    - city, state, island, county, country: respective input element
*/
function FillZipFields(selected, city, state, island, county, country) {
    if (selected != null) {
        var attrs = selected.get_attributes();
        city.value = attrs.getAttribute('City');
        state.value = attrs.getAttribute('State');
        island.value = attrs.getAttribute('Island');
        county.value = attrs.getAttribute('County');
        country.value = attrs.getAttribute('Country');
    }
}

Are there conditions where get_editItems called on the master table view return null? What is the condition that get_editItems is guaranteed to return somehting?

Thanks,
Makoto


Tsvetina
Telerik team
 answered on 27 Sep 2012
5 answers
66 views
Hello!

I was working with the InsertSymbol tool and noticed some odd behavior. If you open up the demo (http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx) you will notice that whenever you insert a symbol your cursor does not move with the insert but stays where it was at previously. So if you are typing along and wanted to insert a symbol and then continue typing you have to move your cursor after inserting the symbol before you can continue on. \

Anyways, hopefully you get the picture. Its just not a great user experience and I just wanted to put it on your radar for possible improvement.

Thanks!
 
Rumen
Telerik team
 answered on 27 Sep 2012
6 answers
361 views
hello, i would like to make my radcombo:
<telerik:RadComboBox runat="server" ID="caserappr" AllowCustomText="true" EnableLoadOnDemand="true">
           <WebServiceSettings Method="GetRepresentedCompanyFrom" Path="~/DesktopModules/Expo.Blox/CRM/ComboWebService.asmx" />
</telerik:RadComboBox>

appear as a normal textbox, so that user cannot see the button on the right side.
my webservice will populate the combo-list as suggestions.

Thanks a lot
Rudy
shaji kunjumon
Top achievements
Rank 1
 answered on 27 Sep 2012
3 answers
334 views
Hello!

I am trying to remove blank spaces between table rows by overriding embeded radgrid styles. All my efforts has so far been in vain so far. Any help will be very much appreciated!

<telerik:RadGrid ID="RadGrid1" runat="server" EnableTheming="false"   CssClass="myClass" AllowPaging="False" OnNeedDataSource="RadGrid1_NeedDataSource" BorderStyle="None" style="outline:none;" EnableEmbeddedSkins="false"
               >
                <MasterTableView DataKeyNames="ID" ShowHeader="false" ShowFooter="false" HierarchyDefaultExpanded="true" CommandItemDisplay="None" >
         <ItemTemplate>
         </ItemTemplate>
                                                 
                    <NestedViewTemplate>
                        <telerik:RadGrid ID="RadGrid2" runat="server" EnableTheming="false"  CssClass="myClass" EnableEmbeddedSkins="false" AllowPaging="False" OnNeedDataSource="RadGrid2_NeedDataSource" BorderStyle="None" OnItemDataBound="RadGrid2_ItemDataBound" style="outline:none;" >      
                         <MasterTableView ShowHeader="false" ShowFooter="false" ShowGroupFooter="false" HierarchyDefaultExpanded="false" CommandItemDisplay="None" >        
                        
         <ItemTemplate>
          
         <table style="font-size:11px; width:100%;border: .1em solid #000000;table-layout: fixed; padding-left: 0px;
    padding-right: 0px;">
      <tr>
            <td align="center" style="width:40px;border: .1em solid #000000;"">
               <asp:Label ID="lblRowNumber" runat="server" /></td>
            <td align="center" style="width:70px;border: .1em solid #000000;">
                  <%# DataBinder.Eval(Container.DataItem,"CreationDate") %></td>
            <td align="center" style="width:50px;border: .1em solid #000000;">
                  <%# DataBinder.Eval(Container.DataItem, "Number")%></td>
          
                <td align="center" style="width:150px;border: .1em solid #000000;">
                  <asp:Repeater ID="Repeater3" runat="server" DataSource='<%# Eval("Owners") %>'>
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "CertificateNumber")%>
                                        <%# DataBinder.Eval(Container.DataItem, "IssuedBy")%>
                                        <%# DataBinder.Eval(Container.DataItem, "WhenIssued")%>
                                        <%# DataBinder.Eval(Container.DataItem,"LegalObject")%>
                                        <%# DataBinder.Eval(Container.DataItem, "individual.FIO")%>
                                        <%# DataBinder.Eval(Container.DataItem, "legalEntity.Title")%>
                                        <%# DataBinder.Eval(Container.DataItem, "legalEntity.INN")%>
                                        <%# DataBinder.Eval(Container.DataItem, "legalEntity.OGRN")%>
                                        <%# DataBinder.Eval(Container.DataItem, "legalEntity.Address")%>
                                        <%# DataBinder.Eval(Container.DataItem, "legalEntity.LegalAddress")%>
                                    </ItemTemplate>
                                    <SeparatorTemplate>
                                        
                                    </SeparatorTemplate>
                                </asp:Repeater
                </td>           

        </tr>
 
               </table>
         </ItemTemplate>
 
                       </MasterTableView>   
                        
<ClientSettings EnableAlternatingItems="false">
 
<Selecting AllowRowSelect="False"/>
 
</ClientSettings>
                 
                        </telerik:RadGrid>
                    </NestedViewTemplate>                   
                </MasterTableView>
 
                 
<ClientSettings EnableAlternatingItems="false" Scrolling-AllowScroll="false"  >
 
<Selecting AllowRowSelect="False"/>
 
</ClientSettings>
 
 
            </telerik:RadGrid>
Galin
Telerik team
 answered on 27 Sep 2012
3 answers
91 views
Hi,



I think I found a bug on TreeListCalculatedColumn when using on demand loading on a treelist



If a RadTreeList control is configured with AllowLoadOnDemand and a TreeListCalculatedColumn is defined within its column définitions and exception "The given key was not present in the dictionary." is raised by TreeListCalculatedColumn.OnColumnDataCellBinding(Object sender, EventArgs e) +314



I have a sample project to repro this behavior if required



Rgds

Maria Ilieva
Telerik team
 answered on 27 Sep 2012
4 answers
160 views
Hello, I wanna ask you a question about paging in RadListView. I saw this demo http://demos.telerik.com/aspnet-ajax/listview/examples/paging/custompaging/defaultcs.aspx and wonder if the radlistview query all the items first then do paging, or just get 10 items after each click?
Phuc
Top achievements
Rank 1
 answered on 27 Sep 2012
3 answers
81 views
Hello Telerik Team,
                          I have A Rad Window inside a Rad window, there is a  RadToolTip Bind with the Image Button !! When i Click
           image Button RadToolTip opens in Top Most Parent RadWindow Not in its own Window.
          Your Help will be Appreciated asap.
Regards.

saad
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
145 views
Hi Everyone,

We just bought a couple of licenses for ASP.NET AJAX.

I would like to do the following :

- Reduce the time for my page to load cause inside my radCombobox, I have the name of 5000 person
- Have a radCombobox indise the edit part with automatic load on demand with max 30 items/request
- When I click edit, I would like the selectedValue to be the actual value it was before I clicked the edit command (actually, it's empty)

I'm using a SQLDataSource connected to a storedProc. It might not be the best way to do it, and I'm really
open to advice or suggestion to achieve my goal.

Thanks and have a great day !

Richard

This is my ASPX part
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="gestionScoreSheet.aspx.cs"
    Inherits="GestionV2_gestionScoreSheet" %>
 
<%@ Register Assembly="Telerik.Web.UI" 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>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div id="sdsGrouping">
        <asp:SqlDataSource ID="sdsJoueurVisiteur" runat="server" ConnectionString="<%$ ConnectionStrings:DB_36624_hlm_ConnectionString %>"
            SelectCommand="SELECT tblPersonne.strNomPersonne + N', ' + tblPersonne.strPrenomPersonne AS strNomComplet, tblJoueurPosition.strNomPosition, tblSSSubEquipeSubJoueur.FKintIDJoueurPosition, tblSSSubEquipeSubJoueur.FKintIDPersonne, tblSSSubEquipe.intIDSSEquipe, tblSS.intIDSS, tblSS.FKintIDCedule, tblSSSubEquipe.FKintIDEquipe, tblSSSubEquipeSubJoueur.intIDSSJoueur, tblSSSubEquipeSubJoueur.ysnRegulier FROM tblSSSubEquipe INNER JOIN tblSS ON tblSSSubEquipe.FKintIDSS = tblSS.intIDSS INNER JOIN tblSSSubEquipeSubJoueur INNER JOIN tblPersonne ON tblSSSubEquipeSubJoueur.FKintIDPersonne = tblPersonne.intIDPersonne INNER JOIN tblJoueurPosition ON tblSSSubEquipeSubJoueur.FKintIDJoueurPosition = tblJoueurPosition.intIDJoueurPosition ON tblSSSubEquipe.intIDSSEquipe = tblSSSubEquipeSubJoueur.FKintIDSSEquipe WHERE (tblSSSubEquipe.FKintIDEquipe = @FKintIDEquipe) AND (tblSS.intIDSS = @intIDSS) ORDER BY strNomComplet"
            UpdateCommand="spScoreSheetLineUPUpdate" UpdateCommandType="StoredProcedure"
            DeleteCommand="spScoreSheetLineUPDelete" DeleteCommandType="StoredProcedure"
            InsertCommand="spScoreSheetLineUpInsert" InsertCommandType="StoredProcedure">
            <DeleteParameters>
                <asp:Parameter Name="intIDSSJoueur" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="intIDSS" Type="Int32" />
                <asp:Parameter Name="strRVSSEquipe" Type="String" />
                <asp:Parameter Name="FKintIDPersonne" Type="Int32" />
                <asp:Parameter Name="FKintIDJoueurPosition" Type="Int32" />
                <asp:Parameter Name="ysnRegulier" Type="Boolean" DefaultValue="False" />
            </InsertParameters>
            <SelectParameters>
                <asp:Parameter DefaultValue="2144395403" Name="FKintIDEquipe" />
                <asp:Parameter DefaultValue="2146239473" Name="intIDSS" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="intIDSSJoueur" Type="Int32" />
                <asp:Parameter Name="FKintIDPersonne" Type="Int32" />
                <asp:Parameter Name="FKintIDJoueurPosition" Type="Int32" />
                <asp:Parameter Name="ysnRegulier" Type="Boolean" DefaultValue="False" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="sdsListePosition" runat="server" ConnectionString="<%$ ConnectionStrings:DB_36624_hlm_ConnectionString %>"
            SelectCommand="SELECT * FROM [tblJoueurPosition]"></asp:SqlDataSource>
        <%--sdsListePersonne select command = SELECT top (100) percent intIDPersonne, strNomPersonne + ', ' + strPrenomPersonne AS strNomComplet FROM tblPersonne order by strNomComplet--%>
        <asp:SqlDataSource ID="sdsListePersonne" runat="server" ConnectionString="<%$ ConnectionStrings:DB_36624_hlm_ConnectionString %>"
            SelectCommand="spListePersonne" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
        <br />
        <br />
        <div>
            <telerik:RadGrid ID="rGridLineUpVisiteur" runat="server" AutoGenerateColumns="False"
                CellSpacing="0" Culture="fr-FR" DataSourceID="sdsJoueurVisiteur" GridLines="None"
                AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                AllowMultiRowEdit="True" AllowSorting="True" ShowFooter="True" AutoGenerateDeleteColumn="True"
                AutoGenerateEditColumn="True">
                <MasterTableView DataSourceID="sdsJoueurVisiteur" DataKeyNames="intIDSSJoueur" EditMode="InPlace"
                    CommandItemDisplay="TopAndBottom">
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn DataField="FKintIDPersonne" DataType="System.Int32" FilterControlAltText="Filter FKintIDPersonne column"
                            HeaderText="Name of person" SortExpression="FKintIDPersonne" UniqueName="FKintIDPersonne">
                            <EditItemTemplate>
                                <telerik:RadComboBox ID="radCombo_ListPerson" runat="server" Culture="fr-FR" DataSourceID="sdsListePersonne"
                                    AutoPostBack="true" DataTextField="strNomComplet" DataValueField="intIDPersonne"
                                    EnableAutomaticLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                                    ItemsPerRequest="30">
                                </telerik:RadComboBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblNamePerson" runat="server" Text='<%# Eval("strNomComplet") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="FKintIDJoueurPosition" DataType="System.Int32"
                            FilterControlAltText="Filter FKintIDJoueurPosition column" HeaderText="Position of person"
                            SortExpression="FKintIDJoueurPosition" UniqueName="FKintIDJoueurPosition">
                        </telerik:GridBoundColumn>
                        <telerik:GridCheckBoxColumn DataField="ysnRegulier" DataType="System.Boolean" FilterControlAltText="Filter ysnRegulier column"
                            HeaderText="Full time player ?" SortExpression="ysnRegulier" UniqueName="ysnRegulier">
                        </telerik:GridCheckBoxColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>
Pavlina
Telerik team
 answered on 27 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?