Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views
Hi

I'm experiencing a problem with RadTreeView when NodeTemplate has got a RadGrid inside of it. This generally works correct, but when ExpandMode="ServerSideCallBack" is used for node it gives an error message on expand, saying:

Script control 'testGrid' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl


This simple test page shows the problem for me:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestGridInTree.aspx.cs" Inherits="TestGridInTree" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
<script type="text/javascript" language="javascript">
    AddServerNode = function (name, serverId) {
        treeView = $find("<%= TestTree.ClientID %>");
        treeView.trackChanges();
 
        var node = new Telerik.Web.UI.RadTreeNode();
 
        node.set_text(name);
 
        node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);
 
        treeView.get_nodes().add(node);
 
        treeView.commitChanges();
    }
</script>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <asp:Button runat="server" ID="btnAdd" Text="Add" OnClientClick="AddServerNode('client');return false;" />
        <Telerik:RadTreeView runat="server" ID="TestTree" OnNodeExpand="TestTree_NodeExpand">
            <NodeTemplate>
                <asp:Label runat="server" ID="lblTest" Text="test" />
                <telerik:RadGrid runat="server" ID="testGird" />
            </NodeTemplate>
 
            <Nodes>
                <telerik:RadTreeNode runat="server" ID="node1" Text="ClientSide" ExpandMode="ServerSide"/>
                <telerik:RadTreeNode runat="server" ID="node2" Text="ServerSideCallBack" ExpandMode="ServerSideCallBack" />
            </Nodes>
        </Telerik:RadTreeView>
     
    </div>
    </form>
</body>
</html>

Codebehind:
using Telerik.Web.UI;
 
public partial class TestGridInTree : System.Web.UI.Page
{
    protected void TestTree_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
        var node = new RadTreeNode("childnode");
        e.Node.Nodes.Add(node);
    }
}


In case there is a workaround for this - please note that I would like this to work for client-side added node also (Add button in sample above).
Dimitar Terziev
Telerik team
 answered on 11 Apr 2012
6 answers
114 views
Hello,
I've been trying to fine-tune and add background images for different parts of both the TabStrip and the Menu e.g. Tabs->Outer Wrapper etc. , but it seems like we can't add our own images yet? All I can do is either keep or remove the existing image being used. When I click on the image file dialog in IE8, nothing hapens, in FF3.5 I get an "Image not recognized" banner on the preview control. Is this a bug or just a feature yet to be implemented? Thanks!
Dave Whiting
Top achievements
Rank 1
 answered on 11 Apr 2012
14 answers
294 views
Has anyone gotten the Upload Progress to work in RadFileExplorer?  There is a code library here: http://www.telerik.com/community/code-library/aspnet-ajax/file-explorer/add-a-radprogressarea-inside-the-upload-dialog.aspx that goes into it and it works.  I have that implemented on my site however if you are uploading say a 20MB document the upload progress bar only shows up at the end right before the file is completely uploaded.  So it's like the upload is nearly complete then the upload progress bar flashes for a second then the upload is done.  Here is my code:

ASCX:

function

 

 

OnClientLoad(oFExplorer, args) {

windowManager = oFExplorer.get_windowManager();

windowManager.add_show(uploadWindowShown);

}


function

 

uploadWindowShown(oWindow, args) {

 

if (oWindow.get_title() == "Upload") {// The upload window

 

//oWindow.moveTo(200, 100);

 

// Find the upload button in the Upload dialog

 

var uploadBtn = $get("<%= RadFileExplorer1.ClientID %>_btnUpload");

uploadBtn.onclick =

 

function (e) {

 

this.style.display = "none";

};

 

var progressArea = $find("<%= RadProgressArea1.ClientID %>");

 

// Use the button to find the parent node

uploadBtn.parentNode.insertBefore(progressArea.get_element(), uploadBtn);

}

}


<

 

 

telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" EnableCopy="true" OnExplorerPopulated="RadFileExplorer1_ExplorerPopulated"

 

