Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
156 views
Hi,
I am not good at css but I have to transfer my old navigation bar to tab control. I have read this article
http://www.telerik.com/help/aspnet/tabstrip/tabsrip_cssstylesfornormalstate.html

but I dun really know how to implement it if I have configured all the li, ul, a hover b4..Would u mind to upload the example code of the above article?
louis chan
Top achievements
Rank 1
Iron
 answered on 11 Mar 2010
3 answers
211 views
Hi

I want to customise menus, but rather than having to recreate all of the css, it seems to me that it would make sense to just add whatever css is required to alter the base css.

But if I have EnableEmbeddedBaseStyleSheet = "True", the base css gets loaded after mine, overriding it, which isn't very useful, but if I set it to false, there is no css at all except what I provide.

Can you tell me is it possible to arrange for the base css to be loaded first?

Thanks

Rob
Rob
Top achievements
Rank 1
 answered on 11 Mar 2010
4 answers
203 views
Hi,

In my project, when I upload file using SoftArtisan FileUp component, for the Transfer Progress Window, I am using a RadWindow and update the content of that RadWindow using
 transferwindow.get_contentFrame().contentWindow.document.write(strHTML);
strHTMl is the string to be written to RadWindow including the
<HTML><HEAD><TITLE>" + "Transfer Status" + "</TITLE> and other content needed for  HTML page.

I have a requirement where I have to open another page parallel to this transfer window. Can I open my tranfer window in RadPane inside the RadSplitter , where I can open my second page in the second RadPane. Can I update the content of the RadPane dynamically passing the string to the page?

Thanks.

kachy
Top achievements
Rank 1
 answered on 10 Mar 2010
2 answers
352 views
Hello,

I am using Version=2009.3.1208.35 and programming in asp.net vb.

I have a RadGrid bound to a SQL Data Source.

I would like to be able to hide the cell content of a GridHyperLinkColumn if the value in a field is not empty or not null.

Here is my ASPX code.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="employee.aspx.vb" Inherits="cf_console_admin_profiles_employee_employee" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<%@ Register assembly="Telerik.Web.UI, Version=2009.3.1208.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>Fleet Compliance Management System</title> 
    <link rel="stylesheet" type="text/css" href="http://cf.visionquestit.net/includes/styles/cf_style.css"/>  
</head> 
<body> 
<form id="form1" runat="server">  
     
          
<table id="tablePageBodyContainer" class="tablePageBodyContainer">  
    <tr> 
        <td> 
        <table id="tablePageHeader" class="tablePageHeader">  
            <tr> 
                <td class="tablePageHeaderColumn">  
                    <div class="divPageHeader">  
                        <span class="spanLoginTitle">  
                        Logged In  
                        </span><br/>  
                        <span class="spanLoginUserName">  
                        <%Response.Write(Session("x_Firstname"))%> 
                        </span> 
                        <span class="spanLoginUserName">  
                        <%Response.Write(Session("x_Lastname"))%> 
                        </span> 
                    </div> 
                </td> 
            </tr> 
        </table> 
        <table id="tablePageBody" class="tablePageBody">  
        <tr> 
            <td class="tablePageBodyLeftColumn">  
                <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="DataFieldID"   
                    DataFieldParentID="DataFieldParentID"   
                    DataNavigateUrlField="DataNavigateUrlField" DataSourceID="SqlDataSource1"   
                    DataTextField="DataTextField" DataValueField="DataTextField" Height="100%"   
                    Skin="Forest" Width="180px" ExpandMode="FullExpandedItem"   
                    PersistStateInCookie="True">  
                </telerik:RadPanelBar> 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
        ConnectionString="<%$ ConnectionStrings:CF_SQL_Connection %>"   
        SelectCommand="SELECT [DataFieldID], [DataFieldParentID], [DataTextField], [DataNavigateUrlField], [ImageURL] FROM [CF_Menu_Console]">  
    </asp:SqlDataSource> 
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
    </telerik:RadScriptManager> 
            </td> 
            <td class="tablePageBodyRightColumn">  
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"   
                    DataSourceID="sdsEmployeeList" GridLines="None" Skin="Telerik"   
                    Width="771px">  
                    <mastertableview autogeneratecolumns="False" datasourceid="sdsEmployeeList">  
                        <rowindicatorcolumn> 
                            <HeaderStyle Width="20px" /> 
                        </rowindicatorcolumn> 
                        <expandcollapsecolumn> 
                            <HeaderStyle Width="20px" /> 
                        </expandcollapsecolumn> 
                        <Columns> 
                            <telerik:GridHyperLinkColumn DataNavigateUrlFields="FirstName,IDProfileEmployee"   
                                DataNavigateUrlFormatString="employeedetails.aspx?IDProfileEmployee={1}"   
                                DataTextField="IDProfileEmployee" DataTextFormatString="Details"   
                                Text="View" UniqueName="View">  
                                <ItemStyle Width="50px" /> 
                            </telerik:GridHyperLinkColumn> 
                            <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"   
                                SortExpression="LastName" UniqueName="LastName">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"   
                                SortExpression="FirstName" UniqueName="FirstName">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="Email" HeaderText="Email"   
                                SortExpression="Email" UniqueName="Email">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridHyperLinkColumn DataNavigateUrlFields="IDProfileEmployee,FirstName,LastName"   
                                DataNavigateUrlFormatString="../../../../includes/makeuser.aspx?IDProfileEmployee={0}&amp;FirstName={1}&amp;LastName={2}"   
                                Text="User" UniqueName="AddUser">  
                            </telerik:GridHyperLinkColumn> 
                        </Columns> 
                    </mastertableview> 
                </telerik:RadGrid> 
                <asp:SqlDataSource ID="sdsEmployeeList" runat="server"   
                    ConnectionString="<%$ ConnectionStrings:CF_SQL_Connection %>"   
                    SelectCommand="SELECT [IDProfileEmployee], [IDUser], [LastName], [FirstName], [Email] FROM [CF_Profile_Employee]">  
                </asp:SqlDataSource> 
            </td> 
       </table>           
      
