Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
200 views
Hello,
I'm using a combobox to let the user search items.
The thing is that I want the text the user entered be highlighted in the different items but without using the Filter property.
The filtering for my query is done in the server. I want the text be highlighted if there are corresponding results but continue to display all the items returned from the server even if there is no match in the text.
The thing is that my users are allowed to search items on criteria that may not be displayed in the comboboxes item list.
What I mean for example, is that I can have the following items to lookup for:
index, name
0, john
1, jeanne
2, jo

the combobox only shows the names of the people.

when I search for 'jo' the CBB should display two items, jo and john and higlight the 'jo' part of both items.
But now when I search for '2', it should display one item 'jo' without any highligh in that case...

How can this be done ?

Here is the code I use:
<telerik:RadComboBox ID="cbbMagasin" runat="server" Width="450px" Height="150px"
            ClientIDMode="Static" Filter="Contains" EmptyMessage="Choisir un magasin..."
            EnableLoadOnDemand="True" ShowMoreResultsBox="true" ItemsPerRequest="20" EnableVirtualScrolling="true"
            OnClientDropDownOpening="cbbMagasin_DropDownOpening" OnItemsRequested="cbbMagasin_ItemsRequested"
            LoadingMessage="Chargement..." Localization-NoMatches="Aucune correspondance"
            MarkFirstMatch="True">
        </telerik:RadComboBox>

protected void cbbMagasin_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            RadComboBox cbbMagasin = sender as RadComboBox;
 
            cbbMagasin.Items.Clear();
 
            var magasins = DbContext.Magasins.Where(p => p.Ville.Contains(e.Text) || p.Enseigne.Contains(e.Text) || p.CodePDV.Contains(e.Text)).OrderBy(p => p.Enseigne).ThenBy(p => p.Ville);
 
            foreach (Magasin m in magasins)
            {
                RadComboBoxItem item = new RadComboBoxItem();
 
                item.Text = NamingHelpers.MagasinLabel(m);
                item.Value = m.MagasinID.ToString();
                cbbMagasin.Items.Add(item);
 
                item.DataBind();
            }
        }

You can see that the user can search by CodePDV even if CodePDV is not displayed in the CBB.

Thank you for you help,
John.
Jonx
Top achievements
Rank 2
 answered on 15 Sep 2011
2 answers
94 views
Hello,

I have a DNN site and had created customs skins to be used in certain spots of the site, after upgrading to the lastest version of telerik from v2008.3.1327 my custom skins no longer appear. I tried following the steps on http://www.telerik.com/help/aspnet-ajax/editor-css-classes-and-their-use.html but with no luck any ideas on how to fix this?
Samson
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
92 views
Hello,

I create raddock dynamically. I wish to add newly created raddock at the bottom of all the docks in the raddockzone.

RadDockZone3.Controls.Add(dock) - adds dock at index 0 by default.

I tried to use RadDockZone3.Controls.AddAt(1, dock) then got out of range error.

Can you please suggest approach to add newly created raddock at bottom of all docks in the raddockzone ?

rdmptn
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
87 views
Hi ,

I can't set to set the chart series item for my telerik radchart.

Any ideas on what's wrong ?

MARKUP:
      <telerik:RadChart ID="chartLoyalty" runat="server" SkinsOverrideStyles="false" AutoLayout="true" >

                    <Appearance>
                        <Border Visible="false"></Border>
                        <FillStyle MainColor="White"></FillStyle>
                    </Appearance>   

                   

                   

                <PlotArea>
                        
                    
                    
                        <EmptySeriesMessage Visible="False">
                        </EmptySeriesMessage>


                            <XAxis>
                                    <Appearance Color="Black" Visible="true">
                                        <MajorGridLines Visible="false"></MajorGridLines>

                                        <TextAppearance TextProperties-Color="Black" TextProperties-Font="Arial,8pt">    
                                        </TextAppearance>

                                    </Appearance>

                                    <AxisLabel>
                                        <TextBlock>
                                                                <Appearance TextProperties-Color="Black"></Appearance>
                                        </TextBlock>
                                   </AxisLabel>
                            </XAxis>

                           <YAxis>
                                        <Appearance Color="White" Visible="true">
                                            <MajorGridLines Visible="false"></MajorGridLines>
                                            <MinorGridLines Visible="false"></MinorGridLines>
                                            <TextAppearance TextProperties-Color="Black">
                                            </TextAppearance>
                                        </Appearance>

                                            <AxisLabel>
                                            <TextBlock>
                                            <Appearance TextProperties-Color="Black"></Appearance>
                                            </TextBlock>
                                            </AxisLabel>
                            </YAxis>
    
                            <Appearance>    <FillStyle MainColor="White" FillType="Solid"></FillStyle>
                                    <Border Visible="false" />
                            </Appearance>
            </PlotArea>

   

        <ChartTitle Visible="false">
                <Appearance Visible="False">
                        <FillStyle MainColor=""></FillStyle>
                </Appearance>

        </ChartTitle>

               