OnClientFileOpen="OnClientFileOpen"

 

OnClientFolderLoaded="OnClientFolderLoaded"

 

OnClientLoad="OnClientLoad"

 

OnClientMove="OnClientMove"

 

OnClientFolderChange="OnClientFolderChange"

 

OnClientCopy="OnClientCopy"

 

OnClientCreateNewFolder="OnClientCreateNewFolder"

 

OnClientDelete="OnClientDelete"

 

Width="100%" KeyboardShortcuts-Back="BACK" KeyboardShortcuts-Delete="DEL"

 

KeyboardShortcuts-Forward="RIGHT" KeyboardShortcuts-UploadFile="F12" KeyboardShortcuts-Refresh="F5" KeyboardShortcuts-PopupWindowClose="ESC"

 

KeyboardShortcuts-NewFolder="F3" Configuration-MaxUploadFileSize="1572864000" DisplayUpFolderItem="false" OnItemCommand="RadFileExplorer1_ItemCommand"></telerik:RadFileExplorer>

CODE BEHIND:

 

protected

 

 

 

 

 

 

 

 

void RadFileExplorer1_ItemCommand(object sender, RadFileExplorerEventArgs e)

{

 

 

 

 

 

if (e.Command.Equals("UploadFile"))

{

 

 

 

 

 

RadProgressContext context = RadProgressContext.Current;

context.SecondaryTotal = Request.Files.Count;

 

 

 

 

 

for (int i = 1; i < Request.Files.Count; i++)

{

 

 

 

 

 

// A very time consumming task

context.SecondaryValue = i.ToString();

context.SecondaryPercent = i.ToString();

context.CurrentOperationText =

 

 

 

 

 

"Doing step " + i.ToString();

 

 

 

 

 

if (!Response.IsClientConnected)

{

 

 

 

 

 

//Cancel button was clicked or the browser was closed, so stop processing

 

 

 

 

 

break;

}

}

}

}

Thanks,
Adam

Dobromir
Telerik team
 answered on 11 Apr 2012
1 answer
206 views
Hi I'm new In telerik... So I would like to know if there are Metro Style Components For web or If with the web components I can use to make a style metro.

Thanks!!!..
Bozhidar
Telerik team
 answered on 11 Apr 2012
7 answers
115 views
Hi

When radiobutton 'every x day(s)' is checked and the days are not filled in, Getting the RecurrenceRule property from the control gives an exception Input string was not in a correct format. This looks like a bug of the control RadSchedulerRecurrenceEditor

Does anybody know a solution to this?

Plamen
Telerik team
 answered on 11 Apr 2012
2 answers
124 views
Hi
I am using a hierarchial radgrid & when I filter in the child table ,The value in the filter text box persists in the other child tables of other master rows.
Like I have attached a screenshot of the same in which u can see that value 7 in the textbox persists.I have taken the screenshot from the below link.

http://mono.telerik.com/Grid/Examples/Hierarchy/FilteringDetailTables/DefaultCS.aspx


Basically, I do not wish to persist this filter text value in other child tables.

Please suggest.

thanks
kdyeqb
Top achievements
Rank 1
 answered on 11 Apr 2012
3 answers
173 views
Here is my code, combobox returns empty

 

 

protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

 

{

 

 

DataSet dt = DhsBasePage.getProxyDataService().GetProviderType(); //call data layer function to get an agency datatable

 

 

 

RadComboBox comboBox = (RadComboBox)sender;

 

// Clear the default Item that has been re-created from ViewState at this point.

comboBox.Items.Clear();

 

 

foreach (DataRow row in dt.Tables[0].Rows)

 

{

 

 

RadComboBoxItem item = new RadComboBoxItem();

 

item.Text = row[

 

"Abbreviation"].ToString();

 

item.Value = row[

 

"ProviderTypeID"].ToString();

 

item.Attributes.Add(

 

"Description", row["Description"].ToString());

 

comboBox.Items.Add(item);

item.DataBind();

}

}

 

 

