Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
162 views
Hello developers,
function getDate()
  {
      var date = $find("<%= RadDatePicker1.ClientID %>");
  }
.aspx
<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
</telerik:RadDatePicker>

I am using the above code to find RadDatePicker using JavaScript, but not able to find the control, date is giving null value. i search a lot but didn't get. please help me out what i have to change in my application.
Vasil
Telerik team
 answered on 14 Jun 2012
1 answer
144 views

I am new to Telerik and I am trying to set up a TreeList that binds to an ObjectDataSource, which gets its data from LINQ.  The primary LINQ entity is Matter; every matter has an associated Client record.

For the TreeList, Client would be the parent and Matter would be the child.

The problem is, Clients and Matters are in different tables.  Can I build out a TreeList programatically like I can a TreeView with nodes?  Is there an easier way?

The Client/Matter relationship is defined as an association in LINQ.

---UPDATE---

I've bound ListView to an ObjectDataSource that combines the two tables together.  It isn't returning any data, however.  Any idea what I am doing wrong?  Again, Clients contain Matters.  A record will be unique for each Matter but will contain non-unique data for its parent, Client.

<asp:ObjectDataSource ID="ClientMattersOds" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetMattersBilledInPastYear" TypeName="Data.ClientMatter">
    <SelectParameters>
        <asp:Parameter Name="emplUno" Type="Int32" DefaultValue="66" />
    </SelectParameters>
</asp:ObjectDataSource>
 
<telerik:RadTreeList ID="ClientsMattersTreeList" runat="server" DataKeyNames="MatterUno" ParentDataKeyNames="ClientUno" DataSourceID="ClientMattersOds"
    PageSize="25" OnNeedDataSource="ClientsMattersTreeList_NeedDataSource" OnDataBound="ClientsMattersTreeList_DataBound">
<ExportSettings ExportMode="RemoveControls">
<Excel PageLeftMargin="0.7in" PageRightMargin="0.7in"></Excel>
 
<Pdf PageWidth="8.5in" PageHeight="11in"></Pdf>
</ExportSettings>
 
<EditFormSettings EditFormType="AutoGenerated">
<EditColumn MinWidth="" MaxWidth=""></EditColumn>
</EditFormSettings>
    <Columns>
        <telerik:TreeListBoundColumn DataField="CLIENT_UNO" DataType="System.Int16" MaxWidth="" MinWidth="" UniqueName="column">
        </telerik:TreeListBoundColumn>
    </Columns>
</telerik:RadTreeList>


[DataObjectMethod(DataObjectMethodType.Select, true)]
public static List<ClientMatter> GetMattersBilledInPastYear(int emplUno)
{
    var dc = new Data.DdDataContext();
 
    //Get the matters by searching all the time entries for this timekeeper from the past year
    //Select only the resulting records that match records from this class
    var records = dc.TimeEntries.Where(a => a.TK_EMPL_UNO == emplUno).Select(a => new ClientMatter()
        {
            _matter_Uno = a.MATTER_UNO,
            _client_Uno = a.Matter.CLIENT_UNO,
            _matter_Code = a.Matter.MATTER_CODE,
            _client_Code = a.Matter.Client.CLIENT_CODE,
            _matter_Name = a.Matter.MATTER_NAME,
            _client_Name = a.Matter.Client.CLIENT_NAME
        }).Distinct().ToList();
 
    return records;
}
Marin
Telerik team
 answered on 14 Jun 2012
1 answer
89 views
Hello eyeryone
Does anybody know how to implement Drag and Drop from TreeView to TreeList? Is this even possible?

Thanks in advance,
esmyy
Bozhidar
Telerik team
 answered on 14 Jun 2012
1 answer
59 views
Hi everyone,

I have a problem and i don't know whether it is related to rad calendar  or something else.
Let me explain the scenario:-

i have rad calendar and its in the update panel and when user tries to select the date in a row i.e. selecting the date change in continues succession, then a error below pop-up (it is happening only in IE9).

Microsoft JScript runtime error: Sys.ParameterCountException: Parameter count mismatch.

Thanks and regards, 
Gaurav Sharma 


Maria Ilieva
Telerik team
 answered on 14 Jun 2012
