Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
342 views
Hi,

I have a situation where I have 4 buttons and a RadGrid.  Each of the 4 buttons will set different column orders, visibility and widths.  Current I have theses enabled

<

 

Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" />

 


What is happening is say I click on button 1 which sets each of the 4 columns headerstyle.width to 50px.  Then I hit button 2 which sets each of the 4 columns headerstyle.width to 100px.  I then drag column 1's width to like 200px.  Now I hit button 1 again.  My columns do not go back to 50px each.  However the second i start to drag any 1 of the columns for resizing after i hit the button 1 again the other columns immediatly shoot back to the 50px.

Why would setting the headers width not work, but as soon as i engage the dragging for resize mechanism again they all seem like they flip back to the width that was set?  Is there any way i can ensure that after i have programatically changed all of the columns header widths that they will actually be displayed as such?
Pavel
Telerik team
 answered on 16 Sep 2009
2 answers
186 views
This is my radwindow. When i click button its not popup. where is the problem

 <script type="text/javascript">
        //<![CDATA[
        function openWin()
        {
            var oWnd = radopen("http://www.telerik.com", "RadWindow1");
        }
        
        
        //]]>
    </script>


<telerik:RadWindowManager OnClientClose="OnClientClose" OnClientPageLoad="OnClientPageLoad"
            OnClientResize="SetWindowBehavior" OnClientShow="SetWindowBehavior" Behaviors="Resize, Close, Maximize, Move"
            ID="RadWindowManager" DestroyOnClose="True" RestrictionZoneID="RestrictionZone"
            runat="server" Behavior="Resize, Close, Maximize, Move"
        InitialBehavior="None" Left="" style="display: none;" Top="">
            <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Close" OnClientClose="OnClientClose"
                NavigateUrl="http://www.telerik.com">
            </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow2" runat="server" Width="650" Height="445" Modal="true" NavigateUrl="Dialog2.aspx">
            </telerik:RadWindow>
        </Windows>
        
        </telerik:RadWindowManager>
        
                <button runat="server" id="sad" onclick="openWin(); return false;">
            Choose Destination and date</button>           







Svetlina Anati
Telerik team
 answered on 16 Sep 2009
1 answer
123 views

hi,

I've a user control and the page that holds it has a Radscriptmgr.

I've the foll js fn:
 <script type="text/javascript">

    //js function which calls the makeUnselectable().
    function OnClientLoad(combobox, args)
    {
       makeUnselectable(combobox.get_element());
    }

    //Make all combobox items unselectable to prevent selection in editor being lost
    function makeUnselectable(element)
     {
       var nodes = element.getElementsByTagName('*');
       for (var index = 0; index < nodes.length; index++) {
          var elem = nodes[index];
          elem.setAttribute('unselectable', 'on');
       }
    }

    //js function which isused to get refernce of the client object
    function getSelected()
     {
       //get a reference to Radcombobox client object
       var obTagCombo = $find('<%=m_radTagCombo.ClientID %>');

       //get_value() returns the value of the control
       var value = obTagCombo.get_value();

       //get_text()returns the text of the control.
       var text = obTagCombo.get_text();

       //get a reference to RadEditor client object
       var editor = $find("<%=m_radEmailEditor.ClientID%>");

       //pasteHtml method is used to paste the contents passed to the editor control.
       editor.pasteHtml(text);
    }  
</script>

and i call it 

<input type="button" value="Insert Tag" onclick="getSelected();" />

and in radcombobox:   <telerik:RadComboBox ID="m_radTagCombo" OnClientLoad="OnClientLoad" runat="server">
                        </telerik:RadComboBox>

I need to select text from radcombo and click the insert btn and the selected text from radcombo gets pasted on to the radeditor.

Now, I get a "Microsoft JScript runtime error: 'OnClientLoad' is undefined"

Pls help me with code:

Svetlina Anati
Telerik team
 answered on 16 Sep 2009
8 answers
813 views
Hi,

I have a simple grid with an editable column of type string as follows:
<form id="form1" runat="server"> 
<div> 
    <telerik:RadScriptManager ID="radScriptManager1" runat="server" /> 
    <telerik:RadGrid ID="radGrid1" AutoGenerateColumns="false" GridLines="Vertical" OnItemCreated="radGrid_ItemCreated" OnNeedDataSource="radGrid_NeedDataSource" OnUpdateCommand="radGrid_UpdateCommand" runat="server"> 
        <ClientSettings> 
            <Scrolling UseStaticHeaders="true" /> 
        </ClientSettings> 
        <MasterTableView EditMode="InPlace" TableLayout="Fixed"> 
            <Columns> 
                <telerik:GridBoundColumn DataField="Description" DataType="System.String" HeaderText="Description" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" UniqueName="Description" /> 
                <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="Edit" /> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
</div> 
</form> 

I would like to prevent the following characters to be entered by the user into the editable column:
<
>
&
"
'

