Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
Is is possible to have each tab on the tabstrip a different color?  Not just and "on" and "off" color.  I'd like to be able to use a nice fade using sprites if possible and even have there be a slight color variation on the hover for the muti-colored tabs.  It would also be great to have the mutipage pageview have a differnt background also.  Could you show me how you might do that?  thanks very much

Jonathan.
Kate
Telerik team
 answered on 12 Dec 2011
1 answer
117 views
Hi,

How to load imageurl from database field for tree view?
as my data for tree view is comming from database table where in i m having imageurl as well

Regards!

Bozhidar
Telerik team
 answered on 12 Dec 2011
5 answers
168 views
Hi Im new to this telerik stuff and I have been dumped with a solution that is in a mess which i am trying to sort out so bear with me if im making any obvious telerik errors (please)!

I have a tree view that I am trying to populate client side, i understand that i can do this with the following code:

  var tree = $find("<%= uclPanelTabReport1.ClientID %>");
    tree.trackChanges();
    var node = new Telerik.Web.UI.RadTreeNode();
    node.set_text("New Node");
    tree.get_nodes().add(node);
    tree.commitChanges();

However i am having a couple of problems, the first it that the tree is null still after the find statement, I can get the correct value using the following  var tree = $("#RadTreeView1.ClientID %>"); but am unsure if this is a valid way of getting the reference.

When i have the reference to tree i am having an issue that on the next line     tree.trackChanges(); where I am being told by firebug that     tree.trackChanges() is not a functon. Can anyone point me to where I am going wrong? Im sure its something obvious but I cant see what!?!
Bozhidar
Telerik team
 answered on 12 Dec 2011
1 answer
166 views
I am trying to set the datasource inside the RadGrid which is embedded inside the itemtemplate of RadTreeNode

<telerik:RadTreeView ID="RadTreeView1" runat="server">
            <Nodes>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode1">
                    <Nodes>
                        <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 1">
                            <NodeTemplate>
                                    <telerik:RadGrid ID="AllocGrid" Width="98%" AllowSorting="False"
                                        AllowPaging="False" GridLines="None" AutoGenerateColumns="False" runat="server"
                                        Skin="Windows7" Height="147px" Style="margin-top: 102px">
                                        <MasterTableView Width="100%" Summary="RadGrid table" EditMode="InPlace">
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="Type" HeaderText="Allocation Type"
                                                    ItemStyle-Width="100px" HeaderStyle-Width="100px" />
                                                <telerik:GridTemplateColumn DataField="Status" HeaderText="Status" ItemStyle-Width="300px"
                                                    HeaderStyle-Width="300px">
                                                    <ItemTemplate>
                                                        <%# GetStatus((String)Eval("Stats"))%>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn DataField="Link" HeaderText="View">
                                                    <ItemTemplate>
                                                        <%# GetTheoreticalAllocationsLink() %>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>
                            </NodeTemplate>
                        </telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeNode>
            </Nodes>
        </telerik:RadTreeView>

I am trying to set the data source in the code as below
((Telerik.Web.UI.RadGrid) RadTreeView1.Nodes[0].Nodes[0].NodeTemplate).DataSource = dataSource;

Seems it is invalid. and i get the following error. Unable to cast object of type 'System.Web.UI.CompiledTemplateBuilder' to type 'Telerik.Web.UI.RadGrid'.

I am not sure what am i doing wrong and also pretty new to asp.net with rad controls
Bozhidar
Telerik team
 answered on 12 Dec 2011
11 answers
2.0K+ views
Hi All,
Can I change RadGrid Headertext at runtime??
if yes how can I do that????


thanks
ghadeer
christian
Top achievements
Rank 1
 answered on 12 Dec 2011
1 answer
411 views
The bottom border of the last row in radgrid control is not showing whenever the grid is not fully filled.
Galin
Telerik team
 answered on 12 Dec 2011
1 answer
195 views
I am having a problem with a custom filter editor when DataKeyValue and DataTextValue differe.

Most of the code I am using was taken from the custom field editors demo.
Filtering the related grid works fine but the text field is showing the wrong text after a click on the "Apply" button.
If I click on "Add Expression" I get a filled combo box where I can select the order type by name.
Clicking on "Apply" filters the grids contents as expected. But the reacently added expression shows the integer value in it's text field.
I would like to show the localized text out of the combo box.

This is the filter extracted from the page.
   <telerik:RadFilter ID="Filter" runat="server" FilterContainerID="OrderListGrid"
        OnFieldEditorCreating="Filter_FieldEditorCreating"
       CssClass="RadFilter RadFilter_Default " >
      <FieldEditors>
      <csc:RadFilterDropDownEditor FieldName="Type" DataValueField="Type" DataTextField="Name" DataType="System.Int32" />
      <telerik:RadFilterTextFieldEditor FieldName="Order" DataType="System.String" />
      <telerik:RadFilterDateFieldEditor FieldName="Start" DataType="System.DateTime" />
      <telerik:RadFilterDateFieldEditor FieldName="End" DataType="System.DateTime" />
       </FieldEditors>
      </telerik:RadFilter>
OrderListGrid is a RadGrid using a sql data source to a simple table.
This table has a column "Type" which stores the order types as an integer value.
This integer value should not be shown to the customer, but replaced by a localized text within the filter combo box.
Therefore I've created a DataTable and assigned it to the custom filter editor as in the demo.
 