</telerik:RadChart>

SOURCECODE:
        public void LoadChart(IList<CrowdMemberLoyaltyProjection> data)
        {



            chartLoyalty.Legend.Visible = false; // Remove the legend
            chartLoyalty.Series.RemoveSeries(); // Remove already existing series

            ChartSeries mySeries = new ChartSeries(String.Empty, ChartSeriesType.Bar);
            


            mySeries.DataYColumn = "PercentageDouble";
            mySeries.DataXColumn = "LoyaltyScore";
            

            chartLoyalty.PlotArea.YAxis.AutoScale = false;
            chartLoyalty.PlotArea.YAxis.MinValue = 0;
            chartLoyalty.PlotArea.YAxis.MaxValue = 100;
            chartLoyalty.PlotArea.YAxis.Step = 5;
            chartLoyalty.PlotArea.YAxis.Appearance.MajorTick.Visible = false;
            chartLoyalty.PlotArea.YAxis.Appearance.MinorTick.Visible = false;


            chartLoyalty.PlotArea.XAxis.LabelStep = 20;
            chartLoyalty.PlotArea.XAxis.AutoScale = false;
            chartLoyalty.PlotArea.XAxis.MinValue = 0;
            chartLoyalty.PlotArea.XAxis.MaxValue = 100;
            chartLoyalty.PlotArea.XAxis.Step = 0.5;
            

            chartLoyalty.PlotArea.XAxis.Appearance.MajorTick.Visible = false;
            chartLoyalty.PlotArea.XAxis.Appearance.MinorTick.Visible = false;


            chartLoyalty.Series.Add(mySeries);

            chartLoyalty.ItemDataBound += chartLoyalty_ItemDataBound;

            chartLoyalty.DataSource = data;
            chartLoyalty.DataBind();

           
        }

        protected void chartLoyalty_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)
        {
             e.SeriesItem.Label.TextBlock.Visible = false;
             e.SeriesItem.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
             e.SeriesItem.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;
             
        }

Evgenia
Telerik team
 answered on 15 Sep 2011
1 answer
188 views
Hi....
I Use Rad button with Image and I add a Confirm Button Extender to it. on button click event I redirect the page to another page. but confirm extender not shoving . actually its shows just for second and fire the click event without getting the confirmation .
when I remove the image its work......

Can any one help me on this...

aspx.......
 <telerik:RadButton ID="radbtnLogout" runat="server" Width="100px" Height="48px" onclick="radbtnLogout_Click">
                            <Image  ImageUrl="App_Themes/Common/Dashboard/Logout-Normal.png"   HoveredImageUrl="App_Themes/Common/Dashboard/Logout-MouseOver.png" IsBackgroundImage="true" />
                        </telerik:RadButton>
                        <cc1:ConfirmButtonExtender ID="radbtnLogout_ConfirmButtonExtender"  ViewStateMode="Inherit"
                                runat="server" ConfirmText="Logout current user from MasterKey HRM?" Enabled="True" TargetControlID="radbtnLogout">
                            </cc1:ConfirmButtonExtender>

cs.....

protected void radbtnLogout_Click(object sender, EventArgs e)
    {
      
        Session.Abandon();

        Response.Redirect("~/Login.aspx");
    }
Slav
Telerik team
 answered on 15 Sep 2011
1 answer
92 views
Hello Every One,

