Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
186 views
Gotta be something simple I'm missing here.

I have a list view of Products.  I also have a tooltip.
<telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" MouseTrailing="true"  
        Width="450" runat="server" Animation="Resize" Sticky="true" EnableEmbeddedSkins="true" ShowCallout="true" OnAjaxUpdate="OnAjaxUpdate" Height="400" ContentScrolling="Auto" RelativeTo="Element" Skin="Telerik" AutoCloseDelay="0" Position="MiddleRight"
    </telerik:RadToolTipManager> 

In the code behind I attach the tooltip to the product Image in the listview.
protected void rlvWishlist_ItemDataBound(object sender, RadListViewItemEventArgs e) 
        { 
 
            var target = e.Item.FindControl("rbiProduct"); 
            if (Equals(target, null)) return; 
 
            var item = (RadListViewDataItem) e.Item; 

            RadToolTipManager1.TargetControls.Add(target.ClientID, 
                                                  e.Item.OwnerListView.DataKeyValues[item.DisplayIndex]["ProductID"].ToString(), 
                                                  true); 
        } 

I then use the OnAjaxUpdate to load a user control to display the contents of the tooltip.
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
        { 
            UpdateToolTip(args.Value, args.UpdatePanel); 
        } 
 
        private void UpdateToolTip(string elementID, UpdatePanel panel) 
        { 
             
 
            var ctrl = Page.LoadControl("~/UserControls/ucProductDetail.ascx"); 
            panel.ContentTemplateContainer.Controls.Add(ctrl); 
            var productDetail = (ucProductDetail) ctrl; 
            rlvWishlist.Rebind(); 
            productDetail.ProductID = Convert.ToInt32(elementID); 
        } 

The problem is; it works great when I load the listview initially.  However, if I rebind the list view with another set of products the OnAjaxUpdate still sends in the previous bound listview productIDs. I can see in the rlvWishlist_ItemDataBound that the new ProductID is being set in the target control add method, but when I invoke the tooltip by hovering over the image the args.Value is still the original bound set of data (ProductIDs).

I also tried clearing the tooltip target controls in the rlvWishlist_NeedDataSource, but that doesn't seem to work either.

Any help would be appreciated.

Thank you,
Tad


TAD RHODES
Top achievements
Rank 1
 answered on 20 May 2010
1 answer
152 views
If RadTabStrip and RadMultiPage are positioned in different ContentPlaceHolders of a Master Page, RadMultipage keeps presenting the fisrt view no matter wich tab you click. Is there a known workaround for this?

Thanks

Luis

Princy
Top achievements
Rank 2
 answered on 20 May 2010
2 answers
117 views
Hi,

I Have radgrid in my page. When i turn off view state and in pageindexchanged event when click next page i am getting nothing. Simply a blank page.  But when i turn on view state I am getting data in next pages. Is there any way to get the data. I cant turn on the view state due to performance issue.   Please see the code below for the reference.

.aspx

        <telerik:RadGrid ID="RadGrid1" OnSortCommand="RadGrid1_SortCommand" OnPageIndexChanged="RadGrid1_PageIndexChanged"
            AllowSorting="True" PageSize="20" ShowGroupPanel="True" AllowPaging="True" AllowMultiRowSelection="True"
            AllowFilteringByColumn="true" AutoGenerateColumns="false" EnableViewState="false" runat="server" GridLines="None"
            OnItemUpdated="RadGrid1_ItemUpdated" OnDataBound="RadGrid1_DataBound">


aspx.cs


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData();
    }

    private void LoadData()
    {
        SqlConnection SqlConn = new SqlConnection("uid=tempuser;password=tempuser;data source=USWASHL10015\\SQLEXPRESS;database=CCOM;");
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = SqlConn;
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "usp_testing";
        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        da.Fill(ds);
        RadGrid1.DataSource = ds;
        RadGrid1.DataBind();
        //RadGrid1.ClientSettings.AllowDragToGroup = true;
    }

    protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
    {
        //RadGrid1.Rebind();
        LoadData();
    }
Babu Puchakayala
Top achievements
Rank 1
 answered on 20 May 2010
