Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
128 views
Hi

In the advanced form section - Time format, an error is displayed when hitting Apply/OK without making any changes to the field - "Please enter a valid time format"

Lee
Plamen
Telerik team
 answered on 12 Jul 2012
1 answer
138 views
The code that is called by set_contentUrl causes the content to always be loaded twice.

When creating a new tab and pageview clientside, when you call set_contentUrl on the newly created PageView the _createIframe code is eventually called resulting in the content being loaded twice due to the src of the iframe being specified two different ways with no conditional after the first succeeds.  Stepping through after the call to set_contentUrl in IE9 confirms this and is a huge performance issue as it doubles every page viewed in a tab.

Here's the Telerik js code (that is included as the webresource):

b.RadPageViewCollection._createIframe=function(c){var d=document.createElement("iframe");
d.frameBorder="0";
d.style.width="100%";
d.style.height="100%";
if(c._contentUrl){d.src=c._contentUrl;
}c.get_element().appendChild(d);
a(c.get_element()).find("iframe").attr("src",c._contentUrl);
};

The code doesn't match the scripts included in the install directory and if you switch to EnableEmbeddedScripts=false and specify the individual scripts required ( a real pain in the @$$ since you can't mix and match), the content is not loaded twice.  Looks like the scripts in the webresource are outdated.

By mix & match, I meant that you can't just have one Telerik control with EnableEmbeddedScripts=false, as there is no error handling if things like $Telerik are already instantiated - so you have to do it for every Telerik control on the page.

Dimitar Terziev
Telerik team
 answered on 12 Jul 2012
1 answer
110 views

Hello,

I have a RadAsynchUpload control inside a div with style display:none.

When the user clicks a certain radio I switch the div to display:block. In this scenario the AllowedFileExtensions is ignored. If I put the upload control in a div with normal display it works.
Princy
Top achievements
Rank 2
 answered on 12 Jul 2012
2 answers
229 views
Hi all,

    I have a radgrid which contains 3 columns. In this, the second column is hyperlink type and it navigates to another page. When I filter records using this column it won't work for the first time and then it works after that.

Please provide some suggestions.

Code for the column:

<telerik:GridHyperLinkColumn UniqueName="Description" DataTextField="Description" DataNavigateUrlFields="FindDescription"   DataNavigateUrlFormatString="~/Clients/Details.aspx?Mode=Edit&ID={1}"  HeaderStyle-Width="150px" HeaderText="Description" SortExpression="Description" CurrentFilterFunction="StartsWith"  ShowFilterIcon="False" AutoPostBackOnFilter="True" FilterControlWidth="70px">  </telerik:GridHyperLinkColumn>

Thanks in advance
Angella
Top achievements
Rank 1
 answered on 12 Jul 2012
1 answer
72 views
I have run into an interesting problem.  I have a RadGrid that uses a user control for the edit mode. In the RadGrid some of the information I want to display would be best displayed in a RadGrid.  I want to give the user the ability to do CRUD on this grid while in the CRUD of the parent.  When I get the display going though (Retrieve) and I try to bind the data from code behind I get the created columns PLUS every column from my data source.  Is this a known issue?  To put it simply:

Create a RadGrid (RadGrid1) in an .aspx page.
Set the RadGrid1.MasterTableView.EditFormSettings.UserControlName to a user control
In the user control create a RadGrid (RadGrid2)
Set the bindings for the data source for RadGrid2 and what I am seeing is the full data source plus

When you click on edit and RadGrid2 has data then it looks like to me that there is no way to filter the data other than to filter the data source.

Also when I click on Add New Item for the RadGrid2 it affects the buttons being displayed in the RadGrid1.  So if I am in update mode in RadGrid1 and I click on Add New for RadGrid2 then the Insert button appears for RadGrid1.

It also looks like the dataItem get's reset in RadGrid2 as well which means I loose my data source object when I click on Add New for RadGrid2.

