Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
390 views
Quite simply, I can't get this to work.

I've had a search through the forum and it appears that this was a problem back in late '07 and was logged as something that needed fixing.

Has it been?

I'm currently just trying to get the automatic tooltip (the one declared for the RadDatePicker) on the page.

--
Stuart
hubert
Top achievements
Rank 1
 answered on 14 Jul 2009
3 answers
166 views
Hi there,

I see a lot of posts in this forum about the ReadOnlyFileInputs property set to true, but I'm actually looking for the opposite.

The problem is that the behavior seems to be inconsistent across browsers.

In FF3, the field is not editable at all, and even if the property is set to false, clicking inside the text box results in a file selection dialog.

In IE7, the field is editable, but if an invalid name is typed in manually, either a Javascript error occurs or the UploadedFiles property indicates that a 0 byte file with the invalid name was uploaded upon submission of the form.

Any way to get around the inconsistencies besides setting the ReadOnlyFileInputs property to false?

Thanks,
Mark
Genady Sergeev
Telerik team
 answered on 14 Jul 2009
1 answer
195 views
Hi Guys
 I'm having a bit of a problem getting my rad grid to update, Delete, and Insert new records, i'm usnig RadGrid1_NeedDataSource to bind a datasource to the grid, first i'm selecting different query strings from a dropdown list to populate the datasource, this works great..how do i get my grid to insert,update and delete, taking into consideration i'm usig 1 grid for different queries.
i'll paste my code below.

using System; 
using System.Configuration; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.HtmlControls; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Xml.Linq; 
using System.Data.SqlClient; 
using Telerik.Web.UI; 
using System.Collections.Generic; 
 
 
public partial class Grid : System.Web.UI.Page 
    string tbName; 
    protected void Page_Load(object sender, EventArgs e) 
    { 
         
        if (Session["ID"] != null
        { 
            tbName = Request["id"].ToString(); 
            if (!Page.IsPostBack) 
            { 
    
                ViewState["tbName"] = tbName; 
            } 
            else 
            { 
 
 
            }   
        } 
 
        else 
        { 
            Response.Redirect("login.aspx"); 
        } 
    } 
 
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
 
        string sql = @"Select * from " + ViewState["tbName"].ToString() ; 
        SqlConnection oCon = new SqlConnection(DatabaseConnection.ConnectionString); 
        SqlCommand cmd = new SqlCommand(sql, oCon); 
        cmd.CommandType = CommandType.Text; 
        DataTable tblData = new DataTable(); 
        new SqlDataAdapter(cmd).Fill(tblData); 
        RadGrid1.DataSource = tblData; 
    } 
 
    bool isGrouping = false
    protected void RadGrid1_GroupsChanging(object source, GridGroupsChangingEventArgs e) 
    { 
        isGrouping = true
        if (e.Action == GridGroupsChangingAction.Ungroup && RadGrid1.CurrentPageIndex > 0) 
        { 
            isGrouping = false
        } 
    } 
 
 

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Grid" Title="Untitled Page" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"
    <style type="text/css"
 
 
.RadGrid_Default 
    border:1px solid #232323; 
 
.RadGrid_Default 
    font:11px/1.4 arial,sans-serif; 
 
.RadGrid_Default 
    background:#d4d0c8; 
    color:#333; 
 
.GroupPanel_Default 
    border-top:1px solid #383838; 
    background:url('mvwres://Telerik.Web.UI, Version=2008.2.826.35, Culture=neutralPublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.sprite.gif') repeat-x 0 -400px #1f1f1f; 
    color:#8f8f8f; 
 
.MasterTable_Default 
    background:#fff; 
    border-collapse:separate !important; 
 
.MasterTable_Default 
    font:11px/1.4 arial,sans-serif; 
 
.GridHeader_Default 
    color:#fff; 
    text-decoration:none; 
 
.GridHeader_Default 
    border-bottom:1px solid #010101; 
    background:url('mvwres://Telerik.Web.UI, Version=2008.2.826.35, Culture=neutralPublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.headers.gif') repeat-x #434343; 
    padding:10px 6px 10px 11px; 
    text-align:left; 
    font-size:1.3em; 
    font-weight:normal; 
 
        #Table3 
        { 
            width: 681px; 
        } 
         
    .style2 
    { 
        height: 28px; 
    } 
         
    </style> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
 
    <table style="width: 100%;"
        <tr> 
            <td class="style2"
                </td> 
        </tr> 
        <tr> 
            <td> 
                &nbsp;</td> 
        </tr> 
        <tr> 
            <td> 
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"  
                    AllowPaging="True"  AutoGenerateDeleteColumn="True"  
                    AutoGenerateEditColumn="True" GridLines="None" Skin="Vista"  
                    OnNeedDataSource="RadGrid1_NeedDataSource"  
                    OnGroupsChanging="RadGrid1_GroupsChanging" AllowAutomaticDeletes="True"  
                    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" 
            OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted" > 