The code behind for the code is as follows:
public partial class Grid : System.Web.UI.Page 
{ 
    private ArrayList _data; 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!IsPostBack) 
        { 
            this._data = Data.Load(); 
            Session["DATA"] = this._data; 
        } 
        else 
        { 
            this._data = (ArrayList)Session["DATA"]; 
        } 
    } 
 
    protected void radGrid_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = (GridEditableItem)e.Item; 
            TextBox textbox = (TextBox)item["Description"].Controls[0]; 
            textbox.Width = Unit.Percentage(99);
        } 
    } 
 
    protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        this.radGrid.DataSource = this._data; 
    } 
 
    protected void radGrid_UpdateCommand(object sender, GridCommandEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = (GridEditableItem)e.Item; 
            ((Data)(this._data[item.ItemIndex])).Description = ((TextBox)item["Description"].Controls[0]).Text; 
            Session["DATA"] = this._data; 
        } 
    } 
} 
 
public class Data 
{ 
    public string Description { get; set; } 
 
    public Data(string description) 
    { 
        Description = description; 
    } 
 
    public static ArrayList Load() 
    { 
        ArrayList arrayList = new ArrayList(); 
        arrayList.Add(new Data("Cheeses")); 
        arrayList.Add(new Data("Prepared meats")); 
        arrayList.Add(new Data("Seaweed and fish")); 
        return arrayList; 
    } 
} 


Can you please help me how to do this? Do I need to write an event handler for the textbox in radGrid_ItemCreated?
Please show me the code to be inserted above to do this job.

Thanks & regards,
Herman Gouw
Skype: hermangouw
Kara Eser
Top achievements
Rank 1
 answered on 16 Sep 2009
1 answer
109 views
Hi,

I am trying to add data from a database to the context menu of a RadTree.
The data also needs to be updated when the database is updated.

Currently my RadTree looks like the following;

...item1
...item2                                     
...item3 ------> (upon right click) A-C > apple, banana, carrot
                                                  D-F > dog, fish .....etc
                                                  G-I
                                                  J-L
                                                  M-O
                                                  P-S
                                                  T-V
                                                  W-Z

The bold text indicates the information in the database, which i want to display.

I would like to be able to put everything in my database in a subcategory depending on the name in each of these sections.
Any help would be greatly appreciated.

Thanks
Phil
Mouse
Top achievements
Rank 1
 answered on 16 Sep 2009
5 answers
163 views
Here is how our project is designed:

We got a Splitter containing 2 Panes separated by a SplitBar .
The first pane on the left contains a sliding zone with sliding panes.
On the right the second pane contains a TabStrip with 2 (or more) Tabs.
These tabs display basic aspx pages (form with div ...)

Here is my problem:
If I dock a sliding pane, the page displayed in the selected tab is well resized. But If I select another tab, the page displayed in this tab is not resized : it keeps the initial size the page has before the sliding pane was docked.
Moreover, if I undocked the sliding pane, the page does not retrieve it initial size.

How can I force the page to resize when I select the tab ?
Svetlina Anati
Telerik team
 answered on 16 Sep 2009
3 answers
132 views
Hi

I now have a tooltip working with grid items per your demo in the docs, bu there is just one
thing bugging me.   I want the tooltip to remain open until the visitor moves their mouse away, then to close,
preferably after a delay. Right now, the tooltip close after about half a second even if the mouse is still
over the targetcontrol.
Here are the settings
<telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="LeaveTargetAndToolTip" 
            Width="410" Height="150" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" 
            Position="TopCenter">  
        </telerik:RadToolTipManager> 

What am I doing wrong?
Thanks

Clive
Svetlina Anati
Telerik team
 answered on 16 Sep 2009
6 answers
103 views

Hi.

 

Is there any updates on the problem described in thread “TabStrip with ScrollChildren too wide in Firefox 3”: my TabStrip is 10,000 px wide in IE 8. My Telerik DLL version is 2009.2.701.35.

 

The JavaScript workaround you provided in the mentioned thread does not work for me since I am generating multiple tabstrips dynamically from code behind with dynamic names and also I have tabstrips inside other tabstrips.

Thank you for any suggestions.

Roy Halvorsen
Top achievements
Rank 1
 answered on 16 Sep 2009
3 answers
105 views
I added a custom dialog to the editor's toolbar and managed to get it working as per your sample at: http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx.

However, the editor's default toolbar has disappeared! Is there a way to append my custom button to the original toolbar rather than replacing it?

Regards

Dana
Rumen
Telerik team
 answered on 16 Sep 2009
3 answers
290 views
I am tring to hide a tooltip on the server side but i am lost... Can someone help me. here is the Javascript i have and the tooltip.

 

function HideTooltip() {

var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();

if (tooltip) tooltip.hide();

}

 

<telerik:RadToolTip runat="server" ID="rttLnameCk" ShowCallout="false" Position="MiddleRight"

RelativeTo="Element">

<asp:CheckBoxList ID="cblLastName" runat="server" CellSpacing="0" CellPadding="0">

</asp:CheckBoxList>

<asp:Button ID="btSelect" runat="server" Text="Select" OnClientClick="InsertName(); return false;" />

</telerik:RadToolTip>

 

 thank you for all your help

 

Svetlina Anati
Telerik team
 answered on 16 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?