2 answers
65 views
okai i am following a tutorial on rad grid  using hierarchies  , so when  on command event is triggered from the nested table  i want to get a reference to the parent row that contains this nested table i am pasting the logic that is used in the tutorial , but its rather very complicated


function RadGrid2_Command(sender, args) {

   ordersView = sender.get_masterTableView();
    var nestedViewItem = sender.get_element().parentNode.parentNode;
    var parentGridDataItem = $find(Telerik.Web.UI.Grid.GetNodePreviousSiblingByTagName(nestedViewItem, "tr").id);
    var customerID = parentGridDataItem.getDataKeyValue("CustomerID");


    args.set_cancel(true);

    ordersCommandName = args.get_commandName();

    WebService.GetOrdersByCustomerID(customerID, ordersView.get_currentPageIndex() * ordersView.get_pageSize(), ordersView.get_pageSize(),
                    ordersView.get_sortExpressions().toString(), ordersView.get_filterExpressions().toDynamicLinq(),
                        updateOrdersGrid);
}

but why cant i use 
   var c = sender.get_masterTableView().get_parentRow();
method ?, its returning null  when i use it in the on command event  , and if any one of you can please explain me the logic behind the on command event that i have pasted , i will be much grateful!!!
Galin
Telerik team
 answered on 14 Jun 2012
1 answer
104 views
Is it possible to use a format string for a column? I saw a similar post here about formatting the text in the GroupByExpression for the column but it doesn't seem to work correctly.

Is this on the TODO list or anything? I'm still using Q3 2011 Ajax controls so if its been added to the latest ones, let me know.

Pavlina
Telerik team
 answered on 14 Jun 2012
0 answers
108 views
Hi all!
 
I want used checkbox in telerik:TreeListSelectColumn , I need to implement the recursive selection at this way:
1. Select all parents when the at least one child item was selected.
2. Select all childs when the parent was selected 
But when I'm runing my project, debuging function itemSelected (), error selectedItem.get_parentItem()  and display error : 
Object doesn't support property or method 'get_parentItem'

I'm add  Telerik.Web.UI 3.5 use for Dotnetnuke 4.5.9 .net Framework 2.0, unknow Can I use ?

Thank for help!

function itemSelected(sender, args) {
    var treelist = sender;
    var selectedItem = args.get_item();
    if(selectedItem.get_parentItem())
    treelist.selectItem(selectedItem.get_parentItem());
     //comment out the above line and uncomment the below one to get all child items selected functionality
    //selectChildren(selectedItem);
  
  
    function selectChildren(item) {
        treelist.selectItem(item);
        if (item.get_childItems().length > 0) {
              
            for (var i = 0; i < item.get_childItems().length; i++) {
                selectChildren(item.get_childItems()[i]);
            }
        }
    }
}
 
 
 
<telerik:RadTreeList runat="server" ID="RadTreeList1" DataKeyNames="Id" ParentDataKeyNames="CongViecChaId" OnItemCommand="RadTreeList1_ItemCommand"
       AllowMultiItemSelection="True" AllowPaging="false"  AllowSorting="true" Skin="Hay"
       AutoGenerateColumns="false" OnNeedDataSource ="RadTreeList1_NeedDataSource" OnItemCreated="RadTreeList1_ItemCreated" OnItemDataBound="RadTreeList1_ItemDataBound" >
            <Columns>
                <telerik:TreeListSelectColumn HeaderStyle-Width="40px" UniqueName="chkColum" >
                </telerik:TreeListSelectColumn>
                <telerik:TreeListBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id" Visible="false">
                </telerik:TreeListBoundColumn>
<telerik:TreeListBoundColumn DataField="MaCongViec" HeaderText="Mã Công Việc" UniqueName="MaCongViec">
                </telerik:TreeListBoundColumn>
                <telerik:TreeListBoundColumn DataField="TenCongViec" HeaderText="Tên Công Việc" UniqueName="TenCongViec">
                </telerik:TreeListBoundColumn>
                <telerik:TreeListBoundColumn DataField="CongViecChaId" HeaderText="Công việc cha id" UniqueName="CongViecChaId" Visible="false">
                </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="MoTa" HeaderText="Mô tả" UniqueName="MoTa">
                </telerik:TreeListBoundColumn>
                <telerik:TreeListBoundColumn DataField="TinhTrang" HeaderText="Tình trạng" UniqueName="TinhTrang">
                </telerik:TreeListBoundColumn>
            </Columns
     <ClientSettings Selecting-AllowItemSelection="true">
        <ClientEvents OnItemSelected="itemSelected" />
    </ClientSettings>
  </telerik:RadTreeList>
