Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
How to show radconfirm with RadButton?On clicking the button it simply disappears..
Shinu
Top achievements
Rank 2
 answered on 27 Sep 2012
1 answer
87 views
How can I add a web form using the telerik scenarios wizard and still select a master page. I realize I can add RadStyleSheetManager, RadScriptManager, and  RadAjaxManager after I create the page, but that seems like a step that should be handled automatically.

Am I missing something obvious? 

Thanks, Marty
Marin Bratanov
Telerik team
 answered on 27 Sep 2012
2 answers
315 views
I have a radGrid control with a nested panel inside.  The panel contains various text boxes.  The only way that I have been able to find the text box within the nested panel is using a foreach loop.  I have not been able to only find the textbox within the selected row.  Below is the code i am using...

            foreach (GridNestedViewItem item1 in rgrdContacts.MasterTableView.GetItems(GridItemType.NestedView))
            {
                if (e.Item.Cells[3].Text == "False")
                {
                    string popupTitle = "Edit Contact";
                    LinkButton linkButton = (LinkButton)item1.FindControl("lbtnEditContact");
                    linkButton.Attributes.Add("onClick", BuildLightBox("../Pages/EditContact.aspx?IsDlg=0&ContactId=" + e.Item.Cells[2].Text, popupTitle, 960, 680));
                    linkButton.CssClass = "cwp-button";
                    linkButton.Visible = true;
                }
}

Thank you
Julio
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
201 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
143 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
253 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
69 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
366 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
338 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
94 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?