Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
257 views
Hello,

I am trying to databind a RadPanelBar (2010 Q2 release) to achieve a specific behavior, and I am having trouble getting it to work.

If I have the panelbar in my aspx like so:

<telerik:RadPanelBar ID="rpbRel" runat="server" OnItemDataBound="rpbRel_ItemDataBound" >
    <ItemTemplate>
        <div class="DestinationWrapperBox">
            <asp:TextBox runat="server" id="txtRel" />
        </div>
    </ItemTemplate>
</telerik:RadPanelBar>

And code-behind like so:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim colTypes As System.Collections.ObjectModel.Collection(Of RelationshipType)
 
    rpbRel.DataSource = colTypes
    rpbRel.DataTextField = "Name"
    rpbRel.DataValueField = "ID"
    rpbRel.DataBind()
End Sub
 
Protected Sub rpbRelationships_ItemDataBound(ByVal sender As Object, ByVal  e As Telerik.Web.UI.RadPanelBarEventArgs)
    Dim oRelType As RelationshipType
    Dim txtTemp As TextBox
  
    oRelType = CType(e.Item.DataItem, RelationshipType)
  
    txtTemp = CType(e.Item.FindControl("txtRel"), TextBox)
    If Not IsNothing(txtTemp) Then
        txtTemp.Text = oRelType.Name
    End If
End Sub

Then what I get is a PanelBar that works correctly, but the items are not collapsible.  I have read in various places that I should add RadPanelItem and add a ContentTemplate and put my template there.

If I move the aspx template code, like so:
<telerik:RadPanelBar ID="rpbRel" runat="server" OnItemDataBound="rpbRel_ItemDataBound" >
    <Items>
        <telerik:RadPanelItem runat="server">
            <ContentTemplate>
                <div class="DestinationWrapperBox">
                    <asp:TextBox runat="server" id="txtRel" />
                </div>
            </ContentTemplate>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

And leave my codebehind the same, then I get collapsed elements that won't expand.

I have traced into the databound procedure under this second scenario, and when it binds e.item is a RadPanelBarItem that has no child items or controls, so the e.item.findcontrol("txtRel") returns nothing.

I feel like I must be binding something wrong somewhere, but I am not sure how to accomplish what I want.

Ideally, I will get PanelBarItems that have their text set to "Name", and have a textbox "under" them, that can be shown or hidden by clicking on the panelbar.  The first example gets me everything except the ability to collapse them.

Is it possible to do what I want?

Josh
Nikolay Tsenkov
Telerik team
 answered on 08 Dec 2010
2 answers
116 views
I am using Telerik.Web.Design version 2010.1.630.20, and get the following error when opening the document manager of the telerik editor:

The data area passed to a system call is too small.

I have been in touch with my hosting provider, and they believe this is because the code needs 'full trust level' whereas the host only provides 'medium trust level'.

How can I fix this?

Thanks
Curt
Curtis
Top achievements
Rank 1
 answered on 08 Dec 2010
1 answer
74 views
Hello,

Please a take a look at the attached and let me know if it is possible
 to do a client side update on a Group headers for "SubTotal ( : Sum of Weight Column) in the attached" when the Text
within the textbox is changed by a user. It is marked in red within the attachment.

Thanks!
Vasil
Telerik team
 answered on 08 Dec 2010
3 answers
105 views
Hi,

I am using a RadTreeView. I saw the example regarding the dragging and dropping of treeview items in RadGrid. I want to drag the items from RadTreeView and drop it into a div.

Please assist me on this.


Thanks
Rohan
Nikolay Tsenkov
Telerik team
 answered on 08 Dec 2010
5 answers
180 views

Hi,

I am trying to use

Telerik.Web.UI.dll (with version 2007.2.1107.0) in my vs 2008 project, I made proper settings inside my web.config, and registered with in my aspx page,

I am using RadTreeView', RadGrid' controls inside my aspx page


Registering the Telerik.Web.UI on top of my aspx page like below

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>



and my aspx page will have rad controls like

1) <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" GridLines="None"

 

Skin="Windows7" OnItemDataBound="RadGrid1_ItemDataBound" OnDeleteCommand="onDelete1"

 

Height="100%" Width="80%">

2)

<telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" OnNodeDrop="RadTreeView1_HandleDrop"

 

OnClientNodeDropping="onNodeDropping" OnClientNodeDragging="onNodeDragging" MultipleSelect="True"

 

EnableDragAndDropBetweenNodes="True" EnableEmbeddedSkins="true" EnableTheming ="true">


but when i try to build the my  asp.net website I am getting the below errors
1) Unknown server tag 'telerik:RadTreeView'
2)Unknown server tag 'telerik:RadGrid'

Can any one please help me out how to resolve the issue. both my aspx and code behind pages are not recognising the the teleric controls



Vasil
Telerik team
 answered on 08 Dec 2010
12 answers
220 views
I have loaded user control in content page. I want it loads some data only if it's not postback because later i need to update this data.
Obviously it is always postback so i can't update the data properly. I tried with checking CallBack but it's always true.
Please suggest what to do. Thanks
Vasil
Telerik team
 answered on 08 Dec 2010
1 answer
92 views

