Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
283 views
Is there a way to use a sprite for the button images and get the hover affect using another part of the sprite?  I am currently setting the ImageUrl and HoveredImageUrl properties but with 10 buttons that causes 20 images to download.  I would prefer to get that down to 1 image if possible.

Thanks.
Kamen Bundev
Telerik team
 answered on 11 Sep 2009
2 answers
82 views
Hi,
I have applied Basic filtering in the grid but it is showing error message

'Telerik.Web.UI.ParseException: Expression expected' when out of ajax panel and
when inside ajax panel , it shows the error in javascript error.

here is my grid , note that i have grids in my other screens which are working fine in filtering.

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" >  
      
    <telerik:RadGrid ID="GrdUsers" runat="server" AutoGenerateColumns="False" GridLines="Vertical" 
        AllowFilteringByColumn="True" AllowPaging="True" OnItemDataBound="GrdUsers_ItemDataBound" 
         OnNeedDataSource="GrdUsers_NeedDataSource" 
         Width="100%" >  
        <PagerStyle Mode="Advanced" Position="TopAndBottom"></PagerStyle>  
        <HeaderContextMenu>  
            <CollapseAnimation Type="OutQuint"></CollapseAnimation>  
        </HeaderContextMenu>  
        <MasterTableView  AllowFilteringByColumn="True" DataKeyNames="EmailAddress">  
            <Columns>  
                <telerik:GridTemplateColumn HeaderText="Email" UniqueName="column1" AllowFiltering="true" 
                    FilterControlWidth="135px">  
                    <ItemTemplate>  
                        <asp:hyperlink id="hlnkEmailAddress" runat="server" text='<%# DataBinder.Eval(Container, "DataItem.EmailAddress") %>'  
                            navigateurl='<%# DataBinder.Eval(Container, "DataItem.EmailAddress""Details.aspx?em={0}") %>'  
                            enableviewstate="False" target="_blank">  
                        </asp:hyperlink>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" HorizontalAlign="Left" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn FilterControlWidth="55px" HeaderText="User Name" UniqueName="column2" 
                    AllowFiltering="true">  
                    <ItemTemplate>  
                        <asp:label id="lblUserName" runat="server" text='<%# Eval("UserName").ToString() %>'>  
                        </asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" HorizontalAlign="Left" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn FilterControlWidth="55px" HeaderText="Package" UniqueName="column3" 
                    AllowFiltering="true">  
                    <ItemTemplate>  
                        <a href="#">  
                            <asp:label id="lblPackage" runat="server" text='<%# GetPackage(Eval("EmailAddress").ToString()) %>'  
                                tooltip="Click to view package detail"></asp:label>  
                        </a>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" HorizontalAlign="Left" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn HeaderText="Registration Date" UniqueName="column4" AllowFiltering="true">  
                    <ItemTemplate>  
                        <asp:label id="lblRegistrationDate" runat="server" text='<%# Eval("RegistrationDate") %>'>  
                        </asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn FilterControlWidth="55px" HeaderText="Sig Count / Limit" 
                    UniqueName="column5" AllowFiltering="true">  
                    <ItemTemplate>  
                        <asp:label id="lblSigLimit" runat="server"><%# Eval("SignatureUsed") %> / <%# GetSum(Convert.ToInt64(Eval("SignatureUsed")), Convert.ToInt64(Eval("RemainSignatureLeft")))%> </asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn FilterControlWidth="55px" HeaderText="Account Size / Limit" 
                    UniqueName="column6" AllowFiltering="true">  
                    <ItemTemplate>  
                        <asp:label id="lblAccountLimit" runat="server"><%# Convert.ToInt64(Eval("SpaceLimitUsed"))/1024%> / <%# GetSum(Convert.ToInt64(Eval("SpaceLimitUsed")), Convert.ToInt64(Eval("RemainBalanceLeft")))/1024%> </asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn HeaderText="Enterprise / Admin" UniqueName="column7" 
                    AllowFiltering="true" FilterControlWidth="165px">  
                    <ItemTemplate>  
                        <asp:label id="lblEnt" runat="server"></asp:label>  
                        <asp:label id="lblParentUserEmailAddress" runat="server" text='<%# Eval("ParentUserEmailAddress")%> '>  
                        </asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" HorizontalAlign="Left" />  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn FilterControlWidth="35px" HeaderText="Status" UniqueName="column8" 
                    AllowFiltering="true" Visible="false">  
                    <ItemTemplate>  
                        <asp:label id="lblStatus" runat="server" text='<%# Eval("status")%>'></asp:label>  
                        <asp:label id="lblUsertypeId" runat="server" text='<%# Eval("UserTypeId")%>'></asp:label>  
                    </ItemTemplate>  
                    <ItemStyle CssClass="smallText8" />  
                </telerik:GridTemplateColumn>  
            </Columns>  
             <RowIndicatorColumn>  
                                <HeaderStyle Width="20px"></HeaderStyle>  
                            </RowIndicatorColumn>  
                            <ExpandCollapseColumn>  
                                <HeaderStyle Width="20px"></HeaderStyle>  
                            </ExpandCollapseColumn>  
        </MasterTableView>  
        <FilterMenu>  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
        </FilterMenu>  
    </telerik:RadGrid>  
    </telerik:RadAjaxPanel> 
