Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
145 views
When using the RadImageEditor on the iPad the image get loaded upside down. This happens in both the code I have developed and on the Telerik demo page.

Thanks,
Vessy
Telerik team
 answered on 23 Oct 2012
1 answer
105 views
Hi all,

i bound radcombo box with data table and my datatable return three columns but i want to get value of third column on selected index change event and not throught its properties like selected value or text but i want to get value using its item template container

Grower field value on selected index change

<

 

 

script language="javascript" type="text/javascript">

 

function ddl_Lookup_clientblur(sender, eventArgs) {

 

var text = sender.get_text();

 

var item = sender.findItemByText(text);

 

var inputElement = sender.get_inputDomElement();

 

if (!item)

sender.clearSelection();

}

</

 

 

script>

<%

 

--OnClientBlur="ddl_Lookup_clientblur" --%>

 

<asp:HiddenField ID="hidSourceid" runat="server" />

 

<telerik:RadComboBox ID="ddl_Lookup" runat="server" DropDownWidth="400px"

 

ItemsPerRequest="25" EnableLoadOnDemand="true" Width="324px" MarkFirstMatch="true"

 

EnableViewState="true" HighlightTemplatedItems="true" AllowCustomText="true"

 

EnableItemCaching="true" ShowMoreResultsBox="true"

 

ItemRequestTimeout="250" EnableVirtualScrolling="true"

 

DataTextField="IndentNo" DataValueField="IndentNo" OnItemsRequested="ddl_Lookup_ItemsRequested"

 

OnItemDataBound="ddl_Lookup_ItemDataBound" EmptyMessage="Please select IndentNo."

 

OnClientBlur="ddl_Lookup_clientblur"

 

onselectedindexchanged="ddl_Lookup_SelectedIndexChanged">

 

<HeaderTemplate>

 

<ul>

 

<li class="col1">Indent No.</li>

 

<li class="col1">Date</li>

<%

 

-- <li class="col1">GrowerType</li>--%>

 

<li class="col1">Grower</li>

 

</ul>

 

</HeaderTemplate>

 

<ItemTemplate>

 

<ul>

 

<li class="col1">

<%

 

# DataBinder.Eval(Container.DataItem, "IndentNo")%>

 

</li>

 

<li class="col1">

<%

 

# DataBinder.Eval(Container.DataItem, "IndentDate", "{0:" + ConfigurationManager.AppSettings["LongDatePattern"].ToString() + "}")%></li>

<%

 

-- <li class="col1">

<%# DataBinder.Eval(Container.DataItem, "GrowerType")%>

</li>--

 

 

%>

 

<li class="col1">

<%

 

# DataBinder.Eval(Container.DataItem, "Grower")%>

 

</li>

 

<%

 

-- <li class="col1">

<%# DataBinder.Eval(Container.DataItem, "DocumentDate", "{0:" + ConfigurationManager.AppSettings["LongDatePattern"].ToString() + "}")%></li>--

 

 

%>

 

</ul>

 

</ItemTemplate>

</

 

 

telerik:RadComboBox>

Nencho
Telerik team
 answered on 23 Oct 2012
1 answer
74 views
Is it possible to run RadScheduler using the WebService option outside of the intranet on an external IP that supposes https? 

If so, what is a viable solution for such implementation

I current use this code below in my web.config file to allow request to page that uses radscheduler on the public IP Address. And it work fine with http. 

<system.net>
   <defaultProxy>
       <proxy usesystemdefault="false"
       proxyaddress="http://xx.xxx.xx.xxx" bypassonlocal="true" />
   </defaultProxy>
</system.net>

 But when i keep i try to navigate to the https version of the site. I get the following exception:

HTTP Error 400. The request URL is invalid.