Hi,
I have a requirement for DateTime column to provide two dates (like From and To date) and filter the records which falls between these dates.I went through following link
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

and applied it properly.
but with this feature I also want the normal DateTime filter (with date Picker and filter text box) for the filtering the datetime column with following options-
GreaterThan (the provided date in textbox)
LessThan
Equals
NotEquals
similar to follink link for Shipped Date column-

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

How to get both type of filter controls in single filter template column.

could you tell me how to apply both functionalities  for single DateTime column in filter section.

Regards,
Mamta

Vasil
Telerik team
 answered on 08 Dec 2010
2 answers
90 views
I have a simple program where I assign attributes to a raddock in Page_Load and then pull these attributes using Javascript when the dock is moved (dock.get_element().MyAttribute).  In IE, this works great, but in FireFox and Safari the "get_element().MyAttribute" always returns "undefined".  I'm assuming it is simple syntax, but need some guidance.

ASPX:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
  
  
<script type="text/javascript">
    var zones;
    function OnClientInitialize(dock, args) {
        zones = Telerik.Web.UI.RadDockZonesGlobalArray;
    }
    function OnDockChangedPosition(dock, args) {
        var zone;
        zone = dock.get_dockZone();
        var sDockJustMoved;
        sDockJustMoved = "";
        sDockJustMoved = dock.get_element().TestDock + "~" + zone.get_element().TestZone;
        alert(sDockJustMoved);
    }
</script>
  
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px">
                <telerik:RadDock ID="RadDock1" runat="server" Width="300px" OnClientDockPositionChanged="OnDockChangedPosition">
                </telerik:RadDock>
            </telerik:RadDockZone>
            <telerik:RadDockZone ID="RadDockZone2" runat="server" Height="300px" Width="300px">
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

CODE:
Partial Class _Default
    Inherits System.Web.UI.Page
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RadDock1.Attributes.Add("TestDock", "Dock Attribute")
        RadDockZone1.Attributes.Add("TestZone", "Zone1 Attribute")
        RadDockZone2.Attributes.Add("TestZone", "Zone2 Attribute")
    End Sub
End Class


VS 2008, Telerik 2010.2.713.35
Sa_MMM
Top achievements
Rank 1
 answered on 08 Dec 2010
4 answers
88 views
Hi,
In this case I am binding the grid programmatically in the page load, then when a user does a search, I am binding the grid with a different dataset, when I enable paging after the search it binds back the original dataset; here is the code:
public partial class PageSearch : System.Web.UI.Page
{
    public ACHPagingDLL.dl dl = new ACHPagingDLL.dl();
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadGrid();
    }
    public void LoadGrid()
    {
        DataSet dsPatients = dl.c_FN_Paging_getAllEmployees();
        rgEmployees.DataSource = dsPatients;
        rgEmployees.DataBind();
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (txtSearch.Text.Length < 2)
        {
            litResult.Visible = true;
            litResult.Text = "<FONT color=#cc0000 size=3>Search for 2 or more characters!</FONT>";
            LoadGrid();
            return;
        }
        else
        {
            DataSet dsSearch = dl.c_FN_seachEmployees(txtSearch.Text);
            rgEmployees.DataSource = dsSearch;
            rgEmployees.DataBind();
        }
    }
}
And here is the HTML:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <table class="style4">
            <tr>
                <td class="style5">
                    Search for employee by name:</td>
                <td class="style6">
                    <telerik:RadTextBox ID="txtSearch" Runat="server" Width="160px">
                    </telerik:RadTextBox>
                       
                    <telerik:RadButton ID="btnSearch" runat="server" onclick="btnSearch_Click"
                    Text="Search">
                    </telerik:RadButton>
                </td>
                <td>
                    <asp:Literal ID="litResult" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <telerik:RadGrid ID="rgEmployees" runat="server" AllowPaging="True"
                    AutoGenerateColumns="False" GridLines="None" Skin="WebBlue">
                        <MasterTableView pagesize="20">
                            <CommandItemSettings ExportToPdfText="Export to Pdf">
                            </CommandItemSettings>
                            <Columns>
                                <telerik:GridBoundColumn DataField="EmployeeNo" UniqueName="EmployeeNo"
                                Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="EmployeeName" HeaderText="Employee"
                                UniqueName="EmployeeName">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Pager" HeaderText="Pager"
                                UniqueName="Pager">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Office" HeaderText="Office#"
                                UniqueName="Office">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Cell" HeaderText="Cell Phone"
                                UniqueName="Cell">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Email" HeaderText="Email"
                                UniqueName="Email">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <HeaderContextMenu EnableImageSprites="True"
                        CssClass="GridContextMenu GridContextMenu_Default">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                     </td>
            </tr>
        </table>
    </telerik:RadAjaxPanel>

I am not sure if there should be a code to be inserted in the index paging?
Please let me know.

Thank you in advance,
Shehab
Iana Tsolova
Telerik team
 answered on 08 Dec 2010
1 answer
117 views
Hello,

I am currently using the regular menu control and loading an XML file for the content of the menu.  Can this still be down when using a mega drop-down?  How would the XML file be structured?  I haven't found any information on this and I am guessing that the mega drop-down doesn't support this...

thanks,

Steve
Yana
Telerik team
 answered on 08 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?