Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
401 views
Hi..

I'm looking to set the edit mode of a particular column.. I have Editforms Mode setup on rest of the RadGrid which I would like to retain.  I wish to load the page with this column in batch edit mode so I can type a reference and use this to extract information in each row..

How can I dynamically set the edit mode to batch for this particular column, whilst retaining the editforms mode for my other columns..?

Dave
Top achievements
Rank 1
 answered on 22 Dec 2014
1 answer
118 views
Hi All

This is my scenario

I have a RadGrid, then I have an EditFormTemplate and inside I have a RadListBox, I'm able to select a value from codebehind, but I want to scroll the ListBox to the selected when the EditForm is showing, I followed this post  but I'm not able to do it.

Here is my test code 

ASP
<telerik:RadGrid ID="Radgrid1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false"
    AutoGenerateEditColumn="true">
    <MasterTableView>
        <EditFormSettings EditFormType="Template">
        <PopUpSettings Width="620px" Modal="false" Height="550px" />
            <FormTemplate>
                <telerik:RadListBox ID="RadListBox1" runat="server" DataSource="DS" OnClientSelectedIndexChanged="selectedIndexChanged">
                </telerik:RadListBox>
            </FormTemplate>
        </EditFormSettings>
        <Columns>
            <telerik:GridBoundColumn DataField="OrderID" HeaderText="OrderID">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Code Behind
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
        If TypeOf e.Item Is GridDataItem Then
            Dim editItem As GridDataItem = DirectCast(e.Item, GridDataItem)      
            Dim ddlCurrency As RadListBox = DirectCast(editItem.FindControl("RadListBox1"), RadListBox)
 
            If ddlCurrency IsNot Nothing Then
                Dim item As RadListBoxItem = ddlCurrency.FindItemByText(strCurrency)
                If item IsNot Nothing Then
                    ddlCurrency.SelectedValue = hdnValue.Value
                End If
            End If
         End If
     End Sub

Javascript
function selectedIndexChanged(sender, args)
{
    var item = args.get_item();
    item.scrollIntoView();
}

I know that I can only use the scrollIntoView() inside JavaScript but the function  selectedIndexChanged is not firing, is there a way to scroll when I select the item in the code behind or server-side? 
Thanks in advance
Peter Filipov
Telerik team
 answered on 22 Dec 2014
3 answers
73 views
Hi,

i'm using the RadEditor control in a sharepoint 2010 publishing page and when the page loads are made two requests and the page takes a long time to load. Using firebug I can see that accessing the page 2 requests are made.

If i remove the control the page is properly loaded and only one request is made.

I'm using RadControls for ASP.NET Ajax Q1 2009  (Telerik.Web.UI, Version=2009.1.527.20.)
Ianko
Telerik team
 answered on 22 Dec 2014
4 answers
124 views
Well I'm struggling with a silly issue: a very simple form contains a tabstrip. If scrolling si enabled, then the tabs just dosn't show up!

Is this a bug or am I missing something simple ??? I've put together a test page that is as simple as possible that reproduces the problem. Can anyone tell me what's going on please ?

Here is the page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Page sans titre</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"   
        EnableTheming="True" OutputCompression="AutoDetect">  
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div> 
    <table width="100%">  
        <tr> 
            <td align="center">  
                <table> 
                    <tr> 
                        <td> 
                            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="7"   
                                Skin="Inox" Width="600px" ScrollButtonsPosition="Middle"   
                                ScrollChildren="True">  
                                <Tabs> 
                                    <telerik:RadTab runat="server" Text="Aspects physiques">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Aptitudes">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Projet">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Attentes">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Vie quotidienne">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Fiche Médicale">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Passeport">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Fiche Médicale" Selected="True">  
                                    </telerik:RadTab> 
                                    <telerik:RadTab runat="server" Text="Passeport">  
                                    </telerik:RadTab> 
                                </Tabs> 
                            </telerik:RadTabStrip> 
                            <telerik:RadEditor ID="RadEditor1" runat="server" Skin="WebBlue" ToolsFile="~/Xml/EditTools.xml" 
                                Language="fr-FR" EnableResize="False" Enabled="False">  
                                <Languages> 
                                    <telerik:SpellCheckerLanguage Code="fr-FR" Title="French" /> 
                                </Languages> 
                                <Content> 
                                </Content> 
                            </telerik:RadEditor> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
    </table> 
    </div> 
    </form> 
</body> 
</html> 
 
Peter Filipov
Telerik team
 answered on 22 Dec 2014