</table> 
      
          
    <table class="tablePageFooter">  
        <tr> 
            <td> 
                <!--#include virtual ="/includes/footer.htm" --></td>  
        </tr> 
    </table> 
    </form> 
</body> 
</html> 
 

Here is my code behind:

 
Imports Telerik.Web.UI  
 
Partial Class cf_console_admin_profiles_employee_employee  
    Inherits System.Web.UI.Page  
 
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)  
        If TypeOf e.Item Is GridDataItem Then  
            Dim item As GridDataItem = TryCast(e.Item, GridDataItem)  
            Dim textBox As TextBox = TryCast(item.FindControl("AddUser"), TextBox)  
            If textBox.Text.Length > 0 Then  
                Dim commandItem As GridCommandItem = TryCast(TryCast(sender, RadGrid).MasterTableView.GetItems(GridItemType.CommandItem)(0), GridCommandItem)  
                TryCast(commandItem.FindControl("AddUser"), TextBox).Visible = False 
            End If  
        End If  
    End Sub  
 
End Class  
 

Thank you in advance.
Allan
Top achievements
Rank 2
 answered on 10 Mar 2010
5 answers
157 views
Hi,

We are building a webapplication using the Web Client Software Factory Model-View-Presenter pattern.
We would like to take advantage of the Telerik control library, but we cannot find any samples on how to implement this properly in the MVP pattern using the ObjectContainerDataSource. This is what we would like to do:
1. One page with two RadGrids - in a multipage with a pageview for each grid.
2. The page containing the grids have a save button - when clicking this, the data from the grids should be saved. We don't want a save button for each grid, since this is not very user-friendly.

This is how we have done so far:
1. Insert a RadGrid like this:
<tel:RadGrid ID="gridKnuder" AutoGenerateColumns="false" 
                DataSourceID="ocdsKnuder" AllowPaging="True" AllowSorting="True" AllowMultiRowEdit="true" 
                AllowAutomaticUpdates="true" GridLines="None" Skin="Office2007" 
                OnPreRender="GridKnuder_PreRender" OnItemCreated="GridKnuder_ItemCreated" runat="server"
                <MasterTableView DataKeyNames="Kode" EditMode="InPlace" CommandItemDisplay="None"
                    <Columns> 
                        <tel:GridBoundColumn ReadOnly="true" UniqueName="ShowType" HeaderText="Type" DataField="TypeBeskrivelse" /> 
                        <tel:GridBoundColumn HeaderText="Pris" UniqueName="ShowPris" DataField="Pris" /> 
                    </Columns> 
                </MasterTableView> 
            </tel:RadGrid> 

