Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
241 views
I just updated to the new Q1 controls and since then, the rotator changes the font on one of the labels after the first rotation. The first set of data displays properly, then as soon as the second frame sets the message label defaults to Times or something. One thing I have checked is the web browser. I can not reproduce this in Chrome, Mozilla or Safari, only in IE (7.0.5730.13)

Here is the relavent code for the rotator.

CSS:
.newsFeed{        
    width: 425px;
    height: 130px;
    padding: 3px 0 0 20px;
    margin: 0 0 2px 0;       
}

.newsContent, .newsPoster{
    font:Trebuchet MS;
    font-family:Trebuchet MS;
    font-size: small;     
}

.newsContent {
   font-weight: bold;
}

ASPX:
<telerik:RadRotator ID="rrNews" runat="server" Height="130px"  
        ScrollDirection="Up" scrollDuration="2000" DataSourceID="newsDS" Width="446px" 
            FrameDuration="5000">             
        <ItemTemplate>
                <div class="newsFeed">
                    <asp:label runat="server" ID="message" CssClass="newsContent" Text='<%# bind("postMessage")%>'></asp:label>
                    <br />
                    <asp:label runat="server" ID="Label0" CssClass="newsPoster" Text="by "></asp:label>
                    <asp:label runat="server" ID="Label1" CssClass="newsPoster" Text='<%# bind("uName")%>'></asp:label>
                    <asp:label runat="server" ID="Label3" CssClass="newsPoster" Text="  on "></asp:label>
                    <asp:label runat="server" ID="Label2" CssClass="newsPoster" Text='<%# bind("postDate")%>'></asp:label>
                </div>
            </ItemTemplate>
        </telerik:RadRotator>

Any help is appreciated. Thank you.
Fiko
Telerik team
 answered on 17 Jun 2009
1 answer
188 views
Hi,

I would like a grid to have a checkbox column which is readily "checkable" by the user and a fixed (bound) textual column to the right of this column. Much like a CheckBoxLst control.

I have the following RadGrid:

<telerik:RadGrid ID="radGridGroups" runat="server" 
                                                    AllowCustomPaging="false" 
                                                    AllowAutomaticDeletes="false" 
                                                    AllowAutomaticInserts="false" 
                                                    AllowAutomaticUpdates="true" 
                                                    AllowFilteringByColumn="false" 
                                                    AllowMultiRowEdit="true" 
                                                    AllowMultiRowSelection="false" 
                                                    AllowPaging="false" 
                                                    AllowSorting="false" 
                                                    AutoGenerateColumns="false" 
                                                    AutoGenerateDeleteColumn="false" 
                                                    AutoGenerateEditColumn="false" 
                                                    EnableHeaderContextMenu="false" 
                                                    GroupingEnabled="false" 
                                                    Height="200" 
                                                    ShowStatusBar="false" 
                                                    ShowFooter="false" 
                                                    ShowGroupPanel="false" 
                                                    ShowHeader="false" 
                                                    Width="340"  
                                                    > 
                                                    <ClientSettings AllowColumnHide="false" AllowColumnsReorder="false" AllowRowHide="false" AllowRowsDragDrop="false" EnableAlternatingItems="false" EnablePostBackOnRowClick="false" EnableRowHoverStyle="false"
                                                        <Resizing AllowColumnResize="false" AllowRowResize="false" /> 
                                                        <Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" /> 
                                                        <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" /> 
                                                    </ClientSettings> 
                                                    <MasterTableView GridLines="None" NoMasterRecordsText="There are no Groups defined" DataKeyNames="DataGroupID"
                                                        <Columns> 
                                                            <telerik:GridCheckBoxColumn DataField="IsEnabled" DataType="System.Boolean" HeaderText="In Group" Resizable="false" Reorderable="false" UniqueName="IsEnabled" ReadOnly="false" > 
                                                                <ItemStyle Width="20" /> 
                                                            </telerik:GridCheckBoxColumn> 
                                                            <telerik:GridBoundColumn DataField="DataGroupName" DataType="System.String" HeaderText="Group Name" Resizable="false" Reorderable="false" ReadOnly="true" UniqueName="DataGroupName"
                                                                <ItemStyle Width="320" /> 
                                                            </telerik:GridBoundColumn> 
                                                        </Columns> 
                                                        <RowIndicatorColumn Display="false" />                                                       
                                                    </MasterTableView> 
                                                </telerik:RadGrid> 

