Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
In our application we use a tabstrip with different tabs which are build up server-side when they become active. At one of the tabs there is an editable grid which must save the data before the new tab is build up.

Our problem is that the TabStrip updates the selected index in the LoadPostEvent of the lifecycle and makes all child controls on the active tab visible=false. This happens before any user events are executed. When the event of the grid is fired it is marked invisible already...

In our opinion the selected index should be updated when the tabClicked event from the tab is fired. Events fired in the same request before the TabClicked event can work in the correct state then. Now there is a gap between the loadPostData and the TabClicked event where the state of the tabpanel is in an incorrect state.

Thanks for your time!
Dimitar Terziev
Telerik team
 answered on 22 Oct 2012
1 answer
127 views
hii,
 how to change the button's text of autogenerated delete and edit
column ?

thanks
Princy
Top achievements
Rank 2
 answered on 22 Oct 2012
1 answer
143 views
I have a form (page) which has several Telerik controls (text boxes, combobox).

I have a combobox (ID: 'a') with its validation group set to "abc"
I have a button with its validation group set to "abc" (it fires the validation for the group "abc")
I have a required field validator attached to the combobox (ID:'a')

I wish to accomplish the following:

1) When a user manipulates the combobox, I do NOT wish to validate.
2) When the focus moves out of the combobox, I do NOT wish to validate.
3) When the button at which I set the validation group, I *do* wish to validate.

In other words, I do not want validation to fire while the user is just manipulating the combobox and other fields on the form.  I only wish to validate at the moment when the button is clicked.

It seems that this "page-level" validation should be a simple setting.  Why should individual controls be validating?  There could be scenarios (such as mine, where the combobox list of items could be changed ON the page, requiring the person to go in and out of the combobox before finalizing the page).  I don't want each control on the page to have individual validation during the view and manipulation of the items on the page -- no control-level validation firing.  I simply want page-level firing.

Another wish is that I don't have to add extra javascripting to each of the pages for each of the control -- that is a lot of extra "work-arounds" when there could be a simple setting such that the validator only fires if it were fired by the button.

Does anyone have an insight on how I can accomplish my requirements?

Thanks in advance.
Kalina
Telerik team
 answered on 22 Oct 2012
3 answers
145 views
Hello,

we are using a RadGrid with links. If the user clicks a link, it opens a RadWindow which allows the user to send an email. If he clicks the "send"-button within the RadWindow, one image in the Grid changes to indicate the email was send.

But the User doesn't notice the difference until he closes the RadWindow and reloads the page.
Is it therefore possible to reload the RadGrid in the parent page when the user clicks on the button in the RadWindow (best without closing it)?

Thanks!
Marin Bratanov
Telerik team
 answered on 22 Oct 2012
3 answers
115 views
I maintain a web page with a 2 tier grid
the second tier contains a column that needs a filter on
I would appreciate any suggestion on how to implement this functionality
a drop-down on the top, but what to do on the selected index changed event handler

thanks
Eyup
Telerik team
 answered on 22 Oct 2012
3 answers
477 views
I'm creating a dynamic tooltip control that will reference javascript when moused over that is located in the master page, which uses the tool tip manager in the master page to call ajax from the master page's code behind.  I think that's all working fine.  It's a combination of examples that you've provided.  It will load nicely, but then the tooltip will go blank and a javascript error is produced.

It's an "Argument Out of Range" exception triggered by Sys$UI$Bounds when fetching the ToolTipBounds.  The 'x' value is NaN when an integer is expected.  The element in question is the control which is placed in a RadDock.  The tool tip does appear just below the div element and centered.  I'm unsure why it wouldn't have an x value.  I've tried to provide as much information as I can.

Thanks for your assistance, opinions, etc.

EDIT:  Version 2012.2.912.40