2. Declare an ObjectContainerDataSource like this:
<wcsf:ObjectContainerDataSource ID="ocdsKnuder" DataObjectTypeName="Niras.DasVaerdi.Entity.KKnudeStandardVaerdi" runat="server" /> 




3. We display the grid in edit mode like this:
protected void GridKnuder_PreRender(object sender, System.EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                foreach (GridItem item in gridKnuder.MasterTableView.Items) 
                { 
                    if (item is GridEditableItem ) 
                    { 
                        GridEditableItem editableItem = item as GridDataItem; 
                        editableItem.Edit = true
                    } 
                } 
 
                gridKnuder.Rebind(); 
            } 
        } 
 
This makes all the rows in the grid editable when the page is loaded, and when the user clicks the "global" save button, we want to retrive the list of objects that was initially bound to the grid like this:
public IList<OurObject> Knuder 
        { 
            set { ocdsKnuder.DataSource = Session[skKnudeStandardVaerdier] = value; } 
        } 


So, we want our save button event-handler do look something like this:
protected void Save(object sender, EventArgs e) 
        { 
// Get the list of objects back from the grid or its datasource          
IList<OurObject> vaerdier = gridKnuder.???????? or ocdsKnuder.???? 
 
            _presenter.OnKnuderUpdated(vaerdier); 
            Knuder = vaerdier; 
        } 

Is this even possible with the ObjectContainerDataSource or does it only allow updating on row at a time, with "Update" and  "Cancel" option on each row? Which is not vey usefull in real-world applications.

Please let me know if I should provide more code to clarify what we want to do
johnv
Top achievements
Rank 2
 answered on 10 Mar 2010
2 answers
162 views
Hello,
I'm working through a current problem with a page that utilizes a RadGrid along with CustomValidator ASP.NET controls.

When an item is edited inline, the client side validators still somehow allow a postback to occur via 

GridEditCommandColumn

 

column. When this happens, validation fails on the server side and any posted back changes to the form are completely lost (even cells which contained valid data).

I'd like to either be able to 1) Stop the postback on the client side as it *HAS* failed validation or 2) maintain the row's values after the canceled update attempt has occured.

Has anyone seen similar behavior? All client side validation does is set the args.IsValid to true or false and I can confirm this works - but showhow it just allows me to still click the update command item image.

Anthony Romero
Top achievements
Rank 1
 answered on 10 Mar 2010
6 answers
252 views
Hello, I am trying to get my project ported to Mono, (it was working before adding Telerik controls)

I get an error 500 when running it from xsp2 on Suse Linux on Mono 1.6.1 The stack trace is:

System.InvalidCastException: Cannot cast from source type to destination type. 
  at System.Web.UI.ScriptManager.GetCurrent (System.Web.UI.Page page) [0x00000] in &lt;filename unknown&gt;:0  
  at Telerik.Web.UI.RadAjaxControl.OnInit (System.EventArgs e) [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] in &lt;filename unknown&gt;:0  
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in &lt;filename unknown&gt;:0  

We have the telerik stuff in a master page. The master page is used by all the pages in the project, so I am just trying to load basically just a bare-bones Default.aspx page. The relevant markup in the master page is

<body> 
    <form id="MasterPageForm" runat="server"
    <asp:ScriptManager ID="OurScriptManager" runat="server" /> 
 
    <telerik:RadAjaxManager ID="OurRadAjaxManager" runat="server"
            <AjaxSettings> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
    
         
         <telerik:RadWindowManager ID="OurRadWindowManager" ShowContentDuringLoad="false" VisibleStatusbar="false" 
            ReloadOnShow="true" runat="server"
            <Windows> 
                <telerik:RadWindow  runat="server" Title = "Test" ID="RadWindowAddEditGridItem" Behaviors="Close"  
                    NavigateUrl="Dialogs/DialogAddEditGridItem.aspx" Width="600px" Height="500px" VisibleTitlebar="true" OnClientClose="closeRadWindow" >                  
                </telerik:RadWindow>             
            </Windows> 
        </telerik:RadWindowManager> 

Also, I am using the Telerik .Net 2.0 demo assemblies

Also, note that removing all telerik references from the master page's markup makes it so it will compile and work.
Charles Wiebe
Top achievements
Rank 1
 answered on 10 Mar 2010