private void InitializeFilterCtrl()
{
     RadFilterDropDownEditor dropTypFilter = Filter.FieldEditors[0] as RadFilterDropDownEditor;
  if (OrderTypesTable == null)
  {
    OrderTypesTable = GetOrderTypeTable();
  }
  dropTypFilter.DataSource = OrderTypesTable;
}

private DataTable GetOrderTypeTable()
{
  DataTable tab = new DataTable();
  tab.Columns.Add("Type");
  tab.Columns.Add("Name");
  tab.Rows.Add( new object [] { (int)OrderType.Final, LocalizationUtils.GetOrderName(OrderType.Final) });
  tab.Rows.Add(new object[] { (int)OrderType.Intermediate, LocalizationUtils.GetOrderName(OrderType.Intermediate) });
  tab.Rows.Add(new object[] { (int)OrderType.Piece, LocalizationUtils.GetOrderName(OrderType.Piece) });<br>  tab.Rows.Add(new object[] { (int)OrderType.Batch, LocalizationUtils.GetOrderName(OrderType.Batch) });
  return tab;
}
 LocalizationUtils.GetOrderName(..) just returns the localized text out of the resources.

public class RadFilterDropDownEditor : RadFilterDataFieldEditor
{
    protected override void CopySettings(RadFilterDataFieldEditor baseEditor)
    {
        base.CopySettings(baseEditor);
        var editor = baseEditor as RadFilterDropDownEditor;
        if (editor != null)
        {
            DataSource = editor.DataSource;
            DataTextField = editor.DataTextField;
            DataValueField = editor.DataValueField;
        }
    }
 
    public override System.Collections.ArrayList ExtractValues()
    {
        ArrayList list = new ArrayList();
        list.Add(_combo.SelectedValue);
        return list;
    }
 
    public override void InitializeEditor(System.Web.UI.Control container)
    {
        _combo = new RadComboBox();
        _combo.ID = "MyCombo";
        _combo.DataTextField = DataTextField;
        _combo.DataValueField = DataValueField;
        _combo.DataSource = DataSource;          
        _combo.DataBind();
        container.Controls.Add(_combo);            
    }
 
    public override void SetEditorValues(System.Collections.ArrayList values)
    {
      if (values != null && values.Count > 0)
      {
        if (values[0] == null)
          return;
        var item = _combo.FindItemByValue(values[0].ToString());
        if (item != null)
          item.Selected = true;
      }
    }
 
    public string DataTextField
    {
        get
        {
            return (string)ViewState["DataTextField"] ?? string.Empty;
        }
        set
        {
            ViewState["DataTextField"] = value;
        }
    }
    public string DataValueField
    {
        get
        {
            return (string)ViewState["DataValueField"] ?? string.Empty;
        }
        set
        {
            ViewState["DataValueField"] = value;
        }
    }
    public DataTable DataSource
    {
        get
        {
            return (DataTable)ViewState["DataSource"] ?? new DataTable();
        }
        set
        {
            ViewState["DataSource"] = value;
        }
    }
 
    private RadComboBox _combo;
}

Any suggestions?

Antonio Stoilkov
Telerik team
 answered on 12 Dec 2011
5 answers
149 views
Please refer to the demo link below and do the following.

http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceheadertemplates/defaultcs.aspx

Set Grouping direction: Vertical
Select the Timeline View

As you can see, the formatting of the table cells and rows get all screwed up after just 2 resources. I am in currently in firefox. Is there a way to fix this. This has been an issue for a long time with the RadScheduler and I was wondering if it is ever going to be addressed. It is the only thing holding me back from using this control in my application. It seems to be a pretty standard piece of functionality since you can accomplish this horizontally.
Plamen
Telerik team
 answered on 12 Dec 2011
1 answer
172 views
Hello,

I have a radgrid on my form and several text and combo boxes.
My intent is to update related boxes as soon as radgrid selection changes.
For that I use RadAjaxManager and set relations like
<telerik:AjaxSetting AjaxControlID="rgMain">
           <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="rtbEmployeeName" />
               <telerik:AjaxUpdatedControl ControlID="cbEmployeeActive" />
               <telerik:AjaxUpdatedControl ControlID="rtbHomePhone" />
               <telerik:AjaxUpdatedControl ControlID="rtbMobilePhone" />
               <telerik:AjaxUpdatedControl ControlID="rcbPosition" />
           </UpdatedControls>
       </telerik:AjaxSetting>

After that I process SelectedIndexChanged event in code-behind and get updated controls on client side - everything is OK.

However, when I use paging or sorting built-in into Radgrid it again triggers the update of the controls. I only would like them to update on selection change, not on page change or sort.
Is there a way to filter which events of a master control should trigger ajax updates of related controls ?

Thanks for your attention.
Maria Ilieva
Telerik team
 answered on 12 Dec 2011
0 answers
67 views
Hi all,
 I have a requirement, where when there are multiple rows of tabs the default layout is like this.

Row1
Row2
Row3

But the for the layout should be

Row3
Row2
Row1

is this possible. Just reversing the datasource doesn't work as the row1 should be filled first then the row2 and then the row3.

Is this possible.

Thanks
thomos
Top achievements
Rank 1
 asked on 12 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?