---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
   at System.Net.WebClient.UploadString(Uri address, String method, String data)
   at Telerik.Web.UI.SchedulerWebServiceClient.LoadResources(WebClient client, ResourcesPopulatingEventArgs args)
   --- End of inner exception stack trace ---
   at Telerik.Web.UI.SchedulerWebServiceClient.HandleWebException(WebException webEx)
   at Telerik.Web.UI.SchedulerWebServiceClient.LoadResources(WebClient client, ResourcesPopulatingEventArgs args)
   at Telerik.Web.UI.SchedulerWebServiceClient.GetResources()
   at Telerik.Web.UI.RadScheduler.BindResourcesFromWebService()
   at Telerik.Web.UI.RadScheduler.PerformSelect()
   at Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource)
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.FindControl(String id, Int32 pathOffset)


By the looks of it, it seem that the address provided in the proxyaddress is been used when the site is access from the https version.

Is there a solution to use radscheduler with webservice option on https that is not within a intranet, but rather on a public/external ip address
Bozhidar
Telerik team
 answered on 23 Oct 2012
0 answers
69 views
Hi Fellas

I have a user control with Calender control and a combobox thats gets populated on the basis of the the date in the Date field(Calender Control.)

This control is used in an aspx page which plots a chart(using Dundas charts) and a populates a grid,based on the selected item in combobox.
Issue is when on a date the combobox does not have any item(enabled=false),in that case the previous result needs to be cleared.
Now I dunno how to code the scenario.I need to set the visilbilty of the chart and grid on the aspx page to be false when the combobox on the ascx page is not enabled .
Please suggest solution.

Thanks!
Tarang.
Tarang
Top achievements
Rank 1
 asked on 23 Oct 2012
4 answers
103 views
I have a weird issue. I have a website with a web service as a folder under the website's root folder, and I have valdiateIntegratedModeConfiguration="false". When I tried to access the web service I would get errors regarding telerik controls. After some digging I found a few sites that seemed to resolve the problem. I added a <system.webServer> section in my web.config with just <validation validateIntegratedModeConfiguration="false"/> in it. Immediately below that I had <location path="." inheritInChildApplications="false"/>, followed by my original <system.webServer> section. I also added EnableHandlerDetection=false to all my RadScriptManager controls.

This all worked fine if I was on my company's network. However, if I tried to access the site from outside the network the filtering menu on the grid control would not appear when the filtering icon was clicked. I took these changes out of my web.config and everything works again.

I know that I can move the web service from underneath the web site and everything works just fine, but I would really like to figure out what is causing such different behavior depending upon where the user is residing.

Any suggestions as to what might be going on?

Thanks.
~Robin
Marin
Telerik team
 answered on 23 Oct 2012
1 answer
388 views
Hi! First of all, thanks for reading this post and try to help me. My problem is this: I have a RadGrid which has a GridTemplateColumn. Inside that column there is an asp:CheckBox. What I want to do is to press a button to add some rows in the radgrid and display the checkbox properly. The problem I facing is that if quantity of new rows are more quantity of rows before the addition, the checkboxes of the new rows are not showing. Ive prepared a small example of the problem (to emulate it you just need to create a Web Application called: "WebApplicationRadGridCheckBox" and paste the code below in the Default.aspx file -also, you need the telerik dll´s-). Then, just press the button "Add" and watch the result (remember that Ive used gridRowBound and gridRowCreated because you can´t use Eval in the client side).

Thank you very much. Matias.

Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplicationRadGridCheckBox._Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
     
