Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
293 views
I wonder is it possible to create an image rotator for 4-6 images with the quick link buttons to each image similar to http://nivo.dev7studios.com/?

Btw, what control did you use on http://www.telerik.com/ ?
Elvin
Top achievements
Rank 1
 answered on 18 Sep 2013
1 answer
79 views
Dear Supporting Team,

Warm Greetings!!!

I am NAGARAJAN. I have 4 years experience in dot net technology. 

Currently I am using Telerik radgrid (Run-time Version v2.0.50727) (Version 2010.3.1215.35) in my entire project. I am using the radgrid control in asp.net popup window. This page contains around 20 text box and all are mandatory field. I am using required field validator for each controls. There is no issue when I save the page without receive any required field error.

Suppose If I receive any required field issue, the pop up radgrid lost its style. 

Also, Herewith I have attached the screen shorts for your reference.

Kindly let me know the reason for this issue ASAP.

Thank you.



 

Konstantin Dikov
Telerik team
 answered on 17 Sep 2013
1 answer
209 views
Hi,

I have a very simple dynamically-created filter.  The expression value is always empty for a standard DropDownList expression, but works fine with the TextBox; I'm sure it's my own ignorance but I can't find syntax to get the input value and/or set the expression value, which is apparently done in the OnExpressionEvaluated event.  The textbox works without any intervention.

I'm new to Telerik so apologies if there is some blatant issue with the code.  There is a comment where I believe I'm going wrong.

Thanks,
JD

public class filterSimpleCtrl : WebControl
    {
        private RadFilter _rf = new RadFilter();
        private Label _label = new Label();
        private RadScriptManager sm = new RadScriptManager();
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.Page.Form.Controls.Add(sm);
 
            this._label.ID = "_label";
 
            this._rf.ID = "_rf";
            this._rf.FilterContainerID = "RadGrid1";
            this._rf.ExpressionPreviewPosition = RadFilterExpressionPreviewPosition.Bottom;
            this._rf.ApplyExpressions += _rf_ApplyExpressions;
            this._rf.ExpressionItemCreated += _rf_ExpressionItemCreated;
 
            RadFilterTextFieldEditor rfe2 = new RadFilterTextFieldEditor();
            rfe2.FieldName = "City";
            rfe2.DisplayName = "City";
            rfe2.DefaultFilterFunction = RadFilterFunction.Contains;
            _rf.FieldEditors.Add(rfe2);
             
            RadFilterDropDownEditor rfe = new RadFilterDropDownEditor();
            rfe.FieldName = "CountryCode";
            rfe.DisplayName = "Country Code";
            rfe.DataTextField = "CountryCode";
            rfe.DefaultFilterFunction = RadFilterFunction.EqualTo;
            _rf.FieldEditors.Add(rfe);
 
 
            this.Page.Form.Controls.Add(_rf);
            this.Page.Form.Controls.Add(new LiteralControl("<br />"));
            this.Page.Form.Controls.Add(_label);
        }
 
        protected void _rf_ExpressionItemCreated(object sender, RadFilterExpressionItemCreatedEventArgs e)
        {
 
            // Populate the RadDropDownList control for every ShipCountry field editor
            RadFilterSingleExpressionItem singleItem = e.Item as RadFilterSingleExpressionItem;
            if (singleItem != null && singleItem.FieldName == "CountryCode" && singleItem.IsSingleValue)
            {
                RadDropDownList dropDownList = singleItem.InputControl as RadDropDownList;
                dropDownList.DataSource = GetListData("country");
                dropDownList.DataBind();
            }
 
            // Removes the AddGroupExpressionButton for group expression other than the root group
            RadFilterGroupExpressionItem groupItem = e.Item as RadFilterGroupExpressionItem;
            if (groupItem != null)
            {
                if (groupItem.IsRootGroup) groupItem.RemoveButton.Visible = false;
                else groupItem.AddGroupExpressionButton.Visible = false;
            }
        }
 
        void _rf_ApplyExpressions(object sender, RadFilterApplyExpressionsEventArgs e)
        {
            RadFilterSqlQueryProvider queryProvider = new RadFilterSqlQueryProvider();
            queryProvider.OnExpressionEvaluated = this.ExpressionEvaluated;
            queryProvider.ProcessGroup(e.ExpressionRoot);
            this._label.Text = queryProvider.Result;
        }
 
        private void ExpressionEvaluated(RadFilterEvaluationData evaluationData)
        {
            RadFilterFunction filterFunction = evaluationData.Expression.FilterFunction;
            if (evaluationData.Expression.FieldName == "CountryCode" &&
                filterFunction == RadFilterFunction.EqualTo ||
                filterFunction == RadFilterFunction.NotEqualTo)
            {
                //NONE OF THESE WORK
                //string value = (evaluationData.Expression as RadFilterContainsFilterExpression).Value;
                //string value = (((IRadFilterValueExpression)evaluationData.Expression).Values[0] as RadFilterDropDownEditor).ExtractValues()[0].ToString();
                //string value = (((IRadFilterValueExpression)evaluationData.Expression).Values[0] as RadDropDownList).SelectedValue;
 
                RadFilterNonGroupExpression expression = null;
                RadFilterSqlExpressionEvaluator evaluator = RadFilterSqlExpressionEvaluator.GetEvaluator(evaluationData.Expression.FilterFunction);
                expression = new RadFilterEqualToFilterExpression<string>("CountryCode") { Value = value };
                evaluator.GetEvaluationData(expression).CopyTo(evaluationData);
            }
        }
 
        private DataTable GetListData(string list)
        {
            string query = "";
            switch (list)
            {
                case "country":
                    query = "SELECT CountryCode FROM Country";
                    break;
                default:
                    break;
            }
            string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
            SqlCommand cmd = new SqlCommand(query);
            using (SqlConnection con = new SqlConnection(conString))
            {
                using (SqlDataAdapter sda = new SqlDataAdapter())
                {
                    cmd.Connection = con;
 
                    sda.SelectCommand = cmd;
                    using (DataTable dt = new DataTable())
                    {
                        sda.Fill(dt);
                        return dt;
                    }
                }
            }
        }
    }