protected void OnSelectedIndexChangedHandler(object sender, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

Session[

 

"ProviderTypeID"] = e.Value;

 

}

 

 

protected void OnItemDataBoundHandler(object sender, GridItemEventArgs e)

 

{

 

 

if (e.Item.IsInEditMode)

 

{

 

 

GridEditableItem item = (GridEditableItem)e.Item;

 

 

 

if (!(e.Item is IGridInsertItem))

 

{

 

 

RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1");

 

 

 

RadComboBoxItem selectedItem = new RadComboBoxItem();

 

selectedItem.Text = ((

 

DataRowView)e.Item.DataItem)["Abbreviation"].ToString();

 

selectedItem.Value = ((

 

DataRowView)e.Item.DataItem)["ProviderTypeID"].ToString();

 

selectedItem.Attributes.Add(

 

"Description", ((DataRowView)e.Item.DataItem)["Description"].ToString());

 

combo.Items.Add(selectedItem);

selectedItem.DataBind();

Session[

 

"ProviderTypeID"] = selectedItem.Value;

 

}

}

}


 

<

 

 

telerik:GridTemplateColumn UniqueName="ProviderType" HeaderText="Provider Type" SortExpression="ProviderType"

 

 

 

 

 

 

 

ItemStyle-Width="400px">

 

 

 

 

 

 

 

<FooterTemplate>

 

 

 

 

 

Template footer

 

</FooterTemplate>

 

 

 

 

 

 

 

<FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

<ul>

 

 

 

 

 

 

 

<li class="col1">

 

 

 

 

 

<%

 

# DataBinder.Eval(Container, "Abbreviation")%>

 

 

 

</li>

 

 

 

 

 

 

 

<li class="col2">

 

 

 

 

 

<%

 

# DataBinder.Eval(Container, "Attributes['Description']")%></li>

 

 

 

 

 

 

 

</ul>

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

<EditItemTemplate>

 

 

 

 

 

 

 

<telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="Abbreviation"

 

 

 

 

 

 

 

OnItemsRequested="RadComboBox1_ItemsRequested" DataValueField="ProviderTypeId" AutoPostBack="true"

 

 

 

 

 

 

 

HighlightTemplatedItems="true" Height="140px" Width="220px" DropDownWidth="420px"

 

 

 

 

 

 

 

OnSelectedIndexChanged="OnSelectedIndexChangedHandler" >

 

 

 

<ItemTemplate>

 

 

 

 

 

<%

 

#DataBinder.Eval(Container.DataItem, "Abbreviation")%>

 

<%

 

#DataBinder.Eval(Container.DataItem, "Description")%>

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

</EditItemTemplate>

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 


What i'm missing here? need help ASAP.
Thanks.
Eva

Princy
Top achievements
Rank 2
 answered on 11 Apr 2012
1 answer
323 views
I have a radcombobox and radgrid in the page, the combobox is set to EnableLoadOnDemand and AutoPostBack, EmptyMessage="Please make a selection". when user makes selection, SelectedIndexChanged event fired automatically and populates the radgrid, all worked fine.

now the requirement is that after it populates the radgrid in the SelectedIndexChanged event, I need to reset to radcombobox to the original status that showing the EmptyMessage instead of showing the current selection. I tried to clear the items and call databind, but it throws exceptions.

how can I to do that?

thanks.

Shinu
Top achievements
Rank 2
 answered on 11 Apr 2012
1 answer
116 views
Hello,

I would like to change the highlight color (the background color of the row when it's selected) of a selected row in my radgrid.  I have attached a screenshot which demonstrates what I have and what I need to accomplish.

Thanks,
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2012
1 answer
342 views
I have a radgrid where I need to display nothing where the data value is 1/1/1900.  It's read only - I don't need a date picker.  Should I use a GridBoundColumn, GridDatetimeColumn, GridTemplateColumn, or other?  How do I trap the values?  I can't change the data source in this case.
Stephen
Top achievements
Rank 1
 answered on 11 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?