Here is my c# code.
        if (!IsPostBack)  
        {  
      //      lstUsers = objUserMgr.GetAllUsers();  
       //     lblTotal.Text = "Total Users : " + lstUsers.Count;           
            try { }  
            catch (Exception ex)  
            {  
                Response.Write(ex.Message.ToString());  
                  
            }  
 
 
        }  
    }  
      
    protected void GrdUsers_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
           UserManager objUserMgr = new UserManager();  
           GrdUsers.DataSource = objUserMgr.GetAllUsers();  
                    
    } 

Please reply me asap, why this error is coming on fiter some data in the grid.
Regards
Muhammad Shoaib
Yavor
Telerik team
 answered on 11 Sep 2009
1 answer
105 views
WE found a wierd behaviour, with RadComboBox , tried many different thing, and are lost, need some guidence.
<telerik:RadComboBox ID="ddlDriverLastName" Runat="server" Skin="Office2007" DropDownWidth="470" Width="133"   
                                                 MarkFirstMatch="true" AllowCustomText="true" SelectOnTab="true" AutoPostBack="false"   
                                                 ShowWhileLoading="true" ToolTip="Select Driver" Sort="None" 
                                                 HighlightTemplatedItems="true" EnableItemCaching="false" Filter="Contains" 
                                                 OnClientSelectedIndexChanged="ChangeInputColor">  
 

we have multicolumn dropdown with Last Names, when i bind the dropdown i set DriverID as value, and Last Name as text.

In case when we bind list that contains identical last names, we get this wierd behaviour, when first item in the list with the same last name is selected and page is reposted, the SelectedValue that is being passed by the control is that of the previously selected item with the same Last Name.
In other words, we can never get the first Last name item in the list, to be ever recognized as the one being selected.
Does anyone esle have this issue?
Veselin Vasilev
Telerik team
 answered on 11 Sep 2009
3 answers
201 views
Would it be possible to disable the listboxes without hiding the buttons that make it possible to swap items between the lists? (in other words, some sort of "ReadOnly"-mode, without changing the look of the controls)

<telerik:RadListBox ID="DualList" runat="server" AllowTransfer="true" AllowTransferOnDoubleClick="false" 
DataSourceID="EmployeesDataSource" DataTextField="Name" DataValueField="EmployeeID" TransferToID="TransferToList" 
Width="230px" Height="200px" Culture="Dutch (Netherlands)" EnableDragAndDrop="false" SelectionMode="Multiple" 
OnDataBound="DualList_DataBound" Enabled="false">  
</telerik:RadListBox> 
<telerik:RadListBox ID="TransferToList" runat="server" DataSourceID="PreferredEngineersDataSource" DataTextField="Name" 
DataValueField="EmployeeID" Width="230px" Height="200px" AllowTransfer="false" AllowTransferOnDoubleClick="false" 
Culture="Dutch (Netherlands)" EnableDragAndDrop="false" SelectionMode="Multiple" OnDataBound="TransferToList_DataBound" 
Enabled="false">  
</telerik:RadListBox> 

http://bart.nimio.info/images/fora/listbox.JPG
Genady Sergeev
Telerik team
 answered on 11 Sep 2009
5 answers
470 views
Hi guys:

I have created a RadGrid to connect to an OLAP datasource.  That grid has three columns bounded to the following column names returned from that datasource:

[Periodo].[Periodo].[Mes].[MEMBER_CAPTION]
[Tipo Afiliado].[TipoAfiliado].[Tipo Afiliado].[MEMBER_CAPTION]
[Measures].[Total trabajadores afiliados]