EditFormSettings inside RadComboBox Not Update ,
In my form EditFormSettings i have two RadComboBox first one choose that wise assign in second RadComboBox ,
In First RadComboBox that relevant values are come but not assigned in second RadComboBox,
aspx page.
<tr>
                                                    <td valign="top" align="left">
                                                        Route Name
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="combo_routname" runat="server" Width="85%" DataValueField="routecode"
                                                            DataTextField="routename" MaxLength="6" AutoPostBack="true">
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="height: 5px;">
                                                    </td>
                                                </tr>
                                                 <tr>
                                                    <td valign="top" align="left">
                                                        Location
                                                    </td>
                                                    <td>
                                                        <telerik:RadComboBox ID="RadCombo_Location" runat="server" Width="85%"  MaxLength="6"
                                                        DataValueField="locationcode" DataTextField="locationplan" >
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>


.cs page  assign procedure

protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                if (e.Item.OwnerTableView.IsItemInserted)
                {
                    GridEditFormItem item = (GridEditFormItem)e.Item;
                    RadComboBox serviceprovname = (RadComboBox)item.FindControl("ComboBox_servprod");
                    RadComboBox routename = (RadComboBox)item.FindControl("combo_routname");
                    RadComboBox Location = (RadComboBox)item.FindControl("RadCombo_Location");
 
 
                    using (var db = new DoskContractServicesDataContext(Globals.strCon))
                    {
                        var orgreqfinal = (from a in db.dsroutemasters
                                           where a.status != "DEL"
                                           select new { a.routecode, a.routename }).ToList();
                        routename.DataSource = orgreqfinal;
                        routename.DataValueField = "routecode";
                        routename.DataTextField = "routename";
 
                        var datamaster = (from a in db.dsdatamasters
                                          where a.status != "DEL" && a.datatype == "serpro"
                                          select new { a.clientcode, a.clientname }).ToList();
                        serviceprovname.DataSource = datamaster;
                        serviceprovname.DataValueField = "clientcode";
                        serviceprovname.DataTextField = "clientname";
 
                        if (routename.SelectedValue != "")
                        {
                            Location.Text = "";
                            Location.SelectedValue = "";
                            Location.ClearSelection();
                            Location.Items.Clear();
                            string LocationWise = ("select distinct locationcode, locationplan  from dslocationmaster where status <> 'del' and routecode = '" + routename.SelectedValue + "' ");
                            Location.DataSource = oDBClientADO.GetDataTable(LocationWise);
                            Location.DataValueField = "locationcode";
                            Location.DataTextField = "locationplan";
                            Location.DataBind();
                        }
                        else
                        {
                            string LocationWise = ("select distinct locationcode, locationplan  from dslocationmaster where status <> 'del'");
                            Location.DataSource = oDBClientADO.GetDataTable(LocationWise);
                            Location.DataValueField = "locationcode";
                            Location.DataTextField = "locationplan";
                        }
 
                    }
                }
                else
                {
                    GridEditFormItem item = (GridEditFormItem)e.Item;
                    RadComboBox serviceprod = (RadComboBox)item.FindControl("ComboBox_servprod");
                    RadComboBox routename1 = (RadComboBox)item.FindControl("combo_routname");
                    RadComboBox Location = (RadComboBox)item.FindControl("RadCombo_Location");
 
                    using (var db = new DoskContractServicesDataContext(Globals.strCon))
                    {
                        var orgreqfinal = (from a in db.dsroutemasters
                                           where a.status != "DEL"
                                           select new { a.routecode, a.routename }).ToList();
                        routename1.DataSource = orgreqfinal;
                        routename1.DataValueField = "routecode";
                        routename1.DataTextField = "routename";
 
                        var datamaster = (from a in db.dsdatamasters
                                          where a.status != "DEL" && a.datatype == "serpro"
                                          select new { a.clientcode, a.clientname }).ToList();
                        serviceprod.DataSource = datamaster;
                        serviceprod.DataValueField = "clientcode";
                        serviceprod.DataTextField = "clientname";
 
                        if (routename1.SelectedValue != "")
                        {
                            string LocationWise = ("select distinct locationcode, locationplan  from dslocationmaster where status <> 'del' and routecode = '" + routename1.SelectedValue + "' ");
                            Location.DataSource = oDBClientADO.GetDataTable(LocationWise);
                            Location.DataValueField = "locationcode";
                            Location.DataTextField = "locationplan";
                        }
                        else
                        {
                            string LocationWise = ("select distinct locationcode, locationplan  from dslocationmaster where status <> 'del'");
                            Location.DataSource = oDBClientADO.GetDataTable(LocationWise);
                            Location.DataValueField = "locationcode";
                            Location.DataTextField = "locationplan";
                        }
                    }
 
                    if (e.Item.IsInEditMode)
                    {
                        GridEditableItem editedItem = e.Item as GridEditableItem;
                        GridEditFormItem editForm = (GridEditFormItem)e.Item;
                        string serviceid = editForm["servprovcde"].Text;
 
                        if (serviceid != " ")
                        {
                            SERVICEID1 = Convert.ToInt32(serviceid);
 
                            if (SERVICEID1 > 0)
                            {
                                RadComboBox Servprd = (RadComboBox)item.FindControl("ComboBox_servprod");
                                RadComboBox Rutnam = (RadComboBox)item.FindControl("combo_routname");
                                RadComboBox lctn = (RadComboBox)item.FindControl("RadCombo_Location");
                                List<dsservicedeptnotify> service = DbClient.GetList<dsservicedeptnotify>("servprovcde = " + SERVICEID1);
                                Servprd.SelectedValue = service[0].providercode.ToString();
                                Rutnam.SelectedValue = service[0].routecode.ToString();
                                lctn.SelectedValue = service[0].location.ToString();
                            }
                        }
 
                    }
                }
            }
        }