Error Stack

Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was NaN. ScriptResource.axd:237
Error$create ScriptResource.axd:237
Error$argumentOutOfRange ScriptResource.axd:302
Function$_validateParameterType ScriptResource.axd:217
Function$_validateParameter ScriptResource.axd:130
Function$_validateParams ScriptResource.axd:84
Sys$UI$Bounds ScriptResource.axd:3924
window.$telerik.window.TelerikCommonScripts.Telerik.Web.CommonScripts.getBounds ScriptResource.axd:247
$T.RadToolTip._getBoundsRelativeToElement ScriptResource.axd:429
$T.RadToolTip.getToolTipBounds ScriptResource.axd:482
$T.RadToolTip._reSetToolTipPosition ScriptResource.axd:646
$T.RadToolTip._reSetPositionWithoutFlicker ScriptResource.axd:651
(anonymous function) ScriptResource.axd:150
(anonymous function) ScriptResource.axd:47
(anonymous function) ScriptResource.axd:3484
Sys$WebForms$PageRequestManager$_endPostBack ScriptResource.axd:865
Sys$WebForms$PageRequestManager$_scriptsLoadComplete ScriptResource.axd:1729
(anonymous function) ScriptResource.axd:31
(anonymous function) ScriptResource.axd:47
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:342
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:335
Sys$_ScriptLoader$_nextSession ScriptResource.axd:357
Sys$_ScriptLoader$_loadScriptsInternal ScriptResource.axd:344
Sys$_ScriptLoader$_nextSession ScriptResource.axd:357
Sys$_ScriptLoader$loadScripts ScriptResource.axd:262
Sys$WebForms$PageRequestManager$_onFormSubmitCompleted ScriptResource.axd:1344
(anonymous function) ScriptResource.axd:47
(anonymous function) ScriptResource.axd:3484
Sys$Net$WebRequest$completed ScriptResource.axd:6364
Sys$Net$XMLHttpExecutor._onReadyStateChange ScriptResource.axd:5984


Javascript on MasterPage

function showToolTip(element) {
    var tooltipManager = $find("<%= toolTipManagerMain.ClientID %>");
 
    //If the user hovers the image before the page has loaded, there is no manager created
    if (!tooltipManager) return;
 
    //Find the tooltip for this element if it has been created
    var tooltip = tooltipManager.getToolTipByElement(element);
 
    //Create a tooltip if no tooltip exists for such element
    if (!tooltip) {
        tooltip = tooltipManager.createToolTip(element);
 
        var message = element.getAttribute("alt", 2);
        tooltip.set_value(message);
        tooltip.set_animationDuration(0);
    }
}

RadToolTipManager declaration on MasterPage

<telerik:RadToolTipManager ID="toolTipManagerMain" runat="server" HideEvent="ManualClose"
    Animation="Fade" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
    Width="180px" Height="150px" Style="font-size: 18px; text-align: center; font-family: Arial;"
    RenderInPageRoot="True"
     >

OnAjaxUpdate in MasterPage's code behind

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
    Control ctrl = Page.LoadControl("~/Controls/ToolTip/ToolTipSummary.ascx");
    args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
    ToolTipSummary details = (ToolTipSummary)ctrl;
    details.Data = args.Value;
}

Tool Tip Control markup

<div id="testId" class="toolTipGuide" alt="<%# ToolTipMessage %>" runat="server" onmouseover="showToolTip(this);">?</div>

Tool Tip Control code behind

private string _tookTipMessage = "";
public string ToolTipMessage
{
    get { return _tookTipMessage; }
    set { _tookTipMessage = value; }
}
 
protected void Page_Load(object sender, EventArgs e)
{
}
Marin Bratanov
Telerik team
 answered on 22 Oct 2012
2 answers
72 views
I render about 60 images on a page as:

string _html = String.Emtpy;

_html += "<img javascript:void() style=\"z-index: 100; position: absolute; left: " + _releaseLeft + "px; top: " + _imageTop.ToString(CultureInfo.InvariantCulture) + "px;\" src=\"/Images/Orange.png\" /><div style=\"z-index: 101; position: absolute; color: white; top: " + _versionTextTop + "px; left: " + _textLeft + "px; float: right\" id=\"buttonText\">" + pVersionNumber + "</div>" + "\r\n";

PageHTML.Text = _html;

The above code is a switch that adds 4 different images but each image has unique values associated with it.

How can I bind a tooltip in such a way that each image when it is hovered over displays the tooltip properly?

I need to display rich text like:

<strong>Firmware: </strong> yadda
<strong>Release Date: </strong> some date
<strong>More Info: </strong> embedded URL.
....
....
and so on...


Marin Bratanov
Telerik team
 answered on 22 Oct 2012
2 answers
88 views

Hi,

I have used two text box see my screen shot,
I have typed Main Work Name for Ex: Test,
I want to Generate Main Code in alphametics(EX: A, B, C, D, ......)

Thanks
Ansari
Tamim
Top achievements
Rank 1
 answered on 22 Oct 2012
1 answer
126 views