I know I'm not showing code and that's mainly because there are two radgrids with CRUD operations and the amount of code is some 500 lines per radgrid so I thought it would be a bit excessive.  If you need code just let me know and I will mock something up for you.
Marin
Telerik team
 answered on 12 Jul 2012
1 answer
144 views
I recently updated my controls from a 2011 release to the very latest 2012 release.  After doing this, the ribbonbars on a lot of my pages have a problem regarding the buttongroup text, as illustrated by the attached screenshot.

You can see that the "View Status" and "Reference" groups text is fine - it's center-aligned and doesn't cut off.  However, the "Account Details" and what should be "View Ownership" group text is clipped and left-aligned.

As an experiment I removed the "Closed" button from the "View Status" group, and that group then had the same problems as the "Account Details" group - the text is cut off.

Here is the code in case you need to recreate what i've done:

<telerik:RadRibbonBar ID="rrbAdmin" runat="server" CssClass="ribbonBar"
    OnClientSelectedTabChanged="showHeaderRibbonBarResizeOverride">
      
    <telerik:RibbonBarTab Text="Browse" ID="rbtBrowse" />
    <telerik:RibbonBarTab Text="Forms" ID="rbtUsers">
        <telerik:RibbonBarGroup Text="Account Details">
            <Items>
                <telerik:RibbonBarButton Text="Create New<br/>Account" Value="CreateAccountForm" Size="Large" 
                    ImageUrlLarge="../../Images/Icons_32/add_application.png" Visible="false" />                                      
                <telerik:RibbonBarButton Text="View/Edit<br/>Account Form" Value="EditAccountForm" Size="Large" Enabled="false"
                    ImageUrlLarge="../../Images/Icons_32/edit.png" />
            </Items>
        </telerik:RibbonBarGroup>           
        <telerik:RibbonBarGroup Text="View Status" Value="ViewStatus">
            <Items>
                <telerik:RibbonBarToggleList ID="ViewList">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="Open" Value="btnOpen" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/open.png" />
                        <telerik:RibbonBarToggleButton Size="Large" Text="Closed" Value="btnClosed" 
                            ImageUrlLarge="../../Images/Icons_32/closed.png" />
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>
            </Items>
        </telerik:RibbonBarGroup>
        <telerik:RibbonBarGroup Text="View Ownership" Value="ViewOwnership">
            <Items>
                <telerik:RibbonBarToggleList ID="RibbonBarToggleList1">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="My Accounts" Value="btnMyAccounts" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/user.png"  />
                        <telerik:RibbonBarToggleButton Size="Large" Text="All Accounts" Value="btnAllAccounts"
                            ImageUrlLarge="../../Images/Icons_32/all.png" />
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>
            </Items>
        </telerik:RibbonBarGroup>
        <telerik:RibbonBarGroup Text="Reference">
            <Items>
                <telerik:RibbonBarButton Size="Large" Text="Group Authority<br />Matrix" 
                    ImageUrlLarge="../../Images/Icons_32/attachment.png" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
    <telerik:RibbonBarTab Text="Reporting" ID="RibbonBarTab1" Value="Reporting">
        <telerik:RibbonBarGroup Text="Report Type">
            <Items>
                <telerik:RibbonBarToggleList ID="RibbonBarToggleList2">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="By Period" Value="byPeriod" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/calendar.png" />
                        <telerik:RibbonBarToggleButton Size="Large" Text="By Customer" Value="byCustomer"
                            ImageUrlLarge="../../Images/Icons_32/user.png" />                            
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>                                     
            </Items>
        </telerik:RibbonBarGroup>     
    </telerik:RibbonBarTab>
     
</telerik:RadRibbonBar>
Helen
Telerik team
 answered on 12 Jul 2012
1 answer
67 views
I have a page with tabs using RadMultiPage and ascx controls for each tab. One of the tabs contains a form. My code behind for that page has logic like this to load the form with the previously submitted data only when it is not a post back because the submit button preforms a post back.

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        UpdateFormWithDBData();
    }
 
}


If the tabbed page is brought up with the form tab as the initial tab, the form data loads on the page and works fine.

