Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views
Hi All,

I would like to ask if it is possible for me to upload the file itself, not just the name, i want to do is save the actual uploaded file into the database via: Binary file..is this possible and if it is how can i do it?

thanks in advance 
Princy
Top achievements
Rank 2
 answered on 12 Jan 2009
13 answers
761 views
Hi,
in the previous edition of RadEditor, i had a Save button in the toolbar as the first icon. I added this in the toolsfile. Is there any "tidier" way of implementing a Save function in the new RadEditor. Ideally, i just want a button which will do a postback and maybe raise the RadEditor1.TextChanged event?
In short, what is the reccommended method in prometheus to implement a Save button on the toolbar.
thanks
rob
Rumen
Telerik team
 answered on 12 Jan 2009
6 answers
160 views
How do I change the color of the RadGrid background and mouse hover color.
Anders
Top achievements
Rank 1
 answered on 12 Jan 2009
1 answer
80 views
Hi,

Please see the pie chart in this demo for an example http://demos.telerik.com/aspnet-ajax/Chart/Examples/DataBinding/Database/DefaultCS.aspx

In the code they are using the ItemDataBound event to set the legend to the description of the pie section while retaining the numerical value on the actual 'pie piece'.

Can this be done declaratively in code (without using itemdatabound event) before the databind() method is called?

Ves
Telerik team
 answered on 12 Jan 2009
1 answer
208 views
I am using the RadDateTime control in a Dynamic Data website as a field template.

The database field has a default binding of CURRENT_TIMESTAMP, but when I bring up a new entry, the RadDateTime control is empty. I would like to have the control set up so that it displays as follows:

- If there is no value returned from the DB, display current timestamp
- If there is a value returned from the DB, display that value

aspx: 
<%@ Control Language="C#" CodeFile="RichDateTime_Edit.ascx.cs" Inherits="Text_EditField" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<telerik:RadDateTimePicker SelectedDate='<%# FieldValue %>'  
    ID="RadDateTimePicker1" runat="server" AutoPostBack="True"  
    AutoPostBackControl="Both" Culture="English (United States)" Skin="Telerik"
<TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton> 
 
<TimeView CellSpacing="-1"></TimeView> 
 
    <DateInput AutoPostBack="True"
    </DateInput> 
 
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"  
        ViewSelectorText="x" Skin="Telerik"></Calendar> 
 
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
</telerik:RadDateTimePicker> 
 
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" CssClass="droplist" ControlToValidate="RadDateTimePicker1" Display="Dynamic" Enabled="false" /> 
<asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" CssClass="droplist" ControlToValidate="RadDateTimePicker1" Display="Dynamic" Enabled="false" /> 
<asp:DynamicValidator runat="server" ID="DynamicValidator1" CssClass="droplist" ControlToValidate="RadDateTimePicker1" Display="Dynamic" /> 

code-behind:
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Collections.Specialized; 
using System.Linq; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using System.Xml.Linq; 
using System.Web.DynamicData; 
 
public partial class Text_EditField : System.Web.DynamicData.FieldTemplateUserControl { 
    protected void Page_Load(object sender, EventArgs e) { 
 
        RadDateTimePicker1.ToolTip = Column.Description; 
 
        SetUpValidator(RequiredFieldValidator1); 
        SetUpValidator(RegularExpressionValidator1); 
        SetUpValidator(DynamicValidator1); 
    } 
 
    protected override void ExtractValues(IOrderedDictionary dictionary) 
    { 
        dictionary[Column.Name] = ConvertEditedValue(RadDateTimePicker1.SelectedDate.ToString()); 
    } 
 
    public override Control DataControl { 
        get { 
            return RadDateTimePicker1; 
        } 
    } 
 
 

Rosen
Telerik team
 answered on 12 Jan 2009
4 answers
149 views
Hi,
I have two panels in a page. While one panel contains master grid, the other grid has the child grid and a label. The two grids are Ajax Enabled. Based on the paging or sorting or filtering the master grid should refresh the child grid based on the first record. If there are no records the label saying "No records are found." should be displayed. I managed to refresh the child grid based on master grid but not able to show the label. PFB the code sample which I use:

                if (rgChild.Visible == true)
                {
                    rgMaster.ResponseScripts.Add(String.Format("window['{0}'].AjaxRequest('{1}', '');", rgChild.ClientID, rgChild.UniqueID));
                }
                else
                {
                        //I want the code to display the label here. Should I use some response script. If yes how?
                 }

Any suggestions are highly appreciated.
Das
Top achievements
Rank 1
 answered on 12 Jan 2009
9 answers
248 views
I am having a problem with the format stripper in the latest Prometheus editor. If I enter:

    <span>asdasd</span>

into the html view, then switch to design view and click the strip span tags button, the editor then contains:

    <span><span style="FONT-SIZE: 14pt"></span>asdasd</span>

Subsequent clicks on the strip span tags button adds even more stuff.

This also happens in the editor on your demo site


Lini
Telerik team
 answered on 12 Jan 2009
4 answers
268 views
I have an app that uses a combobox on a page where I want to set the focus to the combobox on the page load.  I have used this technique with previous versions of the radCombobox.

I am using the ChangeInputColor() function documented in ms-help://telerik.radcontrols.prometheus.2007.Q3/telerik.radcontrols.prometheus.2007.Q3/combo_ClientSideRadComboBox.html as my prototype for trying this with the Prometheus controls.

My radCombobox definition looks like:

<

telerik:radcombobox id="cmboUsers" runat="server" radcomboboximageposition="Right">
  <Items>
    <telerik:RadComboBoxItem runat="server" Text="Select a user..."></telerik:RadComboBoxItem>
  </Items>
  <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
  <ExpandAnimation Type="OutQuart"></ExpandAnimation>
</telerik:radcombobox>

My body tag looks like:

<

body onload="fnMaxWindow();fnSetFocus();">

My JavaScript code looks like:

<
script language="javascript" type="text/javascript">
function fnSetFocus()
{
  var combo = $find("<%= cmboUsers.ClientID %>");
  alert(
"combo = " + combo);
  var inputArea = combo.get_inputDomElement();
  alert(
"inputArea = " + inputArea);
  inputArea.focus();
}

function
fnMaxWindow() {
  window.moveTo(0,0);
  window.resizeTo(screen.width, screen.height);
}
</script>

When this runs, I get "combo = null" on the first alert, indicating that the $find code doesn't work.

Thanks in advance for the help.

Yana
Telerik team
 answered on 12 Jan 2009
0 answers
104 views
Hi,
when I use treeview in LoadOnDemand with a Webservice mode,I want to add new node from client side.
1.I use the content menu control to show user a menu,when user clicked the "NewNode" item,it will go to step 2.
2.I use the window control to show a prompt,with it user can input the new node name.
3.After user finish the input and click ok button in the prompt,I want to add node in the treeview selected node.
So I wirte the javascript code below:

 function promptCallBackFn(arg) {
                 if (arg != null) {
                    var tree = $find("<%= RadTreeView1.ClientID %>");
                    if (tree.get_selectedNode() != null) {
                        var node = tree.get_selectedNode();

                        AddNode(tree.get_selectedNode(), arg);
                    }
                }               
            }
              function AddNode(node, foldername) {

                var treeView = $find("<%= RadTreeView1.ClientID %>");
                treeView.trackChanges();
                var childNode = new Telerik.Web.UI.RadTreeNode();
                childNode.set_text(foldername);
                childNode.set_imageUrl("Img/mailfolder.gif");
                childNode.set_expandMode("Telerik.Web.UI.TreeNodeExpandMode.WebService");
                node.get_nodes().add(childNode);
                treeView.commitChanges();
               }
But When I test this,Error Occured.after I expand the Selected node first, this run well.
So I think mayby I should expanded the selected node first in my code,but it still couse error.
My questions is how to add node when we use LoadOnDemand - Webservice mode in client side.
I need a callback function to make sure that the select Node is Expanded successful and how to do this.

stone
Top achievements
Rank 1
 asked on 12 Jan 2009
1 answer
141 views
Hello,

Telerik RadGrid is working very nicely in our project, but we have one problem. 

We set the grid height to a fixed value, but when the grid loads it is first shown with much smaller height and after about one second the grid gets it's full height. This also happens sometimes when we use AJAX to go to another grid-page.

Especially in IE it often takes about 1 to 2 seonds which is quite annoying.

A dirty fix is this CSS:
.GridDataDiv_Office2007 {
height:{xx}px !important;
}

But this is too hackish of course. If i set the grid to a fixed height it should set GridDataDiv_Office2007 to a fixed height as well, not?
Any suggestions?

Thanks in advance.
Dimo
Telerik team
 answered on 12 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?