Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
214 views

Hi All

we update latest version of   "Telerik.Web.UI Version=2012.2.912.40," so now we can’t work with user interface because every controllers are not load and appear as 


The server tag 'telerik:RadComboBox' is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.

development team

rohan & hasindu

Kate
Telerik team
 answered on 27 Sep 2012
11 answers
1.1K+ views
Hi all,

I am using a rad grid to display data from my data base. The rad grid has bound fields like date, name, user ID, location etc. I need to display the data sorted according to the date field. Also, I need to add a blank separator row after each sorted group. Please help me in this regard.

Thanks
Uday
Tsvetina
Telerik team
 answered on 27 Sep 2012
2 answers
168 views
Hi,

I believe this to be a bug in the ribbon bar (I am on version 2012.2.724.40).  I have a ribbon bar with a RibbonBarButton called "Save" on it.  When the user clicks save, all fields on the current screen are saved to the database.  However, I have found that for telerik fields on the screen (I've reproduced with RadNumericTextBox, RadTextBox, and RadDatePicker, see below code), if the user does not tab off of the field before clicking the ribbon bar button, that the value entered does not save and reverts back to the previous value.  This behavior does not occur if you use a regular asp.net button. My code to reproduce this is below, I have included a radnumerictextbox, raddatepicker, and a regular asp.net textbox.  The regular asp.net textbox always shows correctly, however the telerik ones do not.  If this is indeed a bug, is there a workaround until a fix is available?  I know it seems minor but we have customers who do much data entry, and little things like this can cause big issues.

The steps to reproduce are:
1.  Enter a value in the rad numeric textbox, say 50.  Tab off (or at least set focus somewhere else), then click 'save' in the ribbon bar.  The alert message shows '50' as expected.
2.  Now change the value to '100'.  Do not tab off the numeric textbox, but instead keep focus.  Click 'save' in the ribbon bar.  The alert shows '50' instead of '100', and the value reverts back to '50' in the textbox as well.

Thank you!
Richard

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadRibbonBar ID="BaseRibbonBar" runat="server" OnButtonClick="BaseRibbonBar_ButtonClick"
    EnableAjaxSkinRendering="true" Visible="true" Skin="Windows7">
    <telerik:RibbonBarTab Text="Basilisk">
        <telerik:RibbonBarGroup Text="Actions" Value="Actions">
            <Items>
                <telerik:RibbonBarButton Size="Large" Value="Save" Text="Save" ImageUrlLarge="~/save.png"
                    ImageUrl="~/Images/save.png" ToolTip="Save the current record" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
</telerik:RadRibbonBar>
<telerik:RadAjaxPanel runat="server" ID="testPanel">
    <telerik:RadNumericTextBox ID="tbMonths" runat="server" Width="40px">
    </telerik:RadNumericTextBox>
    <telerik:RadDatePicker runat="server" ID="datepicker"></telerik:RadDatePicker>
    <asp:Button runat="server" ID="btnTest" OnClick="btnTest_Click" Text="Save" />
    <asp:TextBox runat="server" ID="Asptest"></asp:TextBox>
</telerik:RadAjaxPanel>

protected void btnTest_Click(object sender, EventArgs e)
{
    ScriptManager.RegisterStartupScript(this, GetType(), "Test", "alert('result is " + tbMonths.SelectedDate.ToString() + "');", true);
}
 
protected void BaseRibbonBar_ButtonClick(object sender, Telerik.Web.UI.RibbonBarButtonClickEventArgs e)
{
    ScriptManager.RegisterStartupScript(this, GetType(), "Test", "alert('ribbon result is " + tbMonths.Value.Value.ToString() + "');", true);
}

Richard
Top achievements
Rank 1
 answered on 27 Sep 2012
2 answers
134 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
120 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
361 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
246 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
182 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
321 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
93 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?