The problem is that if the page is brought up with another tab selected as the initial tab, when the user clicks on the tab with the form, the form data is not loaded because apparently clicking on the tab preforms a post back?? How do I get around this issue?

Thanks
Kate
Telerik team
 answered on 12 Jul 2012
1 answer
143 views
I need to use Cascading combo boxes for that to avoid post backs i selected Load on demand Ajax Combo....
for first time selected values its working fine..when i will change item in the first combo-box the second combo box items are not get updated.my code is below

<telerik:RadComboBox ID="RadComboState" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select a state" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboState_ItemsRequested">
                                            </telerik:RadComboBox>
  <telerik:RadComboBox ID="RadComboInstitution" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select an institution" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboInstitution_ItemsRequested"
                                                OnClientItemsRequesting="GetSelectedState">
                                            </telerik:RadComboBox>
function GetSelectedState(sender, eventArgs) {
            var SelectedState;
            var combo = Telerik.Web.UI.RadComboBox.ComboBoxes[0];
            SelectedState = combo.get_value();
            var context = eventArgs.get_context();
            context["StateId"] = SelectedState;
             
        }      

protected void RadComboState_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboState.Items.Clear();
        DataSet data = PoulateStates();
        if (data.Tables.Count > 0 && data.Tables[0].Rows[0][0].ToString() == "0")
        {
            int itemOffset = e.NumberOfItems;
            int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Tables[0].Rows.Count);
            e.EndOfItems = endOffset == data.Tables[0].Rows.Count;
            for (int i = itemOffset; i < endOffset; i++)
            {
                RadComboState.Items.Add(new RadComboBoxItem(data.Tables[0].Rows[i]["State_Name"].ToString(),
                                                            data.Tables[0].Rows[i]["intPkVal"].ToString()));
            }
            e.Message = GetStatusMessage(endOffset, data.Tables[0].Rows.Count);
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            if (Session["COUNTRY"] != null && Session["COUNTRY"].ToString().ToUpper() == "MARSHALL ISLANDS")
                item.Text = "No Island Exists";
            else
                item.Text = "No State Exists";
            RadComboState.Items.Add(item);
        }
    }
     
    protected void RadComboInstitution_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboInstitution.Items.Clear();
        DataSet Institution = new DataSet();
        
        try
        {
            string StateId = e.Context["StateId"].ToString();
            Institution = populateInstitution(StateId);
 
            if (Institution.Tables[0].Rows[0][0].ToString() == "0")
            {
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Institution.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Institution.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboInstitution.Items.Add(
                        new RadComboBoxItem(Institution.Tables[0].Rows[i]["Institution_Name"].ToString(),
                                            Institution.Tables[0].Rows[i]["InstitutionId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Institution.Tables[0].Rows.Count);             
            }
            else
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = "-1";
                item.Text = "No Institution Exists";
                RadComboInstitution.Items.Add(item);
            }
 
        }
        catch (Exception ex)
        {
        }
    }

Princy
Top achievements
Rank 2
 answered on 12 Jul 2012
1 answer
262 views
Hi,
 I am trying to export the grid by using the default telerik functionality which has the inline filters,
whenever i am trying to export to excel or word , the filters are shown up in the exported file even if the filtering has not been done ,

if (e.CommandName == RadGrid.ExportToExcelCommandName)
        {
            foreach (GridFilteringItem filter in radGrid.MasterTableView.GetItems(GridItemType.FilteringItem))
            {
                filter.Visible = false;
            }
            radGrid.MasterTableView.ExportToExcel();
        }

Even after using this part of code in the ItemCommand its not working, as the Needdatasource event is triggered after the ItemCommand the grid is rebinded  to loose all its settings.
Could you provide me help regarding this issue asap.

-Karthik
Princy
Top achievements
Rank 2
 answered on 12 Jul 2012
2 answers
125 views
Hi,

I tried your sample in Knowledge Base Scheduler How to implement Resource paging and got following error message:

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.


Please let me know how to fix this issue.

Thanks!

Alan
Plamen
Telerik team
 answered on 12 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?