Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
My employer has a use case that would work great with the self-referencing heirarchy, however, the default behavior does not quite match what we want to do with it, and I'm at a loss for trying to get it working the way I want to.

Our data model is represented using objects (not DataTables or DataSources) and is bound as a list of objects to DataSource in NeedsDataSource.

1. We only want to show root nodes on the root node. From what I can tell, a simple FilterExpression on the MasterTableView fixes this.
2. We want to allow sorting, filtering, paging, grouping, etc.. I was able to fix this by turning this all on and then turning it off on the child grids on pre-render.
3. We want the filters to also apply to the child grids AND include the top level node if a child node matches. <-- this is where I get stuck. I figured a custom filter expression combined with a method on each object that returns true if that item or any child item matches would work, but it doesn't seem as if calling custom methods on the objects is allowed in FilterExpression.
Martin
Telerik team
 answered on 30 Mar 2011
1 answer
128 views
I would like to change the appearance of the expand/collapse button of the split bar to be wider than the split bar itself, making it a tab that overlaps the pane next to it. My goal is to make it more visible than the default appearance. See the attached screen shot for an example of what I am seeking. My attempts at increasing the width of the button also increased the width of the split bar, which I don't want.

Is a style like I am seeking possible?

Thanks!

Dobromir
Telerik team
 answered on 30 Mar 2011
1 answer
197 views
If you look at the screenshot I provided, there is a toolbar with a house, export and import.

If I select a type of bulletin board, must show a button after the house.

My problem is this. The DropDownList is in a RadAjaxPanel and ToolBar is a external. I can not use this example because RadAjaxManager content-year white space is dynamic. The toolbar is always present in any important case.


How do I select if "Important messages", my toolbar is refreshed as if I did not RadAjaxPanel everything works.
Maria Ilieva
Telerik team
 answered on 30 Mar 2011
7 answers
270 views
Hello,

I have created a usercontrol where I show an overview of rows from an entity. So far all this entities had a hierarchie (parentid). Now I have an entity (table) without a hierarchie. In other words, the treelist only have to show one level. Because I want to reuse this usercontrol I like to know if it is possible. I had removed the property ParentDataKeyNames but that the Exception:

KeyNames collection length must match ParentKeyNames collection length.


Is it possible what I want?

Kind regards,

Patrick
Sebastian
Telerik team
 answered on 30 Mar 2011
1 answer
84 views
I am using a popup edit form with a form template.  I found the javascript to center the popup window which is working perfectly.  However, I cannot seem to get the bottom of the form to fit within the popup window.  It overflows on the bottom.  I have tried setting the height of the popup window in the popupsettings and also setting it in the javascript with no difference.  How do I tell the FormTemplate not to overflow the bottom of the popup window?  I am attaching a picture of what I mean.

thanks!
Pavlina
Telerik team
 answered on 30 Mar 2011
2 answers
194 views
Hi Telerik

I'm trying to get at node i a treeview to behave as normal, but the user must not be able to change the nodes checked state.
Is it posible to make a node "ReadOnly" but behave as normal?

I've made a small test project to show that i'm looking for.

Hope you understand my problem.

The Html
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadTreeView.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">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" 
            TriStateCheckBoxes="True" DataFieldID="id" DataFieldParentID="Parrentid" 
            onnodedatabound="RadTreeView1_NodeDataBound" CheckChildNodes="true">
              
        </telerik:RadTreeView>
    </div>
    </form>
</body>
</html>


Code behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
namespace RadTreeView
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadTreeView1.CheckBoxes = true;
            RadTreeView1.DataSource = TreeDataItem.GetTreeData();
            RadTreeView1.DataBind();
        }
  
        protected void RadTreeView1_NodeDataBound(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            TreeDataItem _node = e.Node.DataItem as TreeDataItem;
  
            e.Node.Text = _node.Text;
            //e.Node.Checkable = !_node.ReadOnly;
            e.Node.Checked = _node.Selected;
  
            if (_node.ReadOnly)
            {
                e.Node.ImageUrl = "CheckedCheckbox.jpg";
                e.Node.Checked = true;
                e.Node.Enabled = false;
                e.Node.Attributes.Add("style", "Color: #000000;");
            }
        }
    }
}

Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
  
namespace RadTreeView
{
    public class TreeDataItem
    {
        private string _text;
  
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }
  
        private int _id;
  
        public int ID
        {
            get { return _id; }
            set { _id = value; }
        }
  