I bind this using the LINQ:

private void PopulateDataGroupsGrid(bool rebind) 
        { 
            var query = from dg in _dataGroups 
                        join dgi in _originalDataGroupItems on dg.ID equals dgi.ParentDataGroup.ID into sr 
                        from x in sr.DefaultIfEmpty() 
                        select new { DataGroupID=dg.ID, IsEnabled = x != null, DataGroupName=dg.Name }; 
            radGridGroups.DataSource = query; 
            if (rebind) radGridGroups.DataBind(); 
        } 
 

Which is called by the NeedDataSource event handler:

        void radGridGroups_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        { 
            PopulateDataGroupsGrid(false); 
        } 

The problem is that this produces a static grid. I can't tick/untick the items in the grid. I don't want to use a Row Selection mechanism, and I will need to add further columns in the future. 

I would dearly like to have the users just "tick"/"untick" as they see fit, hit the "Save" button on my form and for me to then apply the changes to the DB.

How can I best achieve this?

Yavor
Telerik team
 answered on 17 Jun 2009
1 answer
153 views
I have added a RadComboBox to the GridGroupHeader of my grid, however, the combobox does not display correctly.  You can no longer see the drop down arrow and when you hover over the drop down it is not using the correct style for the combo box.  It may be picking up on styles from the grid row.  I am using version 2009.1.402.35 of the controls with the Default theme.  I have also included my ItemDataBound code below to show what I am trying to accomplish.