<HeaderContextMenu> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</HeaderContextMenu> 
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 
<MasterTableView CommandItemDisplay="Top" EditMode ="PopUp" AllowFilteringByColumn="True" > 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
 
                    <ClientSettings AllowKeyboardNavigation="True"
                        <Selecting AllowRowSelect="True" /> 
                    </ClientSettings> 
 
<FilterMenu> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
                </telerik:RadGrid> 
            </td> 
        </tr> 
    </table> 
 
    </asp:Content> 
Georgi Krustev
Telerik team
 answered on 14 Jul 2009
3 answers
111 views
My company does not want to have header text on a button column since each button is going to display "Edit" or "Remove". Is there a way to hide this text yet keep the column displayed?
Raventhorn
Top achievements
Rank 2
 answered on 14 Jul 2009
1 answer
67 views
We are working on a solution that allows the user to turn on the RadDocks and move content modules from zone to zone. When they move a Dock, I am saving it's position to the database on DockPositionChanged event. Everything works fine except that I cant move the same dock more than once without refreshing the page. If I move it once, it saves it's position and all the other dock's positions are updated as well. But if I move it a second time, every dock is updated but the one I moved. If I move Dock 1, then move Dock 2, then move Dock 1 again, it works fine. It does not work if I move Dock 1, then Move Dock 1 again. It acts as though Dock1 isn't contained in the collection.

UPDATE: After tracing the event in Sql Server Profiler, I see that the event for Dock1 is fired when it is moved the second time, but it is not using the correct DockZoneID. It is still using the DockZoneID of the DockZone that I moved it to the first time.
Pero
Telerik team
 answered on 14 Jul 2009
3 answers
90 views
Hi,


Is it possible to set a node's checked state to indeterminate at server side (OnNodeExpand event) even if it doesn't have child nodes?

Regards.
itsvtk
Ravi Sanker
Top achievements
Rank 1
 answered on 14 Jul 2009
2 answers
234 views
Greetings,

I am currently working on a grid that has a set of Radio Buttons within it, but I'm having issues trying to keep them from being selected one at a time.  Here is the grid code.

<telerik:RadGrid ID="rgdKnowledgeOwners" runat="server" AllowSorting="true" AutoGenerateColumns="false" 
                    AllowPaging="true" GridLines="None" AllowMultiRowSelection="true" PageSize="25" Width="500px" 
                    OnItemDataBound="rgdKnowledgeOwners_ItemDataBound">  
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" /> 
                    <HeaderContextMenu> 
                        <CollapseAnimation Type="OutQuint" Duration="200" /> 
                    </HeaderContextMenu> 
                    <MasterTableView DataKeyNames="POCID" AutoGenerateColumns="false">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px" /> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px" /> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn DataField="POCID" 
                                HeaderText="POCID" UniqueName="POCID" Visible="false">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn HeaderText="Primary Owner" SortExpression="PrimaryOwner">  
                                <ItemTemplate> 
                                    <asp:RadioButton id="rbPrimaryOwner" runat="server" GroupName="PrimaryOwner">  
                                    </asp:RadioButton> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridBoundColumn DataField="Name" 
                                HeaderText="Knowledge Owner Name" UniqueName="Name" SortExpression="Name">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn HeaderText="Receive Admin Emails" SortExpression="ReceiveEmail">  
                                <ItemTemplate> 
                                    <asp:CheckBox id="chkReceiveEmail" runat="server">  
                                    </asp:CheckBox> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn HeaderText="Disply on CoP" SortExpression="DisplayOnCoP">  
                                <ItemTemplate> 
                                    <asp:CheckBox id="chkDisplayOnCoP" runat="server">  
                                    </asp:CheckBox> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                        </Columns>                              
                    </MasterTableView> 
                    <ClientSettings AllowRowsDragDrop="true" AllowColumnsReorder="false" 
                        AllowDragToGroup="true" AllowRowHide="true" AllowColumnHide="true" 
                        ReorderColumnsOnClient="true">  
                        <Selecting AllowRowSelect="true" /> 
                    </ClientSettings> 
                    <FilterMenu> 
                        <CollapseAnimation Type="OutQuint" Duration="200" /> 
                    </FilterMenu> 
                </telerik:RadGrid> 

