Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
258 views
I have a RadGrid that has a date column in it. I am trying to display the date in UK format, i.e. dd/MM/yyyy.  I have tried using DataFormatString="{0:dd/MM/yyyy}" in the data bound column, with no joy. If anyone could please point me in the right direction. I would much appreciate it. 



   <telerik:RadGrid ID="rgPhoneMessages" Width="100%" runat="server" GridLines="None" AllowPaging="false"
     PagerStyle-AlwaysVisible="false"  PagerStyle-Visible="false"   OnItemCommand="rgPhoneMessages_ItemCommand" 
       AllowSorting="True"    >
            <ClientSettings EnablePostBackOnRowClick="true"  Selecting-AllowRowSelect="true"  >
                <Scrolling AllowScroll="false" EnableVirtualScrollPaging="false" UseStaticHeaders="true"  SaveScrollPosition="true"></Scrolling>
            </ClientSettings>
 <MasterTableView AutoGenerateColumns="false"  DataKeyNames="ID">
    <Columns>
    <telerik:GridBoundColumn HeaderText="ID"  Visible="false"
      ItemStyle-Height="45px"  DataField="ID"  
      UniqueName= "ID" Display="True"></telerik:GridBoundColumn>
      <telerik:GridBoundColumn  DataField="Date" meta:ResourceKey="hdrDate" ItemStyle-Height="45px"
      UniqueName= "Date" Display="True" SortExpression="Date"  DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="false" ></telerik:GridBoundColumn>
      <telerik:GridBoundColumn  DataField="Caller" meta:ResourceKey="hdrCaller" ItemStyle-Height="45px"
      UniqueName= "Caller" Display="True"></telerik:GridBoundColumn>
      <telerik:GridBoundColumn  DataField="Phone" meta:ResourceKey="hdrPhone" ItemStyle-Height="45px"
      UniqueName= "Phone" Display="False"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Mode" meta:ResourceKey="hdrMode" ItemStyle-Height="45px"
      UniqueName= "Mode" Display="True"></telerik:GridBoundColumn>
    </Columns>
   </MasterTableView>    
   </telerik:RadGrid>
Marin
Telerik team
 answered on 28 Jun 2011
12 answers
371 views
Hi All,

I am using Telerik Rad Editor and facing an issue in bulleted number list font size. The bulleted numbers font size is not changing while change the font of size of text.

For example see the bulleted number font size is not matched with the text.
  1. line 1
  2. line 2
  3. line 3

Suggest me to solve this issue. Thanks in advance.

- BABU
Dobromir
Telerik team
 answered on 28 Jun 2011
1 answer
147 views
Hi

I have taken a RadMenu  and binded to web.sitemap. But In design we are getting a little extra design .

Here I am presenting the code:

<telerik:RadMenu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
         Font-Bold="True" Font-Size="X-Small" width="100%"
    enableroundedcorners="true" enableshadows="true" skin="Black" Flow="Horizontal" >
        <DataBindings>
            <telerik:RadMenuItemBinding DataMember="SiteMapNode" NavigateUrlField="Url" ToolTipField="description"  />
        </DataBindings>
    </telerik:RadMenu>
How can remove the improper design at the bottom. Please help in achieving this.

Thanking You
Kate
Telerik team
 answered on 28 Jun 2011
3 answers
85 views
I need some explanation beyond the two examples in the documentation. I am just not understanding filtering. Not true I understand the concept of filtering I am having problems with implementation.

I have a basic grid which I am filling with data from persistent storage (i.e. in the Current Session). On Page_Load I simply assign the storage for a particular table to the grid data source and bind. Simple. When sorting and paging happen I basically do the same thing. But filtering. That is a whole other ball game! I do not see an Event that I can use to rebind the data. I am assuming that the Grid or TableView handles the actual filtering and I do not need to provide any sort of filtering function.

The filtering that is offered is more than adequate for my needs I just need to know what I have to do to get an implementation going.

Thanks,
Doug
Tsvetoslav
Telerik team
 answered on 28 Jun 2011
4 answers
73 views
We're trying to get our grid to be fully functional inside a colorbox (http://colorpowered.com/colorbox/). The grid works fine on the page itself, but when inside a colorbox the grid loses all interactive elements (no selecting rows, changing pages, etc.).

For example:
<div>
    <div id="grid_container">
        <form id="form0" runat="server">
            <telerik:RadScriptManager id="RadScriptManager0" runat="server" />
            <telerik:RadAjaxManager id="RadAjaxManager0" EnablePageHeadUpdate="false" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid0">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid0" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadGrid ID="RadGrid0" runat="server" AllowPaging="True" AllowSorting="True" AllowAutomaticUpdates="True" DataSourceID="ObjectDataSource0" GridLines="Vertical" PageSize="10" Skin="Telerik">
                ...
            </telerik:RadGrid>
        </form>
    </div>