When i want to click over one of the columns in the grid, i receive the following error:

Sys.WebForms.PageRequestManagerServerErrorException: Cannot find column Periodo].[Periodo].[Mes].[MEMBER_CAPTION.

Note that in the error description the column name given lacks the "[" character at the begining and the "]" character at the end.

If i configure the RadGrid to query a SQL Server database, the ordering works fine. I only have troubles with OLAP datasources.









Sebastian
Telerik team
 answered on 11 Sep 2009
2 answers
116 views

<telerik:RadGrid  ID="RadGrid1" runat="server" 
        AllowPaging="True" GridLines="None"   
        AllowSorting="True" Skin="Office2007" AllowAutomaticUpdates="True" AutoGenerateColumns="False" 
        OnUpdateCommand="RadGrid1_UpdateCommand" OnNeedDataSource="RadGrid1_NeedDataSource" 
        OnItemCommand="RadGrid1_ItemCommand" OnItemCreated="RadGrid1_ItemCreated" OnPreRender="RadGrid1_PreRender">  
          
        <PagerStyle Mode="NumericPages" /> 
        <MasterTableView AllowMultiColumnSorting="True" DataKeyNames="BillingItemID" > 
                  
            <NestedViewTemplate> 
                <asp:Panel runat="server" ID="InnerContainer" Visible="false">  
 
                    <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">  
                        <telerik:RadPageView runat="server" ID="PageView1">  
                            <asp:Label ID="BillingItemAssociationID" Text='<%# Eval("BillingItemAssociationID") %>' Visible="false" runat="server" /> 
                              
                            <telerik:RadGrid ID="ChildGrid" runat="server" OnNeedDataSource="ChildGrid_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand" OnItemCreated="RadGrid1_ItemCreated" AllowAutomaticUpdates="true" ShowFooter="true" AllowSorting="true">  
                              
                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" DataKeyNames="BillingItemID" PageSize="10" HierarchyLoadMode="ServerOnDemand">  
                                          
                                    <Columns> 
protected void RadGrid2_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            ((RadGrid)source).DataSource = BillingItemsChildData(id);  
        } 

I've set the OnNeedDataSource attribute in the nested grid but it's getting called at the right times! The only way I can get this to work is to use a SqlDatasource in the .aspx file and that's just not an option for me. Also You see i'm sending the id (datakey) to the

BillingItemsChildData method but i'm not able to get the datakey from the parent inside this event. I've been testing by manually setting it.

I've been stuck on this for a while now. People on here have suggested that I use the detailsgridbind event but it's not a details grid, it's a nested radgrid.

I've tried setting the NeedDataSource event programmaticaly in just about every event in the page lifecycle and nothing works, only the .aspx SqlDataSource.

Thanks in advance.

Rocky
Top achievements
Rank 1
 answered on 11 Sep 2009
2 answers
245 views
Hello, I'm new to RadControls for ASP.NET AJAX so please forgive me if this is a simple question.

I am using the calendar in Multi-Month view and I have figured out how to get the calendar to dispaly in the fomat that I require.
I now need to bind the calendar to a SQL Server data source so that I can highlight certain dates that have events happening on them.

Can someone tell me how to do this or point me in the direction of a tutorial?

Many thanks in advance.
Nigel Gentry
Top achievements
Rank 1
 answered on 11 Sep 2009
1 answer
86 views
I have tried a few ways to name the masterpage (PreInit, Init) but it either does not change the masterpage id or the controls don't work properly. I am using the telerik RadINputManager to validate information on a form. If I change the masterpage ID it does not disable the user from submitting the form when there are errors. How can I get around this?
Tsvetoslav
Telerik team
 answered on 11 Sep 2009
7 answers
250 views
dear all,

i am using the raddatepicker in my webapplication. i have added a javascript to my application that is executed when ClientEvents-OnDateSelected is fired. this event doenst repond to keybord inputs. is there an option to make the control respond to keybord inputs client side?

greets,

danny
Veselin Vasilev
Telerik team
 answered on 11 Sep 2009
4 answers
247 views
Hi everyone,
I am hoping for some help on something I am sure isn't a major.

I am taking advantage of the CaptionFormatString on a edit/insert form I am using. It works as it should when editing and when adding a form no text is displayed. When I insert a record (I keep the form open) the Caption is then displayed as Edit Item : {0}

Can I change this to be blank or a more friendly type of message?

Thank you

Shane
Ron
Top achievements
Rank 1
 answered on 11 Sep 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?