2 answers
281 views
I have an issue occuring with the RadGrids I use where the header text is shifted left and right when sorting.  The other issue occuring is when I use the onmouseover/out settings and change the row background style and usually when I hover over the last row or first row of the grid there is movement to the left of the item text or in cases of large amounts of text the rows are condensed a bit and moved to the left slightly....any ideas what is making this happen?
Below is my code and if it matters I'm using a master page layout.  Thanks for any help

 

<div class="behindGrid">

 

 

<p class="upperGridCaptionNew">

 

....some text here

 

</p>

 

 

<div class="behindGrid2Middle">

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" Gridlines="none"

 

 

OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" Width="98%" OnSortCommand="RadGrid1_Sorted" OnNeedDataSource="RadGrid1_Reload" PageSize="14" Skin="CustomSkin" EnableEmbeddedSkins="false">

 

 

<PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric"/>

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

 

<Selecting AllowRowSelect="true" />

 

 

<ClientEvents OnRowMouseOver="RowMouseOver" OnRowMouseOut="RowMouseOut" />

 

 

</ClientSettings>

 

 

<MasterTableView>

 

 

<Columns>

 

 

<telerik:GridButtonColumn HeaderStyle-HorizontalAlign="Center" DataTextField="GroupSite"

 

 

HeaderText="Group / Site" SortExpression="GroupSite" UniqueName="GroupSite" CommandName="Select">

 

 

</telerik:GridButtonColumn>

 

 

<telerik:GridBoundColumn DataField="GroupSite" HeaderText="GroupSite" SortExpression="GroupSite" UniqueName="GroupSite" Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Blah" HeaderText="Blah Site" SortExpression="Blah" UniqueName="Blah" Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Status" HeaderText="Status" SortExpression="Status" ItemStyle-HorizontalAlign="Center" UniqueName="Status">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" DataField="Items" HeaderText="Items" SortExpression="Items" UniqueName="Items">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</div>

 

 

<div class="behindGridBottom"></div>

 

 

</div>

 


function

 

RowMouseOver(sender, eventArgs)

 

{

$get(eventArgs.get_id()).className =

"RowMouseOver";

 

}

 

function RowMouseOut(sender, eventArgs)

 

{

$get(eventArgs.get_id()).className =

"RowMouseOut";

 

}



.RowMouseOver

 

TD

 

{

 

 

border-bottom:solid 1px silver;

 

 

background-color:#E4E5D7;

 

 

color:#B45F04 !important;

 

 

padding-top:0px;

 

 

padding-bottom:0px;

 

 

border-top:solid 1px silver;

 

 

text-align:center;

 

}

 

 

.RowMouseOver A

 

{

 

background-repeat:repeat-x;

 

 

background-color:Transparent;

 

 

color:#B45F04 !important;

 

 

text-align:center;

 

 

 

 

}

 

 

.RowMouseOut

 

{

 

 

background: #f7f7f7;

 

 

background-image:url('Images/rowUnHover.png');

 

 

background-position:center top;

 

 

background-repeat: no-repeat;

 

 

text-align:center;

 

}

Erik
Top achievements
Rank 1
 answered on 10 Mar 2010
3 answers
131 views
Hi,

We have used RadCombobox with LoadOnDemand and ShowMoreResult feature. But we are facing issue in navigating items of with Keyboard.
We are able to Open Drop down with "Alt" + ArrowKeys but after getting data we are not able to navigate items using arrow keys.

We have bind dropdown in ItemRequest event by giving Datasource and Databind method. And then we have Added Default Item i.e. "Please Select" using "Insert" method i.e. ddl.Items.Insert(0, new RadComboboxItem("Please Select", " "); and Also one more item at index 1 which is required.

We are able to select Items which we have inserted but not able to navigate items whihc has been bind using Datasource.

Kindly suggest where we have done mistake.

Thanks and Regards,
Chanda Malukani.
Simon
Telerik team
 answered on 10 Mar 2010
5 answers
245 views
I am using the TitleBarTemplate to display a link button and Image.  The problem I am having is getting the control to be centered vertically in the Dock Title bar.

<TitlebarTemplate> 
  <div class="RadDock_McpsPurple_TitlePanel"
    <asp:LinkButton runat="server" ID="ProfDevTitleLinkButton" CssClass="RadDock_McpsPurple_TitleLink"></asp:LinkButton> 
    <asp:Image runat="server" ID="ProfDevMoreImage" CssClass="RadDock_McpsPurple_MoreCommand" /> 
  </div> 
</TitlebarTemplate>    

Tim DiPaula
Top achievements
Rank 1
 answered on 10 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?