Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
107 views
Hi,

I've read some threads concering paste issues with RadEditor control.
Unfortunately i haven't found solution to my issue. 
The problem arises when pasting the text from MS Word to RadEditor (in Mozilla Firefox 3.0.).
RadEditor is wrapped in the DetailsView and when i click the upload link the content is saved in the
database. When previewing the content in the Literal control (in IE 7) strange syntax is displayed:
<!--[if !supportLists]-->­       <!--[endif]-->

The problem is that IE doesnt recognize this as a comment (because of <!--[ instead of <!--) and
displays is as the text in the website. To make things clearer: The problem is that FF puts some 
additional html comments when pasting content from MS WORD. IE does not recognize that as 
a comment and displays it.

Things work just fine If i try the other way around (paste text from MS WORD in IE and preview it in FF).
Could someone help me with this issuse as it is annoying.

thx 
Rumen
Telerik team
 answered on 22 Dec 2008
3 answers
173 views

Hi,
I am using the RadGrid and use the EditFormTemplate for Add New Entry and update. Here we have two textbox and one label.  But my problem is -  I want to compute the total of two textbox in label in lost focus of any one of textbox from client side.
Dibyendu
Top achievements
Rank 1
 answered on 22 Dec 2008
1 answer
134 views
I added a swf file to the RAD content editor.
It was published OK.

However when I switched back and forth between design mode and html mode, the IE always crashed at the 2nd time switching to the html mode.
I tried 3 different flash swf files and 5 different browsers IE6.0 and IE 7.0, the result were the same

It seems the problem is caused by page refresh itself via Ajax callback. 

The error message is unhandled exception at 0x42ba579d in explorer.exe 0xc0000005. Access violation 0x00000000

appname ieexplorer.exe
modename mshtmled.dll

The windows media file works fine.




Stanimir
Telerik team
 answered on 22 Dec 2008
4 answers
235 views
When a specific button on the toolbar is pressed, I am using radprompt to solicit input from the user.
If they press OK, I want to retrieve the input text and pass it along to the server side code and if they cancel, do nothing.

I have everything working with the exception of being able to conditionally execute the server code based upon the user input.

Within the onclientbuttonclicked function I use .get_item().get_text to validate which button was pressed and then invoke radprompt, which displays and returns the input to the callback function but it also invokes my server-side code within the toolbar's _ButtonClick event. How can I make the _ButtonClick event conditional for this one button? (there are several buttons on the button bar, some conditional to user input, most are not).

 

function toolbarButtonClicked(sender, args) {  
    if (args.get_item().get_text() == "Close")  
        radprompt("Enter the resolution or press CANCEL if you do NOT want to CLOSE this ticket.", promptCallBackFn, 330, 110, sender, "Resolution", null);  
        return false;  
    }  
 
    function promptCallBackFn(arg) {  
    if (arg==null)  
        //do nothing  
    else   
        //execute server-side code in _ButtonClick event  
 
    } 
topry
Top achievements
Rank 1
 answered on 22 Dec 2008
2 answers
188 views
Hello,
I have a RadGrid with a column that is too large to display.
I would like a link where on mouse over a ToolTip will display the information.
The link would need to pass the row's value so the tool tip can load the right data.

Very similar to: http://demos.telerik.com/aspnet-ajax/ToolTip/Examples/ToolTipTreeView/DefaultCS.aspx
Not so much like: http://demos.telerik.com/aspnet-ajax/Controls/Examples/Integration/ToolTipGrid/DefaultCS.aspx?product=tooltip

Please show me a simple demo for this, thanks!
Aron
Top achievements
Rank 2
 answered on 22 Dec 2008
2 answers
593 views
This is all happening serverside in an ajax postback.

We are adding a new item(obeject) to our datasource, then calling grid.rebind().
Next we call this to select and set focus:

            grdAsmt.MasterTableView.FindItemByKeyValue("guid", guid).Selected = true;
            grdAsmt.MasterTableView.FindItemByKeyValue("guid", guid).Focus();

When the ajax event comes back the item it select, but not focused.  The grid row is selected, but it is not visible and we have to manually scroll it to see it.
M Fries
Top achievements
Rank 1
 answered on 22 Dec 2008
1 answer
131 views
edited: Title has to be: RadScriptManager and DotNetNuke

Hi,

i am evaluating the Telerik RadControls for ASP.NET.

My starting point was to enable radAjax by inserting the RadAjaxManager into one control.
The httphandler was created in the web.config in the sections system.web and system.webServer.

After requesting the page i get the following error:

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager.

My entries in the web.config are:

  <system.webServer> 
    <handlers> 
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
    </handlers> 
  </system.webServer> 
  <system.web> 
    <httpHandlers> 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" /> 
    </httpHandlers> 
  </system.web> 
 

Please could you give me a hint to solve the error?

Thanks,
McShorty
McShorty
Top achievements
Rank 1
 answered on 22 Dec 2008
1 answer
273 views
hello,
          i Have a two textbox and one rad combobox in Radgrid Editable item.....when i add new record first i select my combobox value
and generate new textbox runtime using javascript  ....
like this function


 function HandleEndChanging(sender, args)
    {

      sTable = "<table cellpadding=0 cellspacing=0  border=0 width=100%><tr><td>"
        if(sender.get_value()==sender.get_value())
        {
            sTable +="<div id=divremove"+ sender.get_value() + "><table cellpadding=0 cellspacing=0  border=0 width=100%>"
            sTable += "<tr><td align=center colspan =2><input type=hidden id=hidmetalist" + sender.get_value() + " value=" + sender.get_text()+ "></td></tr>"
            sTable += "<tr><td align=right valign=top width=40%>" + sender.get_text() + "&nbsp;:&nbsp;" + "</td><td align=left width=60%><textarea id=txtarea" + sender.get_value() + " style=width:270px ></textarea>&nbsp;&nbsp;<a id=removelink" +  sender.get_value() + " style=cursor:pointer;text-decoration:underline; onclick=fn_remove('"+ sender.get_value()+ "')>Remove</a></td></tr>"
            sTable +="</table></div>"
        }
        sTable += "</td></tr></table>"
        document.getElementById("DivIncrement").innerHTML += sTable

 }

(its working fine)

and i insert records using ajax function in the ( runtime genration textbox.).....

(its also working fine)


but some problem is there for validate default text boxes....

First i used requirefied validator.....it working but when i click update button runtime creation textboxes hide automatically ....



<EditFormSettings  EditFormType="Template"  >
                                            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                            <FormCaptionStyle CssClass="RadGridHeader"></FormCaptionStyle>
                                            <FormMainTableStyle BackColor="White" GridLines="Horizontal" CellPadding="3" Width="100%" CellSpacing="0"></FormMainTableStyle>
                                            <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" Height="110px" BackColor="White" />
                                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                            <EditColumn CancelText="Cancel edit" InsertText="Insert Order"  UniqueName="EditCommandColumn1" ButtonType="ImageButton" UpdateText="Update record">
                                            </EditColumn>
                                            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                                                <FormTemplate >
                                                    <table cellpadding="0"  cellspacing="0" width="100%" border="0">
                                                        <tr><td style="height:3px;" colspan ="2"></td></tr>
                                                        <tr>
                                                            <td align="right" colspan="2">
                                                               <asp:ImageButton ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' ImageUrl="~/Images/icons/Update.gif"
                                                                runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' OnClientClick="return fn_metaupdatechild()">
                                                                </asp:ImageButton>&nbsp;
                                                                <asp:ImageButton ID="Button1" Text="Cancel" runat="server" CausesValidation="False" ImageUrl="~/Images/icons/CancelEdit.gif"
                                                                CommandName="Cancel" OnClientClick="DeleteHiddenvalue()"></asp:ImageButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="53%">
                                                                <div id="Divadd"  runat="server">
                                                                    <table cellpadding ="0" cellspacing ="0" border ="0" align ="center" width ="100%" >
                                                                        <tr>
                                                                            <td width="30%" align="right">Name <font color="red" >*</font>:&nbsp;</td>
                                                                            <td align="left">
                                                                                <input type="hidden" id="hiddGetreffid" runat ="server" value='<%#Eval("metatagrefid") %>' />
                                                                                <asp:TextBox ID="txtName" runat="server" EnableTheming ="true" Text='<%#Eval("name") %>' ></asp:TextBox>&nbsp;
                                                                                <asp:RequiredFieldValidator ID="ReqName" CssClass="errormsg" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="Enter Name"></asp:RequiredFieldValidator>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" height="4px"></td></tr>
                                                                        <tr>
                                                                            <td width="30%" align="right" valign="top">Description <font color="red" >*</font>:&nbsp;</td>
                                                                            <td align="left" valign="top" width="70%">
                                                                                <asp:TextBox ID="txtDesciption" runat="server" EnableTheming ="true" Text='<%#Eval("description") %>' TextMode ="MultiLine" style="height:60px;width:200px;" ></asp:TextBox>&nbsp;
                                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" CssClass="errormsg" runat="server" ControlToValidate="txtDesciption" Display="Dynamic" ErrorMessage="Enter Desciption"></asp:RequiredFieldValidator>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" align="center">&nbsp;</td></tr>
                                                                        <tr>
                                                                            <td colspan="2" align="center" width="100%">
                                                                                <div id="divmulticombo">
                                                                                    <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                                                                                        <tr>
                                                                                            <td align="right" width="30%">New Metatag List <font color="red" >*</font>:&nbsp;</td>
                                                                                            <td align="left" width="70%">
                                                                                                <telerik:RadComboBox ID="RdcmpMetalist" runat="server" Width="200px" Height="220px"   MarkFirstMatch="True"  EnableVirtualScrolling="True"  OnClientSelectedIndexChanged="HandleEndChanging">
                                                                                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                                                                                </telerik:RadComboBox>&nbsp;
                                                                                                <asp:RequiredFieldValidator ID="ReqMetaList" CssClass="errormsg" runat="server" ControlToValidate="RdcmpMetalist" Display="Dynamic" ErrorMessage="Select Metatag List"></asp:RequiredFieldValidator>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </div>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" align="center">&nbsp;</td></tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                            <td width="47%" valign="top" align="left">
                                                                <div align="left" style="overflow:auto; height:150px; width:100%;">
                                                                     <table cellpadding ="0" cellspacing ="0">
                                                                            <tr>
                                                                                <td colspan="2" width="100%" align="left">
                                                                                    <div id="DivIncrement" align="left"></div>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2" width="100%" align="left">
                                                                                    <div id="DivEditRecordDisplay" align="left"></div>
                                                                                </td>
                                                                            </tr>
                                                                      </table>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr><td colspan="2" height="2px">&nbsp;</td></tr>                                           
                                                        <tr><td style="height:15px;" align="center" style ="padding-right:60px" colspan="2"><asp:label runat="server" ID="lblEditFormMsg"  CssClass="errormsg"></asp:label></td></tr>
                                                    </table>
                                                </FormTemplate>
                                            </EditFormSettings>




-----------------------------
*************      So i want all Editable items id to validate Client side .....
**************  how to get all editable items id...................


i get some id in internetExplorer (RadGrid1$ctl00$ctl02$ctl03$txtName) like this for this textbox( <asp:TextBox ID="txtName" runat="server" EnableTheming ="true" Text='<%#Eval("name") %>' ></asp:TextBox>)


(RadGrid1$ctl00$ctl02$ctl03$txtName) its working clientside validation in internet Explorer using javasript but ... Still it not Working Firefox......

its too urgend......Reply me immediately....

Thank you For your Advance Help.....






its my full coding



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ManageMetaTags.aspx.vb" EnableEventValidation="false"  Inherits="Clients_ManageMetaTags" Debug ="true"  %>

<%@ Register Assembly="Telerik.Web.UI" 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 runat="server">
    <title>Untitled Page</title>
</head>
<%--<script src="../Library.js" language="javascript" type="text/javascript"></script> --%>
<script language="javascript" type="text/javascript">
    function IsGridItemsSelected(Action)
    {
        if($find("<%= RadGrid1.MasterTableView.ClientID  %>").get_selectedItems().length <= 0)
        { 
            alert("Select MetaTag(s) to " + Action); 
            return false;
        }
        else
        {
            var MasterTable = $find("<%=RadGrid1.MasterTableView.ClientID %>");
            var Getmetaid = document.getElementById("hiddMetatagdeleteid");
            Getmetaid.value = ""
            var selectedRows = MasterTable.get_selectedItems();
            for (var i = 0; i < selectedRows.length; i++)
            {
                var newGetmetaid = MasterTable.getCellByColumnUniqueName(selectedRows[i], "metatagrefid")
                Getmetaid.value += "," + newGetmetaid.innerHTML;
            }
            if(Getmetaid.value != "")Getmetaid.value = Getmetaid.value.substring(1);
            return true;
        }
    }
    function HandleEndChanging(sender, args)
    {   
        var item = args.get_item();
        //alert(sender.get_text())
        //  alert(sender.get_value())
       
        if(sender.get_value()==0)
            {
                return false;
            }
        if(document.getElementById("hiddgetEditdropval").value != "")
        {
            var newchildEditval=document.getElementById("hiddgetEditdropval").value
            var GetSplitchildEditVal = newchildEditval.split(",")
            for(j = 0; j < GetSplitchildEditVal.length; j++)
            {
                if(sender.get_text()==GetSplitchildEditVal[j])
                {
                    alert("Already Selected")
                    return false;
                }
            }
        }
        var GetMultiples = sender.get_value()
        var newval=document.getElementById ("Hidnew").value
        var GetSplitVal = newval.split(",")
        for(i = 1; i < GetSplitVal.length; i++)
        {
            if(sender.get_value()==GetSplitVal[i])
            {
                alert("Already Selected")
                return false;
            }
        }
        document.getElementById ("Hidnew").value += "," + GetMultiples
        var alreadyopend=document.getElementById ("Hidoldmetaid").value
        var GetSplitoldVal = alreadyopend.split(",")
        for(k = 1; k < GetSplitoldVal.length; k++)
        {
            if(sender.get_value()==GetSplitoldVal[k])
            {
                document.getElementById("divremove"+ sender.get_value()).style.display="inline"
                return false;
            }
        }
        document.getElementById ("Hidoldmetaid").value += "," + GetMultiples
       
       
        sTable = "<table cellpadding=0 cellspacing=0  border=0 width=100%><tr><td>"
        if(sender.get_value()==sender.get_value())
        {
            sTable +="<div id=divremove"+ sender.get_value() + "><table cellpadding=0 cellspacing=0  border=0 width=100%>"
            sTable += "<tr><td align=center colspan =2><input type=hidden id=hidmetalist" + sender.get_value() + " value=" + sender.get_text()+ "></td></tr>"
            sTable += "<tr><td align=right valign=top width=40%>" + sender.get_text() + "&nbsp;:&nbsp;" + "</td><td align=left width=60%><textarea id=txtarea" + sender.get_value() + " style=width:270px ></textarea>&nbsp;&nbsp;<a id=removelink" +  sender.get_value() + " style=cursor:pointer;text-decoration:underline; onclick=fn_remove('"+ sender.get_value()+ "')>Remove</a></td></tr>"
            sTable +="</table></div>"
        }
        sTable += "</td></tr></table>"
        document.getElementById("DivIncrement").innerHTML += sTable
       
       
    } 
    function fn_remove(obj)
    {
        var newval1=document.getElementById ("Hidnew").value
        var GetSplitVal1 = newval1.split(",")
        var splitassign=""
        for(i = 1; i < GetSplitVal1.length; i++)
        {
            if(obj==GetSplitVal1[i])
            {
                document.getElementById ("divremove"+GetSplitVal1[i]).style.display="none"
                GetSplitVal1[i]=""
            }
            splitassign += "," + GetSplitVal1[i]
        }
        var splitcommo=""
        splitcommo =splitassign.split(",")
        var splitcommoassign=""
        for(j = 1; j < splitcommo.length; j++)
        {
        // alert(splitcommo[j])
            if(splitcommo[j]!="")
            {
                splitcommoassign += "," + splitcommo[j]
            }
        }
        document.getElementById ("Hidnew").value=""
        document.getElementById ("Hidnew").value=splitcommoassign
        //  alert(document.getElementById ("Hidnew").value)
    }
    function fn_metaupdatechild()
    {  
        if(document.getElementById("hiddtestforedit").value!="")
        {
            var EditNameID=document.getElementById("hiddtestforedit").value
            if(document.getElementById(EditNameID).value=="")
            {
                document.getElementById("divlblName").innerHTML ="Enter Name"
                return false;
            }
            if(document.getElementById("hiddtestforeDesc").value !="")
            {
                var EditDescID=document.getElementById("hiddtestforeDesc").value
                if(document.getElementById(EditDescID).value=="")
                {
                    document.getElementById("divlblDesc").innerHTML="Enter Description"
                    return false;
                }
            }
             var ChecknewduplicEdit=""
             var duplicat=""
             duplicat=document.getElementById("hiddcheck").value
             ChecknewduplicEdit=selectduplicatename(document.getElementById(EditNameID).value,document.getElementById("HidClientName").value,duplicat)
             if(ChecknewduplicEdit!=false)
                {  
                    document.getElementById("divlblName").innerHTML ="Name Exists"
                    return false;
                } 
        }
        if(document.getElementById("hiddcheck").value=="")
        {   if(document.getElementById("RadGrid1$ctl00$ctl02$ctl03$txtName").value=="")
            {
                document.getElementById("divlblName").innerHTML ="Enter Name"
                return false
            }
            else
            {
                document.getElementById("divlblName").innerHTML =""
            }
            if(document.getElementById("RadGrid1$ctl00$ctl02$ctl03$txtDesciption").value=="")
            {
                document.getElementById("divlblDesc").innerHTML="Enter Description"
                return false
            }
            else
            {
                document.getElementById("divlblDesc").innerHTML=""
            }
        }
        if(document.getElementById ("Hidnew").value !="")
        {
            var newval1=document.getElementById ("Hidnew").value
            var GetSplitVal1 = newval1.split(",")
            var splitassign=""
            for(j = 1; j < GetSplitVal1.length; j++)
            {
                if(document.getElementById("txtarea"+GetSplitVal1[j]).value=="")
                {
                    alert("Enter Selected Metatag Values")
                    return false
                }
            }
            var Checknewduplicate=""
            var duplicateeditid=""
            if(document.getElementById("hiddcheck").value=="")
             {
                Checknewduplicate=selectduplicatename(document.getElementById("RadGrid1$ctl00$ctl02$ctl03$txtName").value,document.getElementById("HidClientName").value,duplicateeditid)
             }
             if(Checknewduplicate!=false)
                {  
                    document.getElementById("divlblName").innerHTML ="Name Exists"
                    return false;
                } 
            var CleintNames = document.getElementById("HidClientName").value
            var Check = SelectMetamaxId(CleintNames)
            //alert(Check)
            var dropvalue= document.getElementById ("Hidnew").value
            var GetSplitVal = dropvalue.split(",")
            for(i = 1; i < GetSplitVal.length; i++)
            {
                var  metalistval=document.getElementById("hidmetalist"+GetSplitVal[i]).value
                var metadiscipval=document.getElementById("txtarea"+GetSplitVal[i]).value
                if(document.getElementById("hiddcheck").value=="")
                {
                InsertMetachildrecords(CleintNames,metalistval,metadiscipval,Check)
                }
                else
                {
                InsertMetachildrecords(CleintNames,metalistval,metadiscipval,document.getElementById("hiddcheck").value)
                }
            }
             if(document.getElementById("hiddcheck").value=="")
             {
                InsertMetaParentrecords(CleintNames,document.getElementById("RadGrid1$ctl00$ctl02$ctl03$txtName").value,document.getElementById("RadGrid1$ctl00$ctl02$ctl03$txtDesciption").value,Check)
             }
        }
       //check
           if(document.getElementById("hiddEditMetachildid").value=="" && document.getElementById ("Hidnew").value=="")
            {
                alert("Select Metatag List")
                return false
            }
           
          //edit old updateval for update Records  
        if(document.getElementById("hiddEditMetachildid").value!="")
        {
            var newvalt=document.getElementById("hiddEditMetachildid").value
            var GetSplitValt = newvalt.split(",")
            var splitassign=""
            for(m = 1; m < GetSplitValt.length; m++)
            {
                if(document.getElementById("txtEditarea"+GetSplitValt[m]).value=="")
                {
                    alert("Enter Selected Metatag Values")
                    return false
                }
            }
            var dropvaluek= document.getElementById("hiddEditMetachildid").value
            var GetSplitValk = dropvaluek.split(",")
            var CleintNamesk = document.getElementById("HidClientName").value
            for(n = 1; n < GetSplitValk.length; n++)
            {
                var metadiscipvalk=document.getElementById("txtEditarea"+GetSplitValk[n]).value
                var exits=UpdateMetachildrecords(CleintNamesk,metadiscipvalk,GetSplitValk[n])
            }
        }
      
    }
    function fn_changeName(cmp)
    {  
        var Check =""
        var duplicateeditid="" 
        if(document.getElementById(cmp.name).value!="")
        {
            document.getElementById("divlblName").innerHTML =""
        }
        document.getElementById ("HiddMetaName").value=cmp.name
        var Get = document.getElementById(cmp.name).value
        document.getElementById("hiddtestforedit").value=cmp.name
    }
    function fn_change(cmp)
    {
        if(document.getElementById(cmp.name).value!="")
        {
            document.getElementById("divlblDesc").innerHTML=""
        }
        document.getElementById("hiddtestforeDesc").value=cmp.name
    }
    function DeleteHiddenvalue()
    {
        document.getElementById("Hidnew").value=""
        document.getElementById("Hidoldmetaid").value=""
        document.getElementById("HiddMetaName").value=""
        document.getElementById("hiddEditMetachildid").value=""
        document.getElementById("hiddgetEditdropval").value=""
        document.getElementById("hiddEditmetarefid").value=""
        document.getElementById("hiddcheck").value=""
        document.getElementById("hiddtestforedit").value=""
    }
    function EditChildRecords(Metaref)
    {
        var DS = ""
        var sTable=""
        document.getElementById("hiddgetEditdropval").value=""
        document.getElementById("hiddEditMetachildid").value=""
        var metarefid=Metaref
        var metachildsid=""
        var metachildname=""
        document.getElementById("hiddcheck").value=metarefid

        var CleintNames = document.getElementById("HidClientName").value
        sTable = "<table cellpadding=0 cellspacing=0  border=0 width=100%><tr><td>"
        DS = selectChildRecord(metarefid,CleintNames)
        if(DS != null)  
        {
            if(DS.Tables[0].Rows.length > 0)
            {
                for(i=0;i<DS.Tables[0].Rows.length;i++)
                {
                    var DR = DS.Tables[0].Rows[i]
                    sTable +="<div id=divEditremove"+ DR.metatagchildid + "><table cellpadding=0 cellspacing=0  border=0 width=100%>"
                    sTable += "<tr><td align=center colspan =2><input type=hidden id=hidEditmetalist" + DR.metatagchildid + " value=" + DR.tagcaption + "></td></tr>"
                    sTable += "<tr><td align=center colspan =2><input type=hidden id=hidEditmetalistVal" + DR.metatagchildid + " value=" + DR.tagvalue + "></td></tr>"
                    sTable += "<tr><td align=right valign=top width=40%>" + DR.tagcaption + "&nbsp;:&nbsp;" + "</td><td align=left width=60%><textarea id=txtEditarea" + DR.metatagchildid + " style=width:270px>"+ DR.tagvalue +"</textarea>&nbsp;&nbsp;<a id=removeEditlink" +  DR.metatagchildid + " style=cursor:pointer;text-decoration:underline; onclick=fn_Editremove('"+ DR.metatagchildid+ "')>Remove</a></td></tr>"
                    sTable +="</table></div>"
                    metachildsid += "," + DR.metatagchildid
                    metachildname += "," + DR.tagcaption
                }
            }
        }
        sTable += "</td></tr></table>"
        document.getElementById("DivEditRecordDisplay").innerHTML += sTable
        //alert(metachildsid)
        //alert(metachildname)
        document.getElementById("hiddEditMetachildid").value=metachildsid
        document.getElementById("hiddgetEditdropval").value=metachildname
    }
    function fn_Editremove(metaref)
    {
        var metachildname=""
        var metarefid=metaref
        document.getElementById("hiddEditmetarefid").value=metarefid
        var CleintNames = document.getElementById("HidClientName").value
        Deletemetachild(metarefid,CleintNames)
        document.getElementById("divEditremove"+metarefid).style.display="none"
        var removechildcaption=document.getElementById("hidEditmetalist"+metarefid).value
        var newval=document.getElementById("hiddgetEditdropval").value
        var GetSplitVal = newval.split(",")
        for(j = 0; j < GetSplitVal.length; j++)
        {
            if(removechildcaption==GetSplitVal[j])
            {
                GetSplitVal[j]=""
            }
            metachildname += "," + GetSplitVal[j]
        }
        var splitcommo=""
        splitcommo =metachildname.split(",")
        var splitcommoassign=""
        for(k = 1; k < splitcommo.length; k++)
        {
            if(splitcommo[k]!="")
            {
                splitcommoassign += "," + splitcommo[k]
            }
        }
        document.getElementById("hiddgetEditdropval").value=""
        document.getElementById("hiddgetEditdropval").value=splitcommoassign
        var metachildnames=""
        var newvals=document.getElementById("hiddEditMetachildid").value
        var GetSplitVals = newvals.split(",")
        for(m = 0; m < GetSplitVals.length; m++)
        {
            if(metarefid==GetSplitVals[m])
            {
                GetSplitVals[m]=""
            }
            metachildnames += "," + GetSplitVals[m]
        }
        var splitcommos=""
        splitcommos =metachildnames.split(",")
        var splitcommoassigns=""
        for(n = 1; n < splitcommos.length; n++)
        {
            if(splitcommos[n]!="")
            {
                splitcommoassigns += "," + splitcommos[n]
            }
        }
        document.getElementById("hiddEditMetachildid").value=""
        document.getElementById("hiddEditMetachildid").value=splitcommoassigns
    }

</script>
    <body>
        <form id="form1" runat="server">
            <TPSiteMap:TNSiteMap ID="SiteMap1" runat="server" />
            <input type="hidden" id="hiddcheck" runat="server" value="" />
            <input type="hidden" id="Hidnew" runat="server" value="" />
            <input type="hidden" id="Hidoldmetaid" runat="server" value="" />
            <input type="hidden" id="HidClientName" runat="server" value="" />
            <input type="hidden" id="HiddMetaName" runat="server" value="" />
            <input type="hidden" id="hiddMetatagdeleteid" runat="server" value="" />
            <input type="hidden" id="hiddEditMetachildid" runat ="server" value="" />
            <input type ="hidden" id="hiddgetEditdropval" runat ="server" value="" />
            <input type="hidden" id="hiddEditmetarefid" runat ="server" value="" />
            <input type="hidden" id="hiddtestforedit" runat="server" value="" />
            <input type="hidden" id="hiddtestforeDesc" runat="server" value="" />
            <div>
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td style="height: 30px;padding-left:10px">
                        <span style="font-family:Verdana; font-size:10; font-weight:bold;"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                            <tr>
                                <td style="padding-left:10px">
                                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                                    </asp:ScriptManager>
                                    <telerik:RadAjaxManager id="RadAjaxManager1" runat="server">
                                        <AjaxSettings>
                                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                                <UpdatedControls>
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                                                    <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                                                </UpdatedControls>
                                            </telerik:AjaxSetting>
                                        </AjaxSettings>
                                    </telerik:RadAjaxManager>
                                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="50">
                                        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
                                    </telerik:RadAjaxLoadingPanel>
                                    <telerik:RadGrid ID="RadGrid1" CssClass="RadGrid" EnableTheming="False" EnableEmbeddedBaseStylesheet="False" AllowSorting="True" AllowMultiRowSelection="true" AllowMultiRowEdit="false"
                                        runat="server" Width="98%" ShowStatusBar="true" AllowPaging="True" AutoGenerateColumns="False" PageSize="5" AllowAutomaticDeletes="True" ClientSettings-AllowColumnsReorder="true"  >
                                        <ItemStyle CssClass="RadGridItem"></ItemStyle>
                                        <HeaderStyle CssClass="RadGridHeader"></HeaderStyle>
                                        <PagerStyle Mode="Slider" alwaysvisible="True" pagebuttoncount="5" CssClass="RadGridPager" HorizontalAlign="Left" ></PagerStyle>
                                        <ClientSettings EnablePostBackOnRowClick="false">
                                            <Selecting AllowRowSelect="true" />
                                        </ClientSettings>
                                        <MasterTableView CommandItemDisplay="Top" ClientDataKeyNames="metatagrefid"  DataKeyNames="metatagrefid" Width="100%" AutoGenerateColumns="False" NoMasterRecordsText="No Records found to display">
                                        <CommandItemTemplate>
                                            <table cellpadding ="0" cellspacing ="0" border ="0" width ="100%">
                                                <tr>
                                                    <td align="left" style="padding:10px;" valign="middle">
                                                        <table border="1" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>&nbsp;Filter : &nbsp;</td>
                                                                <td><asp:TextBox  autocomplete="off"  ID="txtSearch" runat="server" OnTextChanged="txtSearch_TextChanged" EnableTheming ="true"></asp:TextBox>&nbsp;
                                                                    <telerik:RadCombobox ID="rcbFieldName" runat="server"  AllowCustomText="True" width="140px" EmptyMessage="-------Select-------" CausesValidation="false">
                                                                        <Items>
                                                                            <telerik:RadComboBoxItem Text="Name" Value="Name" />
                                                                            <telerik:RadComboBoxItem Text="Description" Value="description" />
                                                                        </Items>
                                                                    </telerik:RadCombobox>&nbsp;
                                                                    <asp:ImageButton ID="btnSearch" runat="server" CommandName="btnSearch" ImageUrl="~/Images/icons/Search.gif" ImageAlign="Bottom"  CausesValidation="false"/>
                                                                </td>
                                                            </tr>
                                                       </table>
                                                    </td>
                                                    <td align="right" style="padding:10px;" valign="middle">
                                                        <table border="1" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>
                                                                    <asp:LinkButton Style="vertical-align: bottom" ID="btnEditSelected" runat="server"
                                                                    CommandName="EditSelected" CausesValidation="false"  OnClientClick="return IsGridItemsSelected('Edit')" Visible='<%# RadGrid1.EditIndexes.Count = 0 %>' ><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Edit.gif" /> Edit </asp:LinkButton>
                                                                    <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Save.gif" /> Update </asp:LinkButton>
                                                                    &nbsp;
                                                                    <asp:LinkButton ID="btnInsert" runat="server" CommandName="InitInsert" Visible='<%# Not RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Add.gif" /> Add </asp:LinkButton>&nbsp;
                                                                    <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" CausesValidation="false" Visible='<%# RadGrid1.EditIndexes.Count > 0 Or RadGrid1.MasterTableView.IsItemInserted %>' OnClientClick="DeleteHiddenvalue()"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Cancel.gif" /> Cancel</asp:LinkButton>
                                                                    &nbsp;&nbsp;
                                                                    <asp:LinkButton ID="btndelete"
                                                                    runat="server" CommandName="DeleteSelected" CausesValidation="false"   OnClientClick="javascript:return IsGridItemsSelected('Delete')? confirm('Confirm to delete'):false;" ><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Delet.gif" /> Delete </asp:LinkButton>
                                                                    &nbsp;&nbsp;&nbsp;
                                                                    <asp:LinkButton ID="btnrefresh" runat="server" OnClick="clrFilters_Click" ><img style="border:0px;vertical-align:middle;" alt="" src="../Images/icons/Refresh.gif" /> Refresh </asp:LinkButton>
                                                                </td>
                                                           </tr>
                                                       </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <telerik:GridTemplateColumn UniqueName="SrlNo" AllowFiltering="False">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSrlNo"  runat="server" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridClientSelectColumn UniqueName="column">
                                                <ItemStyle Width="10px" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                <HeaderStyle Width="10px" HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
                                            </telerik:GridClientSelectColumn>
                                            <telerik:GridBoundColumn DataField="metatagrefid" UniqueName="metatagrefid"  ReadOnly="True" Display="false" ></telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn  DataField="Name" UniqueName="Name" SortExpression="Name" HeaderText="Name" ShowSortIcon="False"  >
                                                <ItemStyle HorizontalAlign="Left"></ItemStyle>
                                                <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="description" UniqueName="description" HeaderText="Description" ShowSortIcon="false" >
                                                <ItemStyle HorizontalAlign="Left" />
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                        <EditFormSettings  EditFormType="Template"  >
                                            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                            <FormCaptionStyle CssClass="RadGridHeader"></FormCaptionStyle>
                                            <FormMainTableStyle BackColor="White" GridLines="Horizontal" CellPadding="3" Width="100%" CellSpacing="0"></FormMainTableStyle>
                                            <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" Height="110px" BackColor="White" />
                                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                            <EditColumn CancelText="Cancel edit" InsertText="Insert Order"  UniqueName="EditCommandColumn1" ButtonType="ImageButton" UpdateText="Update record">
                                            </EditColumn>
                                            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                                                <FormTemplate >
                                                    <table cellpadding="0"  cellspacing="0" width="100%" border="0">
                                                        <tr><td style="height:3px;" colspan ="2"></td></tr>
                                                        <tr>
                                                            <td align="right" colspan="2">
                                                                <asp:ImageButton ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' ImageUrl="~/Images/icons/Update.gif"
                                                                runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' OnClientClick="return fn_metaupdatechild()">
                                                                </asp:ImageButton>&nbsp;
                                                                <asp:ImageButton ID="Button1" Text="Cancel" runat="server" CausesValidation="False" ImageUrl="~/Images/icons/CancelEdit.gif"
                                                                CommandName="Cancel" OnClientClick="DeleteHiddenvalue()"></asp:ImageButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td width="53%">
                                                                <div id="Divadd"  runat="server">
                                                                    <table cellpadding ="0" cellspacing ="0" border ="0" align ="center" width ="100%" >
                                                                        <tr>
                                                                            <td width="30%" align="right">Name <font color="red" >*</font>:&nbsp;</td>
                                                                            <td align="left">
                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                    <tr>
                                                                                        <td>
                                                                                            <input type="hidden" id="hiddGetreffid" runat ="server" value='<%#Eval("metatagrefid") %>' />
                                                                                            <asp:TextBox ID="txtName" runat="server" EnableTheming ="true" Text='<%#Eval("name") %>' onchange="fn_changeName(this)"></asp:TextBox>&nbsp;
                                                                                        </td>
                                                                                        <td valign="middle">
                                                                                            <div id="divlblName" class="errormsg"></div>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" height="4px"></td></tr>
                                                                        <tr>
                                                                            <td width="30%" align="right" valign="top">Description <font color="red" >*</font>:&nbsp;</td>
                                                                            <td align="left" valign="top" width="70%">
                                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                                    <tr>
                                                                                        <td>
                                                                                            <asp:TextBox ID="txtDesciption" runat="server" EnableTheming ="true" Text='<%#Eval("description") %>' TextMode ="MultiLine" style="height:60px;width:200px;" onchange="fn_change(this)"></asp:TextBox>&nbsp;
                                                                                        </td>
                                                                                        <td valign="bottom" align="left">
                                                                                            <div id="divlblDesc" class="errormsg"></div>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" align="center">&nbsp;</td></tr>
                                                                        <tr>
                                                                            <td colspan="2" align="center" width="100%">
                                                                                <div id="divmulticombo">
                                                                                    <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                                                                                        <tr>
                                                                                            <td align="right" width="30%">New Metatag List <font color="red" >*</font>:&nbsp;</td>
                                                                                            <td align="left" width="70%">
                                                                                                <telerik:RadComboBox ID="RdcmpMetalist" runat="server" Width="200px" Height="220px"   MarkFirstMatch="True"  EnableVirtualScrolling="True"  OnClientSelectedIndexChanged="HandleEndChanging">
                                                                                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                                                                                </telerik:RadComboBox>&nbsp;
                                                                                                <asp:RequiredFieldValidator ID="ReqMetaList" CssClass="errormsg" runat="server" ControlToValidate="RdcmpMetalist" Display="Dynamic" ErrorMessage="Select Metatag List"></asp:RequiredFieldValidator>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </div>
                                                                            </td>
                                                                        </tr>
                                                                        <tr><td colspan ="2" align="center">&nbsp;</td></tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                            <td width="47%" valign="top" align="left">
                                                                <div align="left" style="overflow:auto; height:150px; width:100%;">
                                                                     <table cellpadding ="0" cellspacing ="0">
                                                                            <tr>
                                                                                <td colspan="2" width="100%" align="left">
                                                                                    <div id="DivIncrement" align="left"></div>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2" width="100%" align="left">
                                                                                    <div id="DivEditRecordDisplay" align="left"></div>
                                                                                </td>
                                                                            </tr>
                                                                      </table>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr><td colspan="2" height="2px">&nbsp;</td></tr>                                           
                                                        <tr><td style="height:15px;" align="center" style ="padding-right:60px" colspan="2"><asp:label runat="server" ID="lblEditFormMsg"  CssClass="errormsg"></asp:label></td></tr>
                                                    </table>
                                                </FormTemplate>
                                            </EditFormSettings>
                                            <ExpandCollapseColumn>
                                                <HeaderStyle Width="20px"></HeaderStyle>
                                            </ExpandCollapseColumn>
                                            <RowIndicatorColumn>
                                                <HeaderStyle Width="20px"></HeaderStyle>
                                            </RowIndicatorColumn>
                                        </MasterTableView>
                                        <FilterMenu EnableTheming="True" Skin="WebBlue" enableembeddedbasestylesheet="False">
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </FilterMenu>
                                        <AlternatingItemStyle CssClass="RadGridItem"></AlternatingItemStyle>
                                        <SortingSettings  SortToolTip="Click here to sort"></SortingSettings>
                                    </telerik:RadGrid>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" height="20px">
                                    <asp:Label ID="lblMsg" runat="server" CssClass="errormsg"></asp:Label><br />
                                </td>
                            </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </form>
    </body>
</html>












1)
Iana Tsolova
Telerik team
 answered on 22 Dec 2008