</head>
<body>
    <telerik:RadScriptBlock ID="RadScriptBlockTipoDocumentoDetails" runat="server">
        <script type="text/javascript">
            function Add(sender, eventArgs) {
                var grid = $find("<%=RadGridTest.ClientID %>");
                var mt = grid.get_masterTableView();
                var items = mt.get_dataItems();
                var source = new Array();
                var item = { Field1: false, Field2: "new item 1!!!" };
                source[source.length] = item;
                var item2 = { Field1: false, Field2: "new item 2!!!" };
                source[source.length] = item2;
                mt.set_dataSource(source);
                mt.dataBind();
            }
            function gridRowBound (sender, args) {
                var checkbox = args.get_item().findElement("Field1");
                if (checkbox && checkbox != null) {
                    checkbox.checked = args.get_dataItem().Field1 == "True";
                }
            }
            function gridRowCreated (sender, args) {
                var checkbox = args.get_item().findElement("Field1");
                if (checkbox && checkbox != null) {
                    checkbox.checked = args._gridDataItem.getDataKeyValue("Field1") == "True";
                }
            }
        </script>
    </telerik:RadScriptBlock>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager1"/>
        <div>
            <telerik:RadButton ID="RadButton1" runat="server" Text="Add" OnClientClicked="Add" UseSubmitBehavior="false" AutoPostBack="false"/>
            <telerik:RadGrid ID="RadGridTest" runat="server" AutoGenerateColumns="false" AllowMultiRowSelection="true" Height="200px">
                <MasterTableView Caption="" ClientDataKeyNames="Field1,Field2" DataKeyNames="Field1,Field2">
                    <Columns>
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:CheckBox ID="Field1" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Field2" DataField="Field2"/>
                    </Columns>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true" >
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="True" SaveScrollPosition="True"/>
                    <ClientEvents   OnRowDataBound="gridRowBound"
                                    OnRowCreated="gridRowCreated"/>
                </ClientSettings>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>

Default.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace WebApplicationRadGridCheckBox
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<TestClass> lista = new List<TestClass>() { new TestClass() { Field1 = true, Field2 = "JOJO" } };
            RadGridTest.DataSource = lista;
            RadGridTest.DataBind();
        }
    }
    public class TestClass
    {
        public Boolean Field1 { get; set; }
        public String Field2 { get; set; }
    }
}


Radoslav
Telerik team
 answered on 23 Oct 2012
1 answer
62 views

Hi everybody and thanks for your help! Im facing this problem: Ive a Radgrid which has a GridTemplateColumn which has a CheckBox inside. In the page load 1 row is inserted in the radgrid and displayed properly. Then, there is a RadButton (which only Works in the client side). When pressed it binds the radgrid to a new datasource with 2 rows. The problem is that the first row is displayed correctly while the second row is missing the checkbox. I did not use Eval since the radgrid must be bind in the client side (then, Ive used gridRowBound and gridRowCreated). Ive prepared an example code to show exactly this problem: you just need to créate a Web Application “WebApplicationRadGridCheckBox” and modify the Default.aspx code with the code below.

Thank you very much! Matias

Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplicationRadGridCheckBox._Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    
</head>
<body>
    <telerik:RadScriptBlock ID="RadScriptBlockTipoDocumentoDetails" runat="server">
        <script type="text/javascript">
            function Add(sender, eventArgs) {
                var grid = $find("<%=RadGridTest.ClientID %>");
                var mt = grid.get_masterTableView();
                var items = mt.get_dataItems();
                var source = new Array();
                var item = { Field1: false, Field2: "new item 1!!!" };
                source[source.length] = item;
                var item2 = { Field1: false, Field2: "new item 2!!!" };
                source[source.length] = item2;
                mt.set_dataSource(source);
                mt.dataBind();
            }
            function gridRowBound (sender, args) {
                var checkbox = args.get_item().findElement("Field1");
                if (checkbox && checkbox != null) {
                    checkbox.checked = args.get_dataItem().Field1 == "True";
                }
            }
            function gridRowCreated (sender, args) {
                var checkbox = args.get_item().findElement("Field1");
                if (checkbox && checkbox != null) {
                    checkbox.checked = args._gridDataItem.getDataKeyValue("Field1") == "True";
                }
            }
        </script>
    </telerik:RadScriptBlock>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager1"/>
        <div>
            <telerik:RadButton ID="RadButton1" runat="server" Text="Add" OnClientClicked="Add" UseSubmitBehavior="false" AutoPostBack="false"/>
            <telerik:RadGrid ID="RadGridTest" runat="server" AutoGenerateColumns="false" AllowMultiRowSelection="true" Height="200px">
                <MasterTableView Caption="" ClientDataKeyNames="Field1,Field2" DataKeyNames="Field1,Field2">
                    <Columns>
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:CheckBox ID="Field1" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Field2" DataField="Field2"/>
                    </Columns>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true" >
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="True" SaveScrollPosition="True"/>
                    <ClientEvents   OnRowDataBound="gridRowBound"
                                    OnRowCreated="gridRowCreated"/>
                </ClientSettings>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>