JD
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
93 views
I am developing a parent and sub reports. The parent report uses RadGrid to display the results. What I need is when items are selected from the the Parent Grid, I want to display all the selected items in the Child (Sub) Report  which uses Telerik Reports The 
Ebenezer
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
207 views
Hello,

I have a radgrid with batch edit mode, that has AllowFilteringByColumn enabled. One of the grid column's is populated from a RadDropdownlist using a lookup table (via a foreign key). The filter in this case, only works on the foreign key value.

I am loading Dropdownlist in "PreRender". How can i configure filter for RadDropdownlist ?

ASPX Code:
<%--Product Names--%>
                <telerik:GridTemplateColumn DataField="Product_Names" GroupByExpression="Product_Names Group by Product_Names"
                    UniqueName="Product_Names" InitializeTemplatesFirst="false" HeaderStyle-Width="10%"
                    HeaderText="Product Names" HeaderStyle-Font-Size="12px">
                    <HeaderTemplate>
                        <table>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="lnkSortProduct_Names" runat="server" CommandArgument="Product_Names" CommandName="Sort"
                                        Text="Product Names"></asp:LinkButton>
                                </td>
                                <td>
                                    <img src="Images/Context_new_menu.jpg" style="margin-top: 5px; margin-left: 5px;
                                        cursor: pointer" onclick='ShowColumnHeaderMenu(event,"Product_Names")' alt="Show context menu" />
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    
                    <ItemTemplate>
                        <asp:Label ID="lblProduct_Names" runat="server" Text='<%#Eval("Product_Names")%>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                    
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="ddlProductNames" runat="server" Width="65px" ToolTip="Choose Product Name" DropDownHeight="150px" DropDownWidth="100px">
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>

C# Code:

protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();
        try
        {
            // Filling Product Names data in Dropdowns
            RadDropDownList ddlProductNames = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_Product_Names").FindControl("ddlProductNames") as RadDropDownList;

            ds = objFilingAssignments.GetAllddlProductNames();
            if (ds.Tables[0].Rows.Count > 0)
            {
                ddlPreparer.Items.Clear();
                ddlPreparer.DataSource = ds;
                ddlPreparer.DataValueField = "User_Initials";
                ddlPreparer.DataTextField = "User_Initials";
                ddlPreparer.DataBind();
                
            }
            ddlProductNames.DataSource = null;
            ddlProductNames.Dispose();

            
        }
        catch (SqlException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
How can i configure filter for RadDropdownlist ?

Thanks,
Sanath Rohilla.
Konstantin Dikov
Telerik team
 answered on 17 Sep 2013
20 answers
878 views
Hi,
I have a page where i want to set the Radpageview height to grow automatically depending on the page i'm loading.I have tried setting the height to 100% but that did not work.I dont want to set the height to pixel cause there are items inside the page which makes the page height grows.Is there a way to set this up dynamically.I have attached the code.If you check the page i have currently set the height as 600px but i dont want to do that.Instead the Radpageview height will automatically grow depending on the page i'm loading.Please have a look.Thanks.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InstrumentSetupContainer.aspx.cs" Inherits="BusinessSettingsSetup_InstrumentSetupContainer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../Styles/Form.css" rel="stylesheet" type="text/css" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" ></asp:ScriptManager>
         <asp:UpdatePanel ID="UpdatePanel2" runat="server" >
            <ContentTemplate>
                <fieldset>
                    <asp:UpdateProgress ID="progress1" runat="server">
                        <ProgressTemplate>        
                            <img alt="" src="../Images/loader.gif" />
                            Please Wait...        
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <div>
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Black"
                            MultiPageID="RadMultiPage1" SelectedIndex="0" >
                            <Tabs>
                                <telerik:RadTab Text="Instrument"></telerik:RadTab>
                                <telerik:RadTab Text="Instrument Catagories"></telerik:RadTab>
                                <telerik:RadTab Text="Instrument Exchange Listing"></telerik:RadTab>
                                <telerik:RadTab Text="Instrument Margin"></telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
                            <telerik:RadPageView ID="RadPageView1" runat="server" Height="600px"  ContentUrl="InstrumentSetup.aspx">
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView2" runat="server" Height="600px" ContentUrl="InstrumentCategoryDatewiseSetup.aspx">
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView3" runat="server" Height="600px" ContentUrl="InstrumentExchangeListingSetup.aspx">
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView4" runat="server" Height="600px" ContentUrl="InstrumentMarginDatewiseSetup.aspx">
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>                       
                    </div>
                                       
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

John
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
70 views
Hi everyone,

I've tried differents possible solutions for this error but i couldn't resolving it.

The problem is that the last RadTab of the RadTabStrip appears in a second line when it should be in the same line of the of the others RadTab. I've tried to change the width the all RadTabs, but it didn't works.

In Firefox and Chrome  everything appears fine.

I'm using the version 2013.1.319.35 of the Telerik.Web.UI.Skins.dll, Telerik.Web.UI and Telerik.Web.Design.

The CSS :

.pestanapanel.RadTabStrip .pestanapaneltexto span.rtsOut span.rtsIn span.rtsTxt:hover
{
    color:#008AC8;
    text-decoration:underline;
}
.pestanapanel.RadTabStrip .rtsLink
{
    padding-left:0px;
}
.pestanapanel.RadTabStrip li.rtsLI
{
    background-color: #d5d5d5;
    text-align:center;
    vertical-align: middle;
    padding-top:0px;
    padding-bottom:0px;
    padding-left:0px;
    padding-right:0px;
    width:175px;
    float:left;
    height:60px; /*33px;*/
    border-right: #999 1px solid;
    -webkit-border-radius:4px 4px 0px 0px;
    -moz-border-radius: 4px 4px 0px 0px;
    border-radius: 4px 4px 0px 0px;
    white-space:normal;
}

The control :

                <telerik:RadTabStrip ID="RadTabCarteras" runat="server" MultiPageID="RadMultiPageCarteras"
                    OnTabClick="RadTabStrip1_TabClick" SelectedIndex="0" Width="943px" Skin="Vista"
                    ScrollChildren="true" ScrollButtonsPosition="Middle" PerTabScrolling="true" 
                    CssClass="pestanapanel">
                    <Tabs>
                        <telerik:RadTab TabIndex="0" Text="<%$ Resources:Common, k000610 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="1" Text="<%$ Resources:Common, k002037 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="2" Text="<%$ Resources:Common, k002082 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="3" Text="<%$ Resources:Common, k002061 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="4" Text="<%$ Resources:Common, k001293 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="5" Text="<%$ Resources:Common, k000667 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                        <telerik:RadTab TabIndex="6" Text="<%$ Resources:Common, k001748 %>" CssClass="pestanapaneltexto">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>


Thanks for your time and for your help.





Nencho
Telerik team
 answered on 17 Sep 2013
3 answers
207 views

Hi Team,

       
              As i have updated Telerik dll's but after updating i am getting below Errors and i am not using any types of triggers and asp update panels so please tell me asap and i am also attaching screen shot of below error(image_xi) and Telerik Ajax settings screen shot.

Could not find an event named 'OnSelectedIndexChanged' on associated control 'ctl00$ContentPlaceHolder1$RadComboBox_Materialreceived' for the trigger in UpdatePanel 'ctl00$ContentPlaceHolder1$material_gridPanel'.



Thanks & Regards
Malkiat Singh
Hristo Valyavicharski
Telerik team
 answered on 17 Sep 2013
3 answers
87 views
I have a RadDockLayout and RadDockZone in the markup and I'm dynamically add RadDock controls from code behind to RadDockZone. And the intended drag and drop behavior of Dock items within the Zone is working fine in IE and Chrome, but not in Firefox. In Firefox when I click on the Title area of the RadDock item (which is the drag handler) the Dock item detached from the list and from the Zone and goes far top of the page from the cursor or just disappear. So far what I have found is this;

The RadDockZone is placed in bottom of the long page (with browser scrolled to bottom). The RadDock item does not take the scroll height into account when it's position is calculated.

Im using latest version of Firefox (v17) and other browsers (IE v9, Chome v23)

Is there a fix for this ? need help.
Slav
Telerik team
 answered on 17 Sep 2013
1 answer
132 views
Hi,
The result set from database comes back as the following data. It is parent child relation. TransactionID 1009 has 3 child records in the database with 3 accounts. The total transaction amount is $12/- (3 + 4+5).
So parent table has ID and other data. Child table has Account#, AccountName, Amount, parentID and some other fields.
  
  
ID  Name    Account#    AccountName Amount
1007    Sam 31747   a   1
1008    Sam 31748   av  2
1009    Sam 31797   ab  3
1009    Sam 31798   ac  4
1009    Sam 31799   ad  5
  
  
  
When it is displayed in the radgrid, we are showing it like this:
  
ID  Name    AccountNum  AccountName Amount
1007    Sam 31747            a        1
1008    Sam 31748            av       2
1009    Sam 31797            Ab ($3)  12
            31798            Ac ($4)
            31799            Ad ($5) 
  
We are achieving this by doing this logic:
While (reader.Read())
{
     //logic to check old transaction or new transaction by comparing ID
         If (newID != oldID)
        {
                //new transaction. So do the code
        }
        Else
        {
        //still previous transaction. So concatenate account numbers
        accountNum += "<br/>" + reader.GetString(reader.GetOrdinal("AccountNumber"));
             accountName += "<br/>" + reader.GetString(reader.GetOrdinal("AccountName"));
             amount += reader.GetDecimal(reader.GetOrdinal("Amount"));
}
}
  
I want this grid data to be exported to BIFF format excel like this:
ID  Name    Account#    AccountName Amount
1007    Sam                            1
            31747         a   
1008    Sam                            2
             31748        av  
1009    Sam                            12
             31797        Ab ($3)     
             31798        Ac ($4) 
             31799        Ad ($5) 
  
  
I tried using ExportInfrastructure and shiftingRowsDown method in a loop, it works for only 1007 and 1008 rows. But not to 1009. I understand why. That has been treated as 1 row eventhough there are multiple accounts. The account# column is just string concatenation. So, when I am exporting looks like I need to use my original dataset. 
  
I tried to create another radgrid programmatically and assign original result set. We have a btn upon clicking it, I export data to excel like this:
  
protected void btnExport_Click(object sender, EventArgs e)
        {
            radGrid.Page.Response.ClearHeaders();
            radGrid.Page.Response.Cache.SetCacheability(HttpCacheability.Private);
            radGrid.MasterTableView.ExportToExcel();
        }
  
protected void rgdChecks_BiffExporting(object sender, Telerik.Web.UI.GridBiffExportingEventArgs e)
 {
      
}
  
Where should I programmatically create radgrid and do customize data to look like above.
We do not want to use hierarchical grid.
  
Please let me know how to get this kind of output?
Thanks,
Prathiba.
Kostadin
Telerik team
 answered on 17 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?