3 answers
172 views
Hi

   I have a scenario in my application to display the radconfirm when the user changes the item in the radcombo.
   I am having my radcombo inside usercontrol and i am using the usercontrol in the aspx page to load the data.
   In order to trigger the onchange event i have added onclientselectedIndexcchanged event in codebehind and the corresponding Javascript event in the aspx page.
   The issue is that i am not able to retain the radconfirm because of the postback issue. 
    Please let me know if there are any other approaches to retain the radconfirm. To be clear i have not used any AJAX for my radCombo.

  Requirement:

            After the user changes the Item in the radCombo the user will get a confirmation message.
  
 Javascript:
 

 function TextChange(sender, eventArgs) {
         radconfirm("test", event, 350, 100, null, "test");
        }

 

Code Behind :

cmbRadCombo.RadCombo.OnClientSelectedIndexChanged = "TextChange";

Your earliest reply is appreciated.

T. Tsonev
Telerik team
 answered on 20 May 2010
2 answers
199 views
Hello everybody.

I have a simple question.

I have a page with 1 textbox and 1 grid.

My grid is in an ajax panel, and my textbox not. When I make some action in grid (insert, update, delete) I'm trying to change the textbox's value, in the event, like:

Grid Update Event:
TextBox1.Text = "blablabla";

but I can't. What's the best solution for this my friends?

Thanks.

Regards.
Silvio Silva Junior
Top achievements
Rank 2
 answered on 20 May 2010
1 answer
239 views
Is there a way to create a series of Filter expression items, pre-populate them and display them when the grid is first loaded?

I saw another post that showed this example, but I cannot get it to display.

 

RadFilterTextFieldEditor editor = new RadFilterTextFieldEditor();

 

RadFilter1.FieldEditors.Add(editor);

 

if (!IsPostBack)

 

{

editor.FieldName =

"MyColumnName";

 

editor.DataType =

typeof(int);

 

}

Iana Tsolova
Telerik team
 answered on 20 May 2010
1 answer
207 views
I have two controls in my page, 1 readonly textbox (input) and 1 radcombobox.

i changed the style of my textbox as shown below:
<style type="text/css"
        input[readonly] 
        {  
             background-color#fafafa !important;  
             color#000000 !important;  
             cursordefault !important; 
        } 
    </style> 

however it seemed like radcombobox uses input[readonly] as well and it is affected by my custom style. how can i prevent this?
Kamen Bundev
Telerik team
 answered on 20 May 2010
2 answers
111 views
We just ran into something interesting where with the latest Telerik update the user ends up inserting two records (instead of one) when inserting a record.

User Behavior:
There is a popup with some prompts.  Using only the keyboard the user types in the text boxes, hits tab, (repeat).  When on the final text box, the user hits tab, this highlights the Insert button, then the user hits Enter.

As a result two records are inserted.
Note: this was only duplicated using IE8

System Behavior:
It appears that the Enter key submitted the page to insert a record, but it also submitted the page again as a response to having the Insert button activated. 

As a result, the Insert record method was called twice by one Enter button press.


Work Around:
We found our popup had the following in the code behind's page load -
 Page.Form.DefaultButton = btnSubmit.UniqueID;
We removed this and things are back to normal.


The Question:
We rolled back our Telerik dll to 2009q2 and did not have an issue with this popup, however the 2010Q1 version did.  Any ideas as to what this might be in the 2010q1?  We are scratching our heads over here.

Thanks!

Tim
Jeff
Top achievements
Rank 1
 answered on 20 May 2010
1 answer
138 views

Hope someone can help me with this... It seems like it should be an easy thing to do but the solution evades me.

I have a RadPanel on my aspx page that is databound from my code behind. IF I do not call a method from an event the RadPanel drops down and shows the subnavigation, however the navigationUrl does not get created. I have tried several event calls, like onItemCreated or onDateBound but nothing seems to populate the sitenavigationURL.

Here is my codefront

<script type="text/javascript">

function CollapseAllItems()

{

var panelbar = <%= RadPanelBar1.ClientID %>

for (var i=0; i<panelbar.Items.length; i++)

{

panelbar.Items[i].Expand();

}

}

</script>

<radP:RadPanelbar ID="RadPanelBar1" runat="server" RadControlsDir="~/RADCONTROLS" SkinsPath="/skins/menu/"

Skin="fnSub" ExpandMode="SingleExpandedItem" ExpandAnimation-Duration="3" ExpandAnimation-Type="OutSine" onD>
<%--OnItemCreated="RadPanelBar1_ItemDataBound"--%>

</radP:RadPanelbar>


 