The column that uses the Radio Buttons is Primary Owner.  I've been trying to use Javascript to keep only one button at a time selected, but have been unsuccessful.  Here is the code for that.

protected void rgdKnowledgeOwners_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            GridItemType giType = e.Item.ItemType;  
            if (giType == GridItemType.AlternatingItem || giType == GridItemType.Item)  
            {  
                DTOOwner dr = (DTOOwner)e.Item.DataItem;  
                RadioButton rb = (RadioButton) e.Item.FindControl("rbPrimaryOwner");  
                CheckBox chk1 = (CheckBox)e.Item.FindControl("chkReceiveEmail");  
                CheckBox chk2 = (CheckBox)e.Item.FindControl("chkDisplayOnCoP");  
 
                //Set radio buttons to script so that if one is selected, others are turned false  
                string script = "SetUniqueRadioButton(" + rb.ClientID + ", " +  "'rgdKnowledgeOwners')";  
                rb.Attributes.Add("onclick", script);  
 
                rb.Checked = dr.PrimaryOwner;  
                chk1.Checked = dr.ReceiveEmail;  
                chk2.Checked = dr.DisplayOnCoP;  
            }  
        } 

And here is the javascript.

function SetUniqueRadioButton(objRadioButton, grdName) {  
            var i, obj;  
            for (i = 0; i < document.all.length; i++) {  
                obj = document.all(i);  
 
                if (obj.type == "radio") {  
                    if ((objRadioButton.id.substr(0, grdName.length) == grdName)) {  
                        if (objRadioButton.id == obj.id)  
                            obj.checked = true;  
                        else 
                            obj.checked = false;  
                    }  
                }  
            }  
        } 

If anyone has any ideas on how to correct this issue, I'd appreciate it.  Thanks.

~Chad Johnson
Chad Johnson
Top achievements
Rank 1
 answered on 14 Jul 2009
0 answers
157 views
Hello forum members, i'm getting this error on an aspx page.  I am using it elsewhere, with the same assembly directives:

<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Charting, Version=2.0.3.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763" %>
<%@ Register assembly="Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Charting" tagprefix="telerik" %>
<%@ Register TagPrefix="ajaxtoolkit" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=1.0.10920.32880, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>


any thoughts?

John
Top achievements
Rank 1
 asked on 14 Jul 2009
0 answers
82 views
Hello i have follow ASPX Code:

telerik:radtabstrip id="RadTabStrip1" runat="server" selectedindex="0" enableembeddedskins="False" 
        skin="FashionestaProductlist" multipageid="RadMultiPage1"
             <Tabs> 
               <telerik:RadTab runat="server" PageViewID="RadPageView1" Selected="True" /> 
               <telerik:RadTab runat="server" PageViewID="RadPageView2" /> 
               <telerik:RadTab runat="server" PageViewID="RadPageView3" />     
             </Tabs>      
            </telerik:radtabstrip> 
 
<telerik:radmultipage id="RadMultiPage1" runat="server" selectedindex="0"
                        <telerik:RadPageView ID="tabRecently" runat="server"
                            <div class="Content"
 
.... 
 
 

In each RadPageView i have a  RadRotator with dynamic data. Each PageView gets disabled when there is no data to bind:
tabRecently.Visible = false;

My problem is now when in RadPageView2 no data are binded, then i have RadPageView1 and  RadPageView3  .
 In RadPageView1 there is all fine, the data are rendered in <div class="Content"> but in the RadPageView3 there is no content, but the tab is available!     
Has someone a solution why there is no content in the tab ?? there is no div <div class="Content">
anonym
Top achievements
Rank 1
 asked on 14 Jul 2009
1 answer
139 views
I am take over an exiting project and working on an issue that has arrised on one of our pages that has the RadEditor 7.2 on it. The app runs inside sharepoint, and it appears that even with the height of the editor set in the code behind, as soon as you switch to HTML view, the editor height increases, switching back to design view causes it to increase again. It just keeps getting larger for each switch. This is causing the content below the editor to "disappear" in the frameset, the scroll bars in IE don't seem to recognize the new height. Any ideas?
Stanimir
Telerik team
 answered on 14 Jul 2009
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?