Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
I have recently took over a project from someone else and am experiencing some inconsistencies when it comes to getting/setting html in firefox. 

When i use get_html i want to always have my content wrapped in HTML tags. So if i type a few words it should be wrapped a <p> tag when i use get_html. This works for hte most part but with a couple inconsistencies:

1) When i set my HTML using set_html , if my content is empty i must set "<p>&nbsp;</p>"  or else setting it to empty text will just return straight text when i use get_html if i just type a few words without any styling/line breaks.
2) Setting it to <p>&nbsp;</p> when the content is empty works fine when i use get_html. Everything is wrapped in a <p> tag how i want it but if i highlight/delete the content then start again sometimes (but not always) the <p> tags disappear and i get straight text and no HTML. 
3) If i use <p></p> in Firefox when i have no content to set the return results are "<p></p>" then my text, but in IE the text appears inside the <p> tag. 

I really just want to enforce always having formatted HTML when i use get_html. No text should be coming back outside of html tags. 

I have the following ContentFilters set up:
ContentFilters="ConvertCharactersToEntities,ConvertFontToSpan,ConvertToXhtml,FixUlBoldItalic,OptimizeSpans,RemoveScripts"

Also not sure if this is a big deal but the editor is in a jquery dialog and the content is set on button click like so:

if (content == "" || content == null || jQuery.trim(content) == "") {
    content = "<p>&nbsp;</p>";
 }
 
$("#telerik-editor").dialog("option", "title", title);
$("#telerik-editor").dialog("open");
 
var editor = $find("<%= radEditor.ClientID %>");           
editor.set_html(content);
 
$('input:visible').eq(0).trigger('focus');
 
setTimeout(function(){ 
    editor.setFocus(); 
    if ($telerik.isFirefox){ 
        setTimeout(function(){ 
            editor.pasteHtml(""); 
            editor.undo(1); 
        }, 200); 
    };               
},200);

i know there are some known issues with the version of firefox i am using (3.6.15) and the editor as you can tell by the focus trick needed to get it to work. I just want to see if there are any other ways to go about doing what i want. thanks
Dobromir
Telerik team
 answered on 18 Apr 2011
5 answers
119 views
I've noticed in Firefox 3.6.16 that after I click a noncheck button on the toolbar meant for single clicking purposes, an outline is formed around the button, and doesn't go away until I click somewhere else on the browser.  Is there a way to make it so the button doesn't stay outlined after I click it, so that it merely goes back to how it looked before it was clicked.  I've also noticed this doesn't happen in Internet Explorer.
Helen
Telerik team
 answered on 18 Apr 2011
2 answers
99 views
I have two ListView's on a page and I want to associate one with the other. That is, selecting an item in the first list view will then display related data in the second list view. I've Googled, but can't find a good example of this scenario.

Is there an example or sample code I can review to help me figure this out?

Thanks!
Mark
Mira
Telerik team
 answered on 18 Apr 2011
3 answers
192 views
Hello,

Can someone please tell me why my datasource is not updating when using the RadGrid?  I have read countless forum posts and still have been unable to solve the issue.  I wanted to use the AutomaticUpdate/Delete feature, because it appeared to be "simple".  I am using the grid to display a user's shopping cart contents.  All I want to be able to do is allow them to update the quantity of an item in the cart, or remove it....period.

Below is my code.  I have stripped it down to bare bones in hopes to find the problem, but still no luck.  This is driving me NUTS!

Any help would be greatly appreciated.

Thanks,
Jim


<%@ Control Language="VB" AutoEventWireup="false" CodeFile="shoppingcart.ascx.vb" Inherits="ctl_shoppingcart" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<script type="text/javascript">
    function showSubDetail(URL) {
        var oWnd = radopen(URL, "windowItemDetail");
    }
</script>
 