Default.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplicationRadGridCheckBox
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<TestClass> lista = new List<TestClass>() { new TestClass() { Field1 = true, Field2 = "JOJO" } };
            RadGridTest.DataSource = lista;
            RadGridTest.DataBind();
        }
    }
    public class TestClass
    {
        public Boolean Field1 { get; set; }
        public String Field2 { get; set; }
    }
}

Radoslav
Telerik team
 answered on 23 Oct 2012
1 answer
227 views
hi

i have downloaded a skin called Metro Green ASPX Ajax from http://www.telerik.com/support/skins.aspx. After unzip, i copied and paste to the C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2012\Skins.

How come i don't see it listed in the skin property of a radgird? i can only see those usual skin like default, black, metro touch, hay and so on.

What else must i do? Thanks
Bozhidar
Telerik team
 answered on 23 Oct 2012
3 answers
103 views
hi, i have rad combobox in my web page that i defined it like this:
 <telerik:RadComboBox  DropDownWidth="220px" runat="server" ID="UnitCombo"> 
                    <HeaderTemplate>
                        <table cellpadding="0" width="200px" cellspacing="0">
                            <tr>
                                <td style=" width:100px" >unit</td>
                                <td style="width:100px">ReviseState</td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                     <table cellpadding="0" width="200px" cellspacing="0">
                            <tr>
                                <td style=" width:100px" >
                                    <%# DataBinder.Eval(Container,"Text") %>
                                </td>
                                <td style="width:100px">
                                      <%# DataBinder.Eval(Container,"Attributes['State']") %>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:RadComboBox>

i want to add new items to this radcombo in clientside so i wrote this code:
      function updateCombo(result) {
            var UnitCombo = $find("<%= UnitCombo.ClientID %>");
            var Comitems = UnitCombo.get_items();
            Comitems.clear();
            var items = result.split('|');
            for (var i = 0; i < items.length; i++) {
                var temp = items[i].split(',');
                UnitCombo.trackChanges();
                var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                comboItem.set_text(temp[0]);
                comboItem.get_attributes().setAttribute("State", temp[1]);

                UnitCombo.get_items().add(comboItem);
                UnitCombo.commitChanges();
            }
          
        }
items add to radcombo correctly but attribute part does not show,and no script error happen also
items in radcombo just show Unit part....
please help me..thanks
Nencho
Telerik team
 answered on 23 Oct 2012
3 answers
181 views

Hi

I have used Textbox in Web Address.
How to check Validation web address.
Below my coding and also see my screen shot.



<telerik:RadTextBox Width="95%" ID="WebAddress" AutoCompleteType="Disabled" runat="server" FocusedStyle-BackColor="Lavender"
                                                            Text='<%# Bind("webaddress") %>' MaxLength="50" onkeydown = "return (event.keyCode!=13);" CssClass="Lowercase1">
                                                        </telerik:RadTextBox>

<telerik:RadInputManager ID="RadInputManager1" runat="server" EnableEmbeddedSkins="false">
<telerik:RegExpTextBoxSetting ValidationExpression="^\w+([-+.']\w+)*\.\w+([-.]\w+)*$"
                                                            ErrorMessage="Web Address">
                                                            <TargetControls>
                                                                <telerik:TargetInput ControlID="WebAddress" />
                                                            </TargetControls>
                                                        </telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>


Thanks
Ansari
Kostadin
Telerik team
 answered on 23 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?