</div>
The above works just fine.

However, when colorbox is added:
<div style="display:none;">
    <div id="grid_container">
        <form id="form0" runat="server">
            <telerik:RadScriptManager id="RadScriptManager0" runat="server" />
            <telerik:RadAjaxManager id="RadAjaxManager0" EnablePageHeadUpdate="false" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid0">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid0" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadGrid ID="RadGrid0" runat="server" AllowPaging="True" AllowSorting="True" AllowAutomaticUpdates="True" DataSourceID="ObjectDataSource0" GridLines="Vertical" PageSize="10" Skin="Telerik">
                ...
            </telerik:RadGrid>
        </form>
    </div>
</div>
<script type="text/javascript">
    function openGrid() {
        jQuery.colorbox({ innerWidth: "800", innerHeight: "350", opacity: 0.5, inline: true, scrolling: false, href: "#grid_container" });
    }
</script>
This does not work correctly; the colorbox opens but the grid has the issues described above.

I'm not sure how to go about fixing this, so I'd appreciate some help if possible. Thanks.
Mike
Top achievements
Rank 1
 answered on 28 Jun 2011
5 answers
180 views
I have a RadGrid with template columns which are generated at runtime and added to a placeholder control on Page_Init.

Export to Excel and Word work fine using the built-in export features. Export to Pdf doesn't work properly in the sense that the template columns are not exported in the final pdf file. Only the GridBoundColumns are exported.

I have also set ExportOnlyData = false but didn't fix that issue.

Any clues?

Thanks,
Daniel
Telerik team
 answered on 28 Jun 2011
2 answers
72 views
i have problem with uncheckAllNodes (client side). if i call this function i got js error "uncheckAllNodes is not function"

$find("<%= radCmbBranch.Items[0].FindControl("RadTreeViewBranch").ClientID %>").uncheckAllNodes();
Kate
Telerik team
 answered on 28 Jun 2011
1 answer
100 views
I'm attempting to create a custom field editor, and using the RadDropDownFilter example as a guide.  My custom editor however has multiple fields - two text boxes, and two combo boxes.

When using the example code, on a postback the ArrayList in the SetEditorValues method only contains a single value - not the values entered for all four controls.  The ExtractValues method does seem to be outputting an ArrayList with four elements.

Any thoughts?  I'm guessing the issue might be that the inherited class - RadFilterDataFieldEditor - doesn't support multiple values?  Should I be deriving from some other class?  Code for the custom editor:

public class RadFilterRangeValueTypeStrategy : RadFilterDataFieldEditor
        {
            private RadComboBox _combo_ValueType;
            private RadComboBox _combo_Strategy;
 
            private RadTextBox _textMin;
            private RadTextBox _textMax;
 
 
            protected override void CopySettings(RadFilterDataFieldEditor baseEditor)
            {
                base.CopySettings(baseEditor);
 
                var editor = baseEditor as RadFilterRangeValueTypeStrategy;
                if (editor != null)
                {
                    DataSource_ValueType = editor.DataSource_ValueType;
                    DataTextField_ValueType = editor.DataTextField_ValueType;
                    DataValueField_ValueType = editor.DataValueField_ValueType;
 
                    DataSource_Strategy = editor.DataSource_Strategy;
                    DataTextField_Strategy = editor.DataTextField_Strategy;
                    DataValueField_Strategy = editor.DataValueField_Strategy;
 
                    MinValue = editor.MinValue;
                    MaxValue = editor.MaxValue;
                }
            }
 
 
            public override System.Collections.ArrayList ExtractValues()
            {
                ArrayList list = new ArrayList();
 
                list.Add(_combo_ValueType.SelectedValue);
 
                list.Add(_combo_Strategy.SelectedValue);
 
                list.Add(_textMin.Text);
 
                list.Add(_textMax.Text);
 
                return list;
 
            }
 
            public override void InitializeEditor(System.Web.UI.Control container)
            {
 
                Label minLabel = new Label();
                minLabel.Text = "Min: ";
 
                container.Controls.Add(minLabel);
 
                _textMin = new RadTextBox();
                _textMin.ID = "MinValue";
                _textMin.Text = MinValue;
                _textMin.Width = Unit.Pixel(30);
                container.Controls.Add(_textMin);
 
 
                Label maxLabel = new Label();
                maxLabel.Text = "  Max: ";
 
                container.Controls.Add(maxLabel);
 
                _textMax = new RadTextBox();
                _textMax.ID = "MaxValue";
                _textMax.Text = MaxValue;
                _textMax.Width = Unit.Pixel(30);
                container.Controls.Add(_textMax);
 
 
 
                Label valueTypeLabel = new Label();
                valueTypeLabel.Text = "  Value Type: ";
 
                container.Controls.Add(valueTypeLabel);
 
                _combo_ValueType = new RadComboBox();
                _combo_ValueType.ID = "ValueTypeCombo";
                _combo_ValueType.DataTextField = DataTextField_ValueType;
                _combo_ValueType.DataValueField = DataValueField_ValueType;
                _combo_ValueType.DataSource = DataSource_ValueType;
                _combo_ValueType.DataBind();
                _combo_ValueType.Width = Unit.Pixel(30);
                container.Controls.Add(_combo_ValueType);
 
 
 
                Label strategyLabel = new Label();
                strategyLabel.Text = "  Strategy: ";
 
                container.Controls.Add(strategyLabel);
 
                _combo_Strategy = new RadComboBox();
                _combo_Strategy.ID = "StrategyCombo";
                _combo_Strategy.DataTextField = DataTextField_Strategy;
                _combo_Strategy.DataValueField = DataValueField_Strategy;
                _combo_Strategy.DataSource = DataSource_Strategy;
                _combo_Strategy.DataBind();
                _combo_Strategy.Width = Unit.Pixel(40);
                container.Controls.Add(_combo_Strategy);
 
               
            }
 
            public override void SetEditorValues(System.Collections.ArrayList values)
            {
                if (values != null && values.Count > 0)
                {
                    if (values[0] == null)
                        return;
                    var item = _combo_ValueType.FindItemByValue(values[0].ToString());
                    if (item != null)
                        item.Selected = true;
                }
 
                if (values != null && values.Count > 1)
                {
                    if (values[1] == null)
                        return;
                    var item = _combo_Strategy.FindItemByValue(values[1].ToString());
                    if (item != null)
                        item.Selected = true;
                }
 
                if (values != null && values.Count > 2)
                {
                    if (values[2] == null)
                        return;
 
                    _textMin.Text = values[2].ToString();
                }
 
                if (values != null && values.Count > 3)
                {
                    if (values[3] == null)
                        return;
 
                    _textMax.Text = values[3].ToString();
                }
            }
 
            public string DataTextField_ValueType
            {
                get
                {
                    return (string)ViewState["DataTextField_ValueType"] ?? string.Empty;
                }
                set
                {
                    ViewState["DataTextField_ValueType"] = value;
                }
            }
 
            public string DataValueField_ValueType
            {
                get
                {
                    return (string)ViewState["DataValueField_ValueType"] ?? string.Empty;
                }
                set
                {
                    ViewState["DataValueField_ValueType"] = value;
                }
            }
 
            public RadFilterDropDownEditorDataSource DataSource_ValueType
            {
                get
                {
                    return (RadFilterDropDownEditorDataSource)ViewState["DataSource_ValueType"] ?? new RadFilterDropDownEditorDataSource();
                }
                set
                {
                    ViewState["DataSource_ValueType"] = value;
                }
            }
 
 
 
            public string DataTextField_Strategy
            {
                get
                {
                    return (string)ViewState["DataTextField_Strategy"] ?? string.Empty;
                }
                set
                {
                    ViewState["DataTextField_Strategy"] = value;
                }
            }
 
            public string DataValueField_Strategy
            {
                get
                {
                    return (string)ViewState["DataValueField_Strategy"] ?? string.Empty;
                }
                set
                {
                    ViewState["DataValueField_Strategy"] = value;
                }
            }
 
            public RadFilterDropDownEditorDataSource DataSource_Strategy
            {
                get
                {
                    return (RadFilterDropDownEditorDataSource)ViewState["DataSource_Strategy"] ?? new RadFilterDropDownEditorDataSource();
                }
                set
                {
                    ViewState["DataSource_Strategy"] = value;
                }
            }
 
 
            public string MinValue
            {
                get
                {
                    return (string)ViewState["MinValue"] ?? string.Empty;
                }
                set
                {
                    ViewState["MinValue"] = value;
                }
            }
 
            public string MaxValue
            {
                get
                {
                    return (string)ViewState["MaxValue"] ?? string.Empty;
                }
                set
                {
                    ViewState["MaxValue"] = value;
                }
            }
 
        }
 
 
 
    }
Mira
Telerik team
 answered on 28 Jun 2011
2 answers
87 views
Where do i find the documentation on this control?  I have looked and only can find the documentation for the SilverLight version which is different.

Thanks,
Doug
Prashant
Top achievements
Rank 1
 answered on 28 Jun 2011
1 answer
64 views
I have a RadBinaryImage in the RadRotator itemTemplate. Is there any way i can find the radBinaryimage in the radrotator ? so that i can control the imageurl.

i try :

Dim image as RadBinaryImage = RadRotator1.findControl("RadBinaryImage1")

but it doesnt work.


Regards,
KEA
Slav
Telerik team
 answered on 28 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?