<div class="shoppingcart">
    <div class="heading">
        Current Items in Your Cart
    </div>
 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" EnableAJAX="true" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true">
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="lineID" DataSourceID="SqlDataSource1" EditMode="InPlace">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="editcolumn"></telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="quoteID" DataType="System.Int32" HeaderText="quoteID"
                    UniqueName="quoteID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="lineID" HeaderText="lineID" UniqueName="lineID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="enteredByContactID" HeaderText="enteredByContactID" UniqueName="enteredByContactID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="containersOrdered" HeaderText="containersOrdered" UniqueName="containersOrdered"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
    <br /><br />
 
    <telerik:RadButton ID="btnCheckout" Text="Checkout" runat="server">
    </telerik:RadButton>
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="windowItemDetail" CssClass="itemDetailWindow" 
            runat="server"
            Modal="true" Behaviors="Close"
            Animation="Fade" AnimationDuration="500"
            width="500" 
            Overlay="true"
            Title="Assorted Species Tray Detail"
            VisibleTitlebar="true" VisibleStatusbar="false">
        </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:RakerDBConnectionString %>"
        SelectCommand="spSelectQuoteDetailInfoByQuoteID" SelectCommandType="StoredProcedure"
        UpdateCommand="spUpdateQuoteDetailLineByCriteria" UpdateCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="quoteID" Type="Int32" DefaultValue="1229" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="quoteID" Type="Int32" />
            <asp:Parameter Name="lineID" Type="Int32" />
            <asp:Parameter Name="containersOrdered" Type="Int32" />
            <asp:Parameter Name="enteredByContactID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
 
</div>

Code-behind:

Imports System.Data
Imports Telerik.Web.UI
 
Partial Class ctl_shoppingcart
    Inherits System.Web.UI.UserControl
 
End Class
Georgi
Telerik team
 answered on 18 Apr 2011
4 answers
177 views
We'd have a system custom module for the editor that would contain large save/close buttons (not toolbar sizes) we'd like to show only when the editor is in full screen.  I can detect the full screen toggling, but need a way to show/hide the module via javascript.  Basically the same functionality that the Module Manager button does without the user clicking on that button and selecting/deselecting our module.

Any way to do this?
Rumen
Telerik team
 answered on 18 Apr 2011
1 answer
202 views
I seem to be having a problem controlling the visibility of a RadMenuItem using inline code. I have an "Admins Only" dropdown I want to display only if a session variable test is true. I swear this used to work, but as of 2010Q3 it is not. The sample line is:

<telerik:RadMenuItem runat="server" Text="Admin" Visible='<%# iif(session("UserID") = "1", "True", "False") %>'>


The page loads up fine, but no matter the content of the session variable (empty, "1", "2", nothing), the menu is always displayed.

Any suggestions?
Peter
Telerik team
 answered on 18 Apr 2011
3 answers
103 views
Is there a way to show a "Today" button in the bottom of the popup calendar in the Datepicker control? This is an important feature to our users.
Maria Ilieva
Telerik team
 answered on 18 Apr 2011
9 answers
167 views
Need to establish the relationship between the master table and detail tables. I am using "GridRelationFields" but because ajax error. When not using the "GridRelationFields" I click to expand the detail of a record and I get all the detailed tables of all records.

I mention that each detail table differ in the number of columns and their names, each table are aggregated in a programmatic way.
How I can successfully establish the relationship between the master table and detail table?

I noted the examples online and do not help me.
Annex the image of the error in AJAX when using "GridRelationFields. "

This is my code to build the tables in detail:

DataTable datTabDatosDetalle = new DataTable();
                    if (ViewState["OrdCompraProdDetallesSub" + IdOrdenCompra + Skucode] == null)
                    {
                        datTabDatosDetalle = CCSMovimientoProductos.BuscarProdDetOrdenCompra_CEDIS(IdOrdenCompra, Skucode).Tables[0];
                        ViewState.Add("OrdCompraProdDetallesSub" + IdOrdenCompra + Skucode, datTabDatosDetalle);
                    }
                    else
                        datTabDatosDetalle = (DataTable)ViewState["OrdCompraProdDetallesSub" + IdOrdenCompra + Skucode];
  
                    Telerik.Web.UI.GridTableView detailTable = new Telerik.Web.UI.GridTableView(radGriOrdComDetalles);
  
                    Telerik.Web.UI.GridRelationFields relationFields_Id = new Telerik.Web.UI.GridRelationFields();
                    relationFields_Id.MasterKeyField = "Id";
                    relationFields_Id.DetailKeyField = "Id";
                    detailTable.ParentTableRelation.Add(relationFields_Id);
  
                    Telerik.Web.UI.GridRelationFields relationFields_Skucode = new Telerik.Web.UI.GridRelationFields();
                    detailTable.ParentTableRelation.Add(relationFields_Skucode);
                    relationFields_Skucode.MasterKeyField = "prodSkucode";
                    relationFields_Skucode.DetailKeyField = "prodSkucode";
                      
                    radGriOrdComDetalles.MasterTableView.DetailTables.Add(detailTable);
  
                    detailTable.Name = "tabDetail" + IdOrdenCompra + Skucode;
                    detailTable.DataKeyNames = new string[] {"prodSkucode" };
                    detailTable.EnableViewState = true;
                    detailTable.NoDetailRecordsText = "";
                    detailTable.Caption = "Detalle del producto Sku " + Skucode;
                    detailTable.EditMode = Telerik.Web.UI.GridEditMode.InPlace;
  
                    foreach (DataColumn dc in datTabDatosDetalle.Columns)
                    {
                        Telerik.Web.UI.GridBoundColumn campo = new Telerik.Web.UI.GridBoundColumn();
                        detailTable.Columns.Add(campo);
                        campo.UniqueName = "col" + dc.ColumnName;
                        campo.HeaderText = "[ " + dc.ColumnName + " ]";
                        campo.HeaderStyle.Font.Bold = true;
                        campo.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                        campo.DataField = dc.ColumnName;
  
                        if (dc.ColumnName == "Id")
                        {
                            campo.Visible = false;
                        }
                        if (dc.ColumnName == "prodSkucode")
                        {
                            campo.Visible = false;
                        }
                        if (dc.ColumnName == "Talla")
                        {
                            campo.ReadOnly = true;
                        }
                    }
  
                    Telerik.Web.UI.GridEditCommandColumn campoEdit = new Telerik.Web.UI.GridEditCommandColumn();
                    detailTable.Columns.Add(campoEdit);
                    campoEdit.UniqueName = "colEdit";
                    campoEdit.ButtonType = Telerik.Web.UI.GridButtonColumnType.LinkButton;
                    campoEdit.EditText = "Editar";
                    campoEdit.UpdateText = "Actualizar";
                    campoEdit.CancelText = "Cancelar";
  
                    detailTable.DataSource = datTabDatosDetalle;
                    detailTable.Rebind();
                    radGriOrdComDetalles.Rebind();
Pavlina
Telerik team
 answered on 18 Apr 2011
1 answer
106 views
I have needed to change the standard menu sprite to have a few different thing one of which if the dividor image that is used by the rmLeftImage class. This i have done ok.

However when i hover over the top bar the image covers the area of the menu option and the new divide image.

What must i do to have only the menu option change background colour on the hover?
Kate
Telerik team
 answered on 18 Apr 2011
3 answers
97 views
Hi,

I want to create context menus on client side dynamically, does telerik context menu support this?

As I know, we can use
var _menu = $find('<%=Menu.ClientID%>');
to retrieve a context menu, this means we have to add a context menu at design time in html or create one at server side runtime, but how we can create a context menu in client side? 

I need to create context menus on client side, how I can reach this?

Thanks.
Helen
Telerik team
 answered on 18 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?