8 answers
141 views
If you have a RadDatePicker with a asp:RequiredFieldValidator and when the user clicks a different RadTabStrip it calls Page_ClientValidate, the validator returns true even if the field is blank.  However, it fails when you try to go back to the original tab causing you to never be able to fix the problem

Code below.  Steps to reproduce:

1) Blank out the date but leave the cursor in the field - do not tab out or hit enter or cause a blur() 
2) Click tab 2.  Tab 2 loads
3) Click tab 1.  Tab 1 does not load and you get a validation error "Close date is required"

I need this to work and do not know how to make it operate correctly in this case.  

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="Scriptmanager1" runat="server" />
        <script type="text/javascript">
            
            function ClientTabSelecting(sender, args) {
                //This is mandatory to do some other stuff.
                var isvalid = Page_ClientValidate();
                if (isvalid) {
                    //
                } else {
                    args.set_cancel(true);
                }
            }
        </script>
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" OnClientTabSelecting="ClientTabSelecting" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab ID="TAB1" Text="Tab 1" runat="server" PageViewID="HeaderPage" />
                <telerik:RadTab ID="TAB2" Text="Tab 2" runat="server"  />
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="HeaderPage" runat="server">
                <telerik:RadDatePicker ID="CloseDate1" runat="server" CausesValidation="True" SelectedDate="2014-11-1"></telerik:RadDatePicker>
                <asp:RequiredFieldValidator runat="server" Text="This field is mandatory" ControlToValidate="CloseDate1" ErrorMessage="Close date is required"></asp:RequiredFieldValidator>
            </telerik:RadPageView>
            <telerik:RadPageView ID="TransactionHistoryPage" runat="server">
                    You Should Never See This if the date entered is before 2014
                    <asp:Button runat="server" ID="Button1" CausesValidation="True"/>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
        <asp:ValidationSummary runat="server"  ID="summary" />
    </div>
    </form>
</body>
</html>
Vasil
Telerik team
 answered on 22 Dec 2014
1 answer
59 views
Hi there. 

We have a grid with DetailTables, all functioning properly. There is a request for the detailtable to be positioned just right of the row of the actual related row. Is this possible? Trying to come up with ideas or seeing if there is a way to do this through css. 

Thanks.

Roland
Eyup
Telerik team
 answered on 22 Dec 2014
1 answer
78 views
RadGrid Context menu not working for first 6 row, Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through


Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
Eyup
Telerik team
 answered on 22 Dec 2014
1 answer
93 views
Hello I am using Telerik.Web.UI  version 2014.1.403.40.
Buy i can not use the RadMap in my page.
getting 'Radmap' is not a Know element

what version do i have to use Radmap?

Thank you
Niko
Telerik team
 answered on 22 Dec 2014
1 answer
48 views
Hi,
 
 I am using RAD Grid for displaying and inserting records.

Each row I have one textbox and add button .Using button user can add N number of records.

Let us suppose that user is inserted 4 records(rows).In that 1st and 4 th row data is there 2nd and 3rd empty .If user submit that it shoud throw validation error message.
Let us suppose that in 4 records in that 1nd and 2nd data is there and 3rd and fourth empty ,but in this case it should allow to submit data.

so if there is any empty rows in between it should not allow to submit.But if there are empty rows in last(more than one) user can submit.

Please help me like how i can build the logic

Thanks
siddartha
Eyup
Telerik team
 answered on 22 Dec 2014
1 answer
171 views
Hello Expert,

I am getting an issue in disable auto correction of html element. 
I have a RadEditor where I want to get and set any none valid/formatted html element as like "<noclick> Somethings".
I tried to do this, my code taking none valid/formatted html element as like "<div>Hello World" and giving this same value in server side and I can save this value in database. Then I retrieve this html element from database and bid this html element to RadEditor.Content. But when I browse this page; I can see this value are showing as  <div>Hello World</div> in RadEditor . That's mean its adding end tag to correct html format. But I don't need to add this end tag in my html elements.

Here is my code:

<telerik:RadEditor ID="txtTextScript" runat="server" Font-Size="Larger" EditModes="Html" ContentAreaMode="Div" ContentFilters="None" Height="100" Width="349px">
     <Tools>
              <telerik:EditorToolGroup >
              </telerik:EditorToolGroup>
      </Tools>
</telerik:RadEditor> 

protected void Page_Load(object sender, EventArgs e){
        txtTextScript.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml);
}
 
I tried by following this link but still not working
http://www.telerik.com/forums/how-to-disable-auto-correction-of-html-elements?actionMode=replyThread


I am waiting for a quick response from someone.

Thanks
Aminul

 








Niko
Telerik team
 answered on 22 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?