        private int _parrentId;
  
        public int ParrentId
        {
            get { return _parrentId; }
            set { _parrentId = value; }
        }
  
        private bool _readOnly;
  
        public bool ReadOnly
        {
            get { return _readOnly; }
            set { _readOnly = value; }
        }
  
        private bool _selected;
  
        public bool Selected
        {
            get { return _selected; }
            set { _selected = value; }
        }
  
  
        public TreeDataItem (int id, int parrentId, string text, bool Readonly, bool selected)
        {
            _id = id;
            _parrentId = parrentId;
            _text = text;
            _readOnly = Readonly;
            _selected = selected;
        }
  
        public static List<TreeDataItem> GetTreeData()
        {
            List<TreeDataItem> data = new List<TreeDataItem>();
  
            data.Add(new TreeDataItem(1, 0, "Beer", false, false));
            data.Add(new TreeDataItem(2, 1, "Carlsberg", false, true));
            data.Add(new TreeDataItem(3, 1, "Heineken", false, false));
            data.Add(new TreeDataItem(4, 0, "Food", false, false));
            data.Add(new TreeDataItem(5, 4, "Burger", false, true));
            data.Add(new TreeDataItem(6, 4, "Pizza", false, false));
            data.Add(new TreeDataItem(7, 4, "Sandwitch", true, true));
            data.Add(new TreeDataItem(8, 4, "Spagetti", false, false));
            return data;
        }
    }
}
Jakob
Top achievements
Rank 1
 answered on 30 Mar 2011
9 answers
181 views
I have an application with master page, I placed rad-scheduler under RadAjaxPanel on my content page with ScriptManager/RadScriptManager. When I insert any appointment it works fine but when i update any appointment it does not work, it fails to update.
Similarly when I do the same work in my simple ASPX page without any master page it works fine for me.
In both case i use SQLDataSource wizard to select,insert,update and delete from RadScheduler.

Please help me out I am stuck.
Urgent response is appreciated 

Regards,
Mohsin
Veronica
Telerik team
 answered on 30 Mar 2011
1 answer
64 views
Hi all!
Hope this is the right section of the forum for my question.
I'm trying to build a custom skin using the Visual Style Builder. It's the first time I use custom skins so forgive me if that's a dumb question but I'm going nutty.
The problem is that when viewed in Firefox everything works almost fine (I still have to change something that can't be changed using this awesome tool so I have to edit the default sprite), instead everything gets screwed up when viewed in IE8. You can find attached herewith two screenshots: one showing the skin rendered in IE 8, the other showing the screen rendered in Firefox 4.
I can't find out why.

Thanks in advance,
Daniele Salatti

Dimo
Telerik team
 answered on 30 Mar 2011
1 answer
222 views
Hi,
I'm searching the web for several days but couldn't find a solution yet.
What I want to do is to use the RADGrid with User Control Edit Form for insert and update. And I want to use SQLDatasource to reduce the code for insert/update operations. Displaying the data from the grids selected item in the user control works fine. But I have problems to insert and update records using the SQLDatasource with parameters. Seems that the insert/update events are not fired.

Is it possible to use SQLDataSource for update/insert when using a user control in RADGrid? Are there any samples for that available?

Thanks for your help.

Uwe
Princy
Top achievements
Rank 2
 answered on 30 Mar 2011
3 answers
598 views
ok I have RadGrid implemented, it works great and I can see my data
I implemented a checkbox control on that grid

<telerik:GridTemplateColumn HeaderText="Select"  UniqueName="AssetId">
    <ItemTemplate>
        <asp:CheckBox ID="CheckBox1" runat="server" />
    </ItemTemplate>
</telerik:GridTemplateColumn>


Now I have a button on the page, under its click event I want to read all the rows which are checked
I am doing something similar but its not working.
I am unable to check the checkbox is checked or not.

   protected void UpdateButton_Click(object sender, EventArgs e)
    {
    for (int i = 0; i < RadGrid1.MasterTableView.Items.Count; i++)
            {
                bool isChecked = ((CheckBox)RadGrid1.MasterTableView.FindControl("CheckBox1")).Checked;
 
                if (isChecked)
                {
                    Label lbl = ((Label)RadGrid1.FindControl("lblRadItemId")) as Label;
                    LabelValue = ((Label)RadGrid1.Rows[i].Cells[8].FindControl("lblRadItemId")).Text;
                }
 
}




Shinu
Top achievements
Rank 2
 answered on 30 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?