Thanks,
Mohamed.
Dimitar Terziev
Telerik team
 answered on 15 Sep 2011
1 answer
78 views
My web server went down yesterday, had to make a new one... same programs, Visual Studio 2008, the latest Telerik release, etc.
Locally everything on the web site is working fine - but when I publish the site, none of my telerik controls are expanding or collapsing... from dropdownlists to the radMenus.  I'm about to have a heart attack, anyone have any clue what I should do?
Kate
Telerik team
 answered on 15 Sep 2011
5 answers
131 views
i m displaying a grid in an .aspx page.
the problem is wen i try to delete a record for the first time from the grid, it doesnt ask for confirmation(the record is deleted without confirmation).
after a postback the delete functionality works fine with the confirmation box.
Jayesh Goyani
Top achievements
Rank 2
 answered on 15 Sep 2011
2 answers
76 views
Hi, i have a popup which uses RadEditor, it works everywhere else perfectly, but when this popup is opened in Google chrome, the scroll doesn't work at all. I have latest version of chrome and the latest DLL of telerik controls as well.

looking forward for a quick response!
Thank You.
Pankaj
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
112 views
hi, in the code behind I call a Confirm box in javascript(client-side), with a button that says Yes an other that says No. If the user clicks NO, the method CancelNodeEdited() is called. So I pass the old description as the argument. The problem is that if the user edit the node and enter a new description, then the Confirm box is showed. If the user clicks No, the new description is showed and the old description is not taken. How can I fix this problem ?

if ((dtProjects.Rows.Count > 0) && (checkClientAdminRole()))
                                    {
                                        // set old value to cancel action
                                        e.Node.Attributes["OldNodeDescription"] = e.Node.Attributes["NodeDescription"];

                                        // create warning message
                                        sMessage = "Are you sure you want to edit the Taxanomy? The Tax Return Line is used within your Client by:\\n" + sOtherProjectName;
                                        sMessage = sMessage.Replace("\\", "\\\\").Replace("'", "\\'").Replace("\"", "\\\"");

                                        // register script for user confirmation
                                        sScript = @"var resultado = confirm('" + sMessage + "'); if (!resultado) CancelNodeEdited('" + e.Node.Attributes["OldNodeDescription"] + "');";
                                        ClientScript.RegisterStartupScript(typeof(Page), "jsEditNode", sScript, true);
                                       
                                        // set new value
                                        e.Node.Text = e.Node.Attributes["TaxonomyNotation"] + " " + nodeText;

and in the aspx;

function CancelNodeEdited(oldValue) {   
            tree = document.getElementById('<%=trTaxonomy.ClientID%>');           
            var node = tree.FindNodeByAttribute("NodeDescription", oldValue);                       
            nodetext = node.get_attributes().getAttribute("OldNodeDescription");           
            node.get_attributes().setAttribute("NodeDescription", nodetext);
            node.set_text(node.get_attributes().getAttribute("TaxonomyNotation") + " " + nodetext);
            node.get_attributes().setAttribute("OldNodeDescription", null);
    }
Dimitar Terziev
Telerik team
 answered on 15 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?