Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
266 views
Hi,
in my scenario I use two Trees inside an Fullscreen Splitter (Explorer like application, using webservice-loadondemand). After clicking the text of an node about 20-30 times, and moving the mouse around the browserwindow, my client cpu usage is on 100% (I don't have to move the mouse above the trees. Moving the mouse in an empty area of the browser also stresses the cpu to 100%).
I tried to localise the problem and removed the onclientnodeclicking event and the webservicesettings of the tree, but the cpu usage is still at 100%. When clicking the plus-signs in the tree to expand the nodes, this effect does not occur. I already turned off persistloadondemandnodes and disabled viewstate. The Problem occurs in Firefox and IE6.

I just noticed, that this only occurs if draganddrop is enabled.

Can you help me out?

Thank you very much
Christian
Christian
Top achievements
Rank 1
 answered on 15 Jan 2009
2 answers
122 views
Hi,

Im building my own custom column by inheriting from IBindableTemplate. As suggested, I create the controls in the overridden InstantiateIn method. Now to the problem... I need to know if the controls should be created in "insert mode" or "edit mode". How can I do this?

public void InstantiateIn( Control container ) 
        { 
            switch( _templateType ) 
            { 
                case ListItemType.Header: 
                    break; 
                case ListItemType.Item: 
                    ImageButton editButton = new ImageButton 
                                             { 
                                                 ImageUrl = Images.EditIcon, 
                                                 CommandName = "Edit"
                                                 ToolTip = Dictionary.LocalizedString( Dictionary.Word.Edit ) 
                                             }; 
                    container.Controls.Add( editButton ); 
                     
                    ImageButton deleteButton = new ImageButton 
                                               { 
                                                   ImageUrl = Images.DeleteIcon, 
                                                   CommandName = "Delete"
                                                   ToolTip = Dictionary.LocalizedString( Dictionary.Word.Delete ) 
                                               }; 
                    deleteButton.Attributes.Add( "onclick", "javascript:return confirm('" + _confirmText + "');" ); 
                    container.Controls.Add( deleteButton ); 
                    break; 
                case ListItemType.EditItem: 
                    ImageButton updateButton = new ImageButton 
                                               { 
                                                   ImageUrl = Images.EditIcon, 
                                                   CommandName = "UpdateEdited"
                                                   ToolTip = Dictionary.LocalizedString( Dictionary.Word.Update ) 
                                               }; 
                    container.Controls.Add( updateButton ); 
 
                    ImageButton cancelButton = new ImageButton 
                                               { 
                                                   ImageUrl = Images.EditIcon, 
                                                   CommandName = "CancelAll"
                                                   ToolTip = Dictionary.LocalizedString( Dictionary.Word.Cancel ) 
                                               }; 
                    container.Controls.Add( cancelButton ); 
                    break; 
                case ListItemType.Footer: 
                    break; 
            } 
        } 

So... when the grid is in insert mode, I want the "edit" and "delete" buttons to change into "insert" and "cancel". Any suggestions?

// Pether
Pether Wiklander
Top achievements
Rank 2
 answered on 15 Jan 2009
1 answer
131 views
Hi All,

I have opened a rad window as a reminder popup.
After opening a window, i want to refresh this window after every two minutes how to do this.


Regards
Brijendra Pandey
Svetlina Anati
Telerik team
 answered on 15 Jan 2009
1 answer
109 views
Hi,

I have a page, which loads two separate user controls, UC1 and UC2.

UC1 dynamically adds a few buttons in a RadAjaxPanel, which trigger different events. I have set it up so that a Save button in UC1 rebinds the data contained there.

I now want to reload or rebind the data in UC2 (which is contained in another RadAjaxPanel) when I click the Save button in UC1. How can this be achieved?
Iana Tsolova
Telerik team
 answered on 15 Jan 2009
10 answers
1.2K+ views
I am trying to setup a grid that only allow Update all others are disabled.  I set 

AllowAutomaticInserts

to false and I can still insert a new row.  How can I disable these features?

Rybovich IT Department
Top achievements
Rank 1
 answered on 15 Jan 2009
2 answers
234 views

Hello,
 
I would like to change the background image for Web20 skin on the RadMenu. -I've tried everything but to no avail.

The items have the backgound image but the remaining menu bar still has the previous image.


Many thanks

.RadMenu_Web20  
{  
    border: 1px solid blue;  
    background: #fff url('../Images/buttonbackground_default.jpg') repeat-x top left;  
}  
 
.RadMenu_Web20 .rmRootGroup .rmLink,    
.RadMenu_Web20 .rmRootGroup .rmLink:hover    
{    
    background: #fff url('../Images/buttonbackground_default.jpg') repeat-x top left;  
    height:32px;   
}    
    
.RadMenu_Web20 .rmRootGroup .rmText    
{    
    color: Blue;    

Stefan
Top achievements
Rank 1
 answered on 15 Jan 2009
2 answers
216 views
On my main page:
Javascript:
my PageMethod call:
PageMethods.GetDataAndCount(findString, sortSQL, sessionKey, sortName, pageIndex, pageSize, qmarkUpdateGrid);

My Javascript callback function:
function qmarkUpdateGrid(result)
{
    var data = result.data;
    var count = result.count;
    // selectedRow is within resultset not current page
    var selectedRow = result.selectedRow;
    var pageIndex = result.pageIndex;
    var searchLabel = result.searchLabel;
    var sl = $get("<%= labGetItem.ClientID %>");
    var init = sl.getAttribute("init");
    sl.innerHTML = searchLabel;
    var mtv = $find("<%= grdList.ClientID %>").get_masterTableView();
    mtv.set_dataSource(data);
    mtv.dataBind();
    mtv.set_virtualItemCount(count);
    mtv.set_currentPageIndex(pageIndex);
    if (selectedRow < 0)
    {
        mtv.clearSelectedItems();
    }
    else
    {
        var rowIndex = selectedRow - (mtv.get_pageSize()*pageIndex);
        mtv.get_dataItems()[rowIndex].set_selected(true);
    }
}

My web method returns:
    result.data => 1 page of data
    result.count => total rows for all pages
    result.selectedRow => if this was a find request then row number within all pages
    result.pageIndex => if this was a find request then it might be on different page (data contains correct page)
    result.searchLabel => search label will change depending on what col search is for

The problem i have is when i do a find request and it goes to a different page than what was displayed at time of event, It fires another OnCommand event when i set currentPageIndex on grid control?

I need logic to stop this extra event. I already the correct page in grid.

Murray
Top achievements
Rank 1
 answered on 15 Jan 2009
2 answers
178 views
Using the Grid, is there a way to change the CommandName on a GridButtonColumn based on values in the row? For example, you might have 10 grid rows that as a user could have different permissions (view only, update, delete) to each row. I would like to have one "Action" column that has the appropriate "View" or "Update" statement in the column based on the permissions the user has to that data on that specific row.

So, I want assign values to the CommandName and Text of a GridButtonColumn on a row by row basis based on data values in the row.
Dennis
Top achievements
Rank 1
 answered on 15 Jan 2009
3 answers
204 views
Hello,

I am trying to create buttons dynamically (server side) and add these as controls to a panel which statically defined inside a radupdatepanel. There is no problem with the creation but I also have to attach click events to these dynamically created buttons and let them fire when they are clicked in an AJAX manner.

Here are some specific excerpts from my code...

C#
            foreach (DataRow aRow in dt.Rows) 
            { 
                HyperLink oTagLink = new HyperLink(); 
                oTagLink.CssClass = "Tag"
                oTagLink.Text = aRow[JobTag.Columns.Name].ToString(); 
                oTagLink.NavigateUrl = ""
                Button oRemoveTagBtn = new Button(); 
                oRemoveTagBtn.CssClass = "RemoveTag"
                oRemoveTagBtn.Text = "[x]"
                oRemoveTagBtn.Attributes.Add("TagId", aRow[JobTag.Columns.Id].ToString()); 
                oRemoveTagBtn.Click += new EventHandler(btnRemoveTag_Click); 
 
               
                pnlTags.Controls.Add(oTagLink); 
                pnlTags.Controls.Add(oRemoveTagBtn); 
            } 

and the associated click event...
        protected void btnRemoveTag_Click(object sender, EventArgs e) 
        { 
            Button clicked = (Button)sender; 
            oJobManager.RemoveAssociatedTag(Convert.ToInt32(clicked.Attributes["TagId"])); 
 
            pnlTags_NeedDataSource(); 
        } 

and the excerpt from the ascx section...
<telerik:RadAjaxLoadingPanel Transparency="20" BackColor="White" ID="LoadingPanel1" 
                runat="server" Style="width: 320px; padding-top: 125px;" Height="110px" Width="110px" 
                meta:resourcekey="LoadingPanel1Resource1"
                <img alt="Loading..." src="../../Images/progress.gif" style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <telerik:RadAjaxPanel runat="server" ID="rapTags" LoadingPanelID="LoadingPanel1" 
                HorizontalAlign="NotSet">                 
                <asp:Label ID="lblTagsSection" runat="server" Text="Tags:"></asp:Label> 
                <br /> 
                <asp:Label ID="lblNewTag" runat="server" Text="New Tag:"></asp:Label> 
                <telerik:RadTextBox ID="rtbTag" Width="150px" runat="server"
                </telerik:RadTextBox> 
                <asp:Button ID="btnNewTag" runat="server" Text="Add" OnClick="btnNewTag_Click" /> 
                <br /> 
                <br /> 
                <asp:Label ID="lblTags" runat="server" Text="Associated Tags:"></asp:Label> 
                <br /> 
                <br /> 
                <div style="width: 700px; height: 100px; overflow: auto;"
                    <asp:Panel ID="pnlTags" runat="server"
                    </asp:Panel> 
                </div> 
            </telerik:RadAjaxPanel> 

When the ascx is rendered, I type some candidate tags to the textbox (rtbTag) and click on Add button (btnNewTag), this works fine. The tag is added to the panel using AJAX principles (partial refreshing, loading panel is displayed etc.). But what I could not accomplish is that the neighbor button to the added tags does not work at all...

Any recommendations?








NMA
Top achievements
Rank 1
 answered on 15 Jan 2009
1 answer
85 views
Can you Cancel a post to any forum? I am new here but there seems to be no ability to remove a post.  Half the time I find the answer myself while waiting for one in the forum (any forum).  In those cases I would like to retract or remove the post as long as it is recent and there are no replies to it.
Paul
Telerik team
 answered on 15 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?