3 answers
160 views
Trying to invoke ExportToPdf function on a radEditor, but runs into errors that say the xhtml has to be valid. I'm normally a huge fan of valid xhtml/css code, however, my users, many of which are non-technical, are using the radEditor. They often cut and paste MS Word content into the window. I want to be able to possibly export the contents to PDF using the builtin function, but it requires all the content to be valid xhtml. Is there a way to turn off this requirement? To try and get the users to convert their content via the radEditor tools into Valid xhtml is going to be next to impossible. Also it appears through the conversion function that it does not allow the developer to set the header xhtml? i.e. before running .ExportToPDF, i would like to attach my print stylesheet to the contents for use when it converts over to PDF for proper printing. Am I doing something wrong here, or is this not possible?

Thanks,

Paul
Rumen
Telerik team
 answered on 22 Dec 2008
1 answer
158 views

Discovered this last week.

The first time browser access a page with RadSplitter(s) in it, the element RAD_SPLITTER_PANE_CONTENT_xxxxx_uxRadPane does not have CSS width property. When the user issued a post back the CSS width property back to RAD_SPLITTER_PANE_CONTENT_xxxxx_uxRadPane.

This behaviour does not cause any layout problem in left to right layout but will sure affect right to left layout. In my project right to left layout is totally displaced and I have to manually use JavaScript to issue a form post back to hack it right.

By the way this issue/bug seems only affect IE. Other browsers are fine with or without JavaScript hack.

 

Svetlina Anati
Telerik team
 answered on 22 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?