protected void rgBuySell_ItemDataBound(object sender, GridItemEventArgs e)  
{  
    if (e.Item is GridGroupHeaderItem)  
    {  
        GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;  
          
        item.DataCell.Controls.Clear();  
        item.DataCell.Text = "";  
          
        RadComboBox rcbTradeUsing = new RadComboBox();  
        rcbTradeUsing.ID = "rcbTradeUsing";  
        rcbTradeUsing.Items.Add(new RadComboBoxItem("Dollars""1"));  
        rcbTradeUsing.Items.Add(new RadComboBoxItem("Percent""2"));  
        item.DataCell.Controls.Add(rcbTradeUsing);  
    }  
Tsvetoslav
Telerik team
 answered on 17 Jun 2009
1 answer
123 views
Hi,
I am having some problems deleting content from my database using the radgrid. In my database, I have a table of "contents", one of "users" and one of "favourites" where there is the pair of user and content ids. I am creating a grid of the user's favourite contents, and want to have a column where he can remove a content from his list of favourites, but not delete the content itself from the contents table in the database.
I tried using the automatic delete of the radgrid, but the problem is that it deletes the actual content from the table "contents", whilst all I want is to remove the pair from the table "favourites". I understand that this is because the datasource is a select to that table "contents", but I am unsure of how I can solve this problem so that the content itself is not deleted but only the favourite.
Here is my code:

<telerik:RadGrid ID="MeusFavoritos" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="GET_MEUS_FAVORITOS" GridLines="None" AutoGenerateColumns="False" PageSize="5"  ClientSettings-EnableRowHoverStyle="True" PagerStyle-Mode="NumericPages" PagerStyle-ShowPagerText="false" >
                <MasterTableView CellSpacing="-1" DataSourceID="GET_MEUS_FAVORITOS">
                    <Columns>
                        <telerik:GridHyperLinkColumn DataNavigateUrlFormatString="/lms_bd/FichaConteudo.aspx?conteudo={0}" DataTextField="Titulo" Target="_self" DataNavigateUrlFields="IDConteudo" UniqueName="Titulo" HeaderText="T&#237;tulo" SortExpression="Titulo" />
                        <telerik:GridHyperLinkColumn DataNavigateUrlFormatString="/lms_bd/conteudosTema.aspx?tema={0}" DataTextField="Tema" Target="_self" DataNavigateUrlFields="IDTema" UniqueName="Tema" HeaderText="Tema" SortExpression="Tema" />
                        <telerik:GridButtonColumn ConfirmText="Tem a certeza que quer remover este conteúdo dos seus favoritos?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Remover" ButtonType="ImageButton" CommandName="Delete" Text="Remover"
                        UniqueName="RemoverFav" ImageUrl="~/imagens/bt_apagar.gif" HeaderText="Remover" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                    </Columns>
                </MasterTableView>
                <PagerStyle Mode="NumericPages" ShowPagerText="False" />
                <ClientSettings EnableRowHoverStyle="True" />
            </telerik:RadGrid>

<asp:SqlDataSource ID="GET_MEUS_FAVORITOS" runat="server" ConnectionString="<%$ ConnectionStrings:lms_bibliotecaConnectionString1 %>"
                      SelectCommand="SELECT * FROM ([NL_LMS_BIB_conteudos] INNER JOIN NL_LMS_BIB_temas ON NL_LMS_BIB_conteudos.IDTema = NL_LMS_BIB_temas.IDTema)
                      INNER JOIN NL_LMS_BIB_favoritos on NL_LMS_BIB_conteudos.IDConteudo = NL_LMS_BIB_favoritos.IDConteudo
                      WHERE NL_LMS_BIB_favoritos.IDUser = @UserID">
    <SelectParameters>
        <asp:SessionParameter Name="UserID" SessionField="UserID" />
    </SelectParameters>
</asp:SqlDataSource>


Can anyone please help me?
Thank you.
Marta
Top achievements
Rank 1
 answered on 17 Jun 2009
2 answers
722 views
I hv open the rad window from code behind

Protected Sub imgmail_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgmail.Click

            Dim rptWindows As Telerik.Web.UI.RadWindow = New Telerik.Web.UI.RadWindow()
            rptWindows.NavigateUrl = "reportMail.aspx"
            Form1.Controls.Add(rptWindows)
            rptWindows.Height = 535
            rptWindows.Width = 500
            rptWindows.BorderColor = Drawing.Color.BlueViolet
            rptWindows.BorderStyle = BorderStyle.Solid
            rptWindows.Modal = False
            rptWindows.VisibleStatusbar = False
            rptWindows.Behavior = WindowBehaviors.Close Or WindowBehaviors.Move
            rptWindows.VisibleOnPageLoad = True

     
        End Sub
    End Class




I need to pass some argument when rad window open pass some id, name, orgid ? and the radwindow contain textbox when i pass value that time the id is diplay in textbox how to do this ?

help me urgent
Shinu
Top achievements
Rank 2
 answered on 17 Jun 2009
1 answer
118 views
Hi,

is it possible to change the properties offesetx and offsety on client side programming? How can i access this values client side?
Princy
Top achievements
Rank 2
 answered on 17 Jun 2009
1 answer
201 views
Dear Telerik,

We have a grid created in code (Q1 2009). When a user drags a column to the group header, it works great. When the column is dragged away from the header it UnGroups correctly.

Recently we started optimizing the application. One thing we did is to set the EnableViewState=false on the Page containing the grid to make the page lighter

<%@Page UICulture="auto" Language="C#" AutoEventWireup="true" EnableViewState="false" CodeFile="T.aspx.cs" Inherits="_T" %> 

Everything worked great until we discovered a crash when the column is dragged away from the header. It gives the following dump:

Exception.Message
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Stack Trace
System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
Telerik.Web.UI.GridGroupByExpressionCollection.get_Item(Int32 index)
Telerik.Web.UI.GridGroupPanel.Ungroup(String index)
Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

After various attempts to solve the problem with no luck, we put back the EnableViewState=true on the Page containing the grid:
<%@Page UICulture="auto" Language="C#" AutoEventWireup="true" EnableViewState="true" CodeFile="T.aspx.cs" Inherits="_T" %> 
 
And the crash disappeared.

Note some other grid setting:

        radGrid.GridLines = GridLines.None;  
 
        radGrid.EnableViewState =  
        radGrid.AllowMultiRowSelection =  
        radGrid.ClientSettings.Selecting.AllowRowSelect =  
        radGrid.ClientSettings.Selecting.EnableDragToSelectRows = true;  
 
        radGrid.AllowAutomaticDeletes =  
        radGrid.AllowAutomaticInserts =  
        radGrid.AllowAutomaticUpdates =  
        radGrid.FilterMenu.Visible =  
        radGrid.ClientSettings.AllowKeyboardNavigation =  
        radGrid.MasterTableView.EnableColumnsViewState =  
        radGrid.AutoGenerateColumns = false;  
 
        radGrid.ClientSettings.ClientEvents.OnGridCreated = "GridCreated";  
        radGrid.ClientSettings.ClientEvents.OnKeyPress = "GridKeyPressed";  
        radGrid.ClientSettings.ClientEvents.OnRowSelected = "GridRowSelected";  
        radGrid.ClientSettings.ClientEvents.OnActiveRowChanged = "GridRowChanged";  
 
        radGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;  
 
        radGrid.MasterTableView.ClientDataKeyNames = new string[] { "uid" };  
 
        radGrid.ClientSettings.AllowColumnsReorder =  
        radGrid.ClientSettings.Resizing.AllowColumnResize =  
        radGrid.ClientSettings.Resizing.EnableRealTimeResize =  
        radGrid.ClientSettings.Resizing.ClipCellContentOnResize = radGrid.Columns.Count > 2;  
 
        radGrid.ClientSettings.AllowKeyboardNavigation =  
        radGrid.ClientSettings.Resizing.ResizeGridOnColumnResize = true;  
          
        radGrid.ClientSettings.ClientEvents.OnRowDblClick = "GridRowDoubleClicked";  
        radGrid.MasterTableView.SortExpressions.AllowNaturalSort = false;  
 
        radGrid.ShowGroupPanel =  
        radGrid.ClientSettings.AllowDragToGroup =  
        radGrid.ClientSettings.Scrolling.AllowScroll =  
        radGrid.AllowFilteringByColumn =  
        radGrid.ClientSettings.AllowGroupExpandCollapse = true;  
          
        radGrid.GroupingSettings.CaseSensitive = false;  
 
        radGrid.AllowPaging = true;  
        radGrid.PagerStyle.Mode = GridPagerMode.Slider;  
        radGrid.ClientSettings.Scrolling.SaveScrollPosition =  
        radGrid.ClientSettings.Scrolling.UseStaticHeaders =  
        radGrid.ClientSettings.Scrolling.AllowScroll = true;  
        radGrid.PreRender += new EventHandler(GridPreRender);  
 

Can you please help?

Salah A. Malaeb
Veli
Telerik team
 answered on 17 Jun 2009
2 answers
135 views
I strongly suggust that Telerik team should add "DropDownCheckList" control to RadControls, both for ASP.NET AJAX and WinForm, just like jQuery does.


Regards.
Miao Weibin
Top achievements
Rank 1
 answered on 17 Jun 2009
0 answers
403 views
RadListBox is a powerful ASP.NET AJAX control to display a list of items. It allows for multiple selection of items, reorder and transfer between two listboxes. Drag and drop is fully supported as well. You can easily control the appearance by arranging the buttons in different layouts or changing their text. Icons and checkboxes are also supported within the listbox items.

The ListBox implements a highly efficient semantic rendering, which uses list items and CSS instead of tables. As a result the HTML output is significantly reduced, which dramatically improves performance.

RadListBox can be bound to all ASP.NET 2.0 declarative datasources (ObjectDataSource, XmlDataSource, SqlDataSource, etc) as well as the ASP.NET 3.5 LinqDataSource. Binding to XML strings as well as automatic database updates are fully supported.

The ListBox control has a rich client-side API and comprehensive set of events guaranteeing full control over various functions performed on the client. You can easily add/delete/update items at the client side and all the changes will be persisted on the server as well. The rich client-side API provides unbeatable performance and desktop-like experience.

RadListBox is shipped with a rich set of skins that allow you to easily build slick interfaces with the look-and-feel of Windows Vista, Office 2007, Outlook, etc. The skins can be easily switched using a single property.

To get familiar with the control please follow these online resources:


Telerik Admin
Top achievements
Rank 1
Iron
 asked on 17 Jun 2009
2 answers
83 views
Hi,

I'm currently designing a 2.0 website and I need to build a tag cloud. I'm also using telerik controls and I'm asking you if there's any solution to build a tag cloud using the grid telerik control or any other telerik control?
I tried some examples in asp.net or c# but none worked.
Cátia
Top achievements
Rank 1
 answered on 17 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?