I have  Radgrid with  6 columns

One of the column say 4th_col can have multiple rows within itself.
Basically the parent row id will be the key for retrieving the rows for 4th column.

I am doing inline editing on complet parent rows which means the 4ht column rows are also open.Now on top of that I should be able to add rows in the 4th column.

I hope I am clear

Do you have any sugesstions/ approaches?

Thanks

Marin
Telerik team
 answered on 22 Oct 2012
4 answers
115 views
I'm pretty sure I'm just doing something incorrectly, but here we go.

I'm trying to get a self-referencing hierarchy grid where the first grid and it's hierarchy is linked by ID and DirectParent and its second hierarchy is linked by ChildID and DirectParent so you'd have:
Ben
Ralph
Ralph's Age
Ralph's Eye Color
Betty
Ruth
Ruth's Height
Ruth's Shoe Size
David
David's Age
Sam
Beth
Beth's Blood Type

If the lines in the ASPX below are uncommented then the structure is there, but on the second level, it's like the entire data source just comes out on that line. If you leave in the commenting lines in then you can see what I want, but only for the first and second levels, but not the third. What am I doing wrong here? I also have this "MyRadGrid.MasterTableView.FilterExpression = "DirectParent IS NULL";" in the page load method. I've tried setting a filter on the detail tables, but nothing. Any suggestions are appreciated.

I'm working with a DataTable with Data that resembles this form:
Columns: ID, ChildID, Name, Value, DirectParent
myData.Rows.Add(0, 0, "Ben", "has no kids", DBNull.Value);
 
myData.Rows.Add(1, 0, "Ralph", "has no kids", DBNull.Value);
myData.Rows.Add(2, 0, "Betty", "is a mother", DBNull.Value);
myData.Rows.Add(3, 0, "David", "is a father", DBNull.Value);
 
myData.Rows.Add(0, 0, "Ralph's Age", "33", 1);
myData.Rows.Add(0, 0, "Ralph's Eye Color", "Red", 1);
myData.Rows.Add(0, 0, "David's Age", "77", 3);
 
myData.Rows.Add(0, 4, "Sam", "is David's son", 3);
myData.Rows.Add(0, 5, "Beth", "is David's daughter", 3);
myData.Rows.Add(0, 6, "Ruth", "is Betty's daughter", 2);
 
myData.Rows.Add(0, 0, "Beth's Blood Type", "O+", 5);
myData.Rows.Add(0, 0, "Ruth's Height", "82 inches", 6);
myData.Rows.Add(0, 0, "Ruth's Shoe Size", "10", 6);


And my ASPX is as follows

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <%-- Old, but working
            <rad:RadGrid runat="server" ID="MyRadGrid" OnNeedDataSource="MyRadGrid_NeedDataSource" MasterTableView-HierarchyLoadMode="Client" OnPreRender="MyRadGrid_PreRender">
                <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" DataKeyNames="TheParent, GUID" FilterExpression="TheParent = 0" ShowHeadersWhenNoRecords="false">
                    <SelfHierarchySettings ParentKeyName="TheParent" KeyName="GUID" MaximumDepth="3" />
                </MasterTableView>
                <ClientSettings AllowExpandCollapse="true"></ClientSettings>
            </rad:RadGrid>
            --%>
            <rad:RadGrid runat="server" ID="MyRadGrid" OnNeedDataSource="MyRadGrid_NeedDataSource" MasterTableView-HierarchyLoadMode="Client" OnPreRender="MyRadGrid_PreRender">
                <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" DataKeyNames="DirectParent, ID" ShowHeadersWhenNoRecords="false">
                    <SelfHierarchySettings ParentKeyName="DirectParent" KeyName="ID" MaximumDepth="3" />
                    <%--
                    <DetailTables>
                        <rad:GridTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" DataKeyNames="DirectParent, ChildID" ShowHeadersWhenNoRecords="false">
                            <SelfHierarchySettings ParentKeyName="DirectParent" KeyName="ChildID" MaximumDepth="1" />
                        </rad:GridTableView>
                    </DetailTables>
                    --%>   
                </MasterTableView>
                <ClientSettings AllowExpandCollapse="true"></ClientSettings>
            </rad:RadGrid>
        </div>
    </form>
</body>
</html>

Also, please excuse the structure of this DataTable. It isn't representative of any crazy database where IDs aren't unique.
Andrey
Telerik team
 answered on 22 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?