SqlDataAdapter

 

da5 = new SqlDataAdapter(cmd5);

 

 

DataSet ds5 = new DataSet();

 

da5.Fill(ds5,

"navigation");

 

 

//Bind ds to Radpanelbar

 

 

 

 

RadPanelBar1.DataTextField =

"navigationName";

 

RadPanelBar1.DataFieldID =

"navigationId";

 

RadPanelBar1.DataFieldParentID =

"parentNavigationId";

 

 

//RadPanelBar1.DataNavigateUrlField = "navigationFullUrl";

 

 

 

 

RadPanelBar1.DataSource = ds5;

RadPanelBar1.DataMember =

"navigation";

 

RadPanelBar1.DataBind();

 

protected

 

void RadPanelBar1_ItemDataBound(object sender, Telerik.WebControls.RadPanelbarEventArgs e)

 

{

 

if (DataBinder.Eval(e.Item.DataItem, "navigationTarget") != DBNull.Value)

 

{

e.Item.Target = (

string)DataBinder.Eval(e.Item.DataItem, "navigationTarget");

 

}

 

 

}

 

Nikolay Tsenkov
Telerik team
 answered on 20 May 2010
8 answers
1.2K+ views
Hello,

I have a problem with the RadCombo and large lists. I've had a look at some other threads but they are quite old.

The combo is populated by AJAX and uses the checkbox item template found elsewhere in the forums. If I load 15,800 items in IE it takes 2 minutes before the browser is usable. The server time to generate the dataset is 3-4 seconds, there seems to be about 20s of other server time as noted by watching the server process in task manager the rest is IE running at 100% CPU. After this time when I click on the drop down I still have to wait 15 seconds for the drop to actually appear with content. Chrome is much faster, 1:15 rather than 2 minutes and almost instantaneous to get the drop down to appear. I also have a loading panel and the spinny (WebBlue) stops after 25 or so seconds, again presumably because the AJAX has finished and it's waiting for the browser to do whatever.

This is the combo:

 <telerik:RadComboBox ID="str_name_campaign" runat="server" oncopy="return false;" 
                                                onpaste="return false;" oncut="return false;" xonkeypress="return tabOnly(event)" 
                                                onmousewheel="return false" OnClientDropDownOpening="OnClientDropDownOpening" 
                                                OnClientDropDownClosing="OnClientDropDownClosing" OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" 
                                                OnClientBlur="OnClientBlur" Width="490px" AllowCustomText="True" ChangeTextOnKeyBoardNavigation="False" 
                                                AutoCompleteSeparator=";" MarkFirstMatch="true" CssClass="cssradtextbox" DataTextField="str_item_name" 
                                                DataValueField="str_item_code" EnableLoadOnDemand="false" OnClientLoad="OnClientLoad"
                                                <ItemTemplate> 
                                                    <asp:CheckBox ID="CheckBox1" runat="server"/> 
                                                </ItemTemplate> 
                                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                                            </telerik:RadComboBox> 

This is the server code:
  Protected Sub str_name_campaign_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles str_name_campaign.ItemDataBound 
    ComboItemBound(sender, e) 
  End Sub 
 
  Private Sub ComboItemBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) 
    'Add each combo checkbox to the Handler 
    Dim objl_CHECKBOX As CheckBox 
 
    objl_CHECKBOX = CType(e.Item.FindControl("CheckBox1"), CheckBox) 
    objl_CHECKBOX.Attributes.Add("onclick""checkboxClick('" & CType(sender, Telerik.Web.UI.RadComboBox).ClientID & "');"
    objl_CHECKBOX.Text = CType(e.Item.DataItem, Data.DataRowView).Item("str_item_name").ToString & " - " & CType(e.Item.DataItem, Data.DataRowView).Item("str_item_code").ToString 
  End Sub 
 

If I comment out ItemDataBound, it is slightly faster, but only a few seconds. Getting the dropdown is 50% faster though albeit I have checkboxes and no text.

What can I do to speed this up? The client wants IE rather than Chrome, so that option is out. We are looking at additional filtering options but it could be quite legitimate for the client to want all 15,800 items in the list.

Ideally the combobox needs to be fully searchable (rather than just starts with) and multiple select with checkboxes, but I don't seem able to get all these options to work together.


Regards,
Mark Leavesley
Simon
Telerik team
 answered on 20 May 2010
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?