Du
Top achievements
Rank 1
 asked on 14 Jun 2012
3 answers
271 views
Hi,
we are not able to expand all the child nodes when we click on separate asp button or link button.
we are using Visual Studio 2008.
we are using datasource to load the treeview. we will have three levels of child nodes and all these levels should expand when we click the Expand All Button/Link Button.
we have implemented the expandall functionality from javascript.after this event OnNodeExpand server side will be triggered so here we are binding all the child to parents and also we are setting the expanded property is set to TRUE to all the nodes.

so after this postback event the rad treeview gets refreshed and we are losing the expand all.

Telerik Web.Design and Telerik.Web.UI Version : 2009.2.701.20
ASP.NET:
 <asp:Button ID="btnExpand" runat="server" Text="Expand All" OnClick="btnExpand_Click" />

<telerik:RadTreeView ID="RadTreeView4" runat="server" OnNodeExpand="RadTreeView4_NodeExpand">
            </telerik:RadTreeView>
C#:
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    DataView dtParent = (DataView)SessionDataSource1.Select(DataSourceSelectArguments.Empty);
                    foreach (DataRowView drvParent in dtParent)
                    {
                        rootNode = new RadTreeNode(drvParent["AICategoryName"].ToString());
                        rootNode.Text = rootNode.Text;
                        rootNode.Expanded = true;
                        rootNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
                        RadTreeView4.Nodes.Add(rootNode);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        protected void RadTreeView4_NodeExpand(object sender, RadTreeNodeEventArgs e)
        {
            ExpandNode(e.Node);
        }

        protected void ExpandNode(RadTreeNode e)
        {
            DataView dtChild = (DataView)SessionDataSource2.Select(DataSourceSelectArguments.Empty);
            foreach (DataRowView drvChild in dtChild)
            {
                rootNode = null;
                rootNode = new RadTreeNode(drvChild["AILevel1Name"].ToString());
                rootNode.Text = rootNode.Text;
                RadTreeView4.ExpandAllNodes();
                e.Nodes[0].Expanded = true;
                e.Nodes.Add(rootNode);
                
            }            
        }
Javascript:
function ExpandAll()
    {alert('call');
        var treeView = $find("<%= trTaxonomy.ClientID %>");
        var nodes = treeView.get_allNodes();
        for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].get_nodes() != null) {
                nodes[i].expand();
            }
        }
    }
Bozhidar
Telerik team
 answered on 14 Jun 2012
1 answer
120 views
I'm trying to use the PasswordStrengthSettings attributes of the RadTextBox for the first time, but Visual Studio keeps telling me they're not supported. Here's the code in question:

<telerik:RadTextBox runat="server" ID="txtNewPassword" TextMode="Password">
    <PasswordStrengthSettings showindicator="true" minimumnumericcharacters="1" minimumsymbolcharacters="0"
             textstrengthdescriptionstyles="RedText;RedText;GreenText;GreenText;BlueText;BlueText;" PreferredPasswordLength="8"/>
</telerik:RadTextBox>

And here's the assembly declaration at the top of the page (in case it's a versioning issue): 
<%@ Register Assembly="Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

The solution fails to build as well. Any help is greatly appreciated. 
Shinu
Top achievements
Rank 2
 answered on 14 Jun 2012
0 answers
78 views
Scenario 1)Two reqired field validators are firing at tab event for the text boxes even after using tab index.But I need only the respective validator to be fired.
Scenario 2)I have to bring value from popup and place it in a label along with value of textbox & the values are been assigned but the label value gets disappeared on postback while custom validator is fired.

Need a solution on the above two issues.

Kindly help
Regards
Aabidha Banu.S
Aabidha
Top achievements
Rank 1
 asked on 14 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?