Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
349 views
Hello,
I have created an aspx page, the image was attached to this post. I put a table in html and I put the label radcombobox two and a radtextbox. The theme I use is the "silk". Now as you can see from the attached, the combobox not only aligned to radtextbox. I set the values ​​for padding and margin to zero but nothing. Also sending the html code.
How can I align everything correctly?

<table style="width: 662px;padding:0px;margin:0px">
           <tr>
               <td style="width: 102px;padding:0px;margin:0px;">
                   <asp:Label ID="Label3" runat="server" Text="Tipo alloggiato:" Width="102px"></asp:Label>
               </td>
               <td style="width: 150px;padding:0px;margin:0px;">
                   <telerik:RadComboBox ID="tipoalloggiato" Runat="server" Culture="it-IT" Skin="Silk" Width="130px">
                       <Items>
                           <telerik:RadComboBoxItem runat="server" Text="Ospite singolo" Value="16" />
                           <telerik:RadComboBoxItem runat="server" Text="Capo famiglia" Value="17" />
                           <telerik:RadComboBoxItem runat="server" Text="Capo gruppo" Value="18" />
                       </Items>
                   </telerik:RadComboBox>
               </td>
               <td style="width: 105px;padding:0px;margin:0px">
                   <asp:Label ID="Label4" runat="server" Text="nr. componenti:" Width="105px"></asp:Label>
               </td>
               <td style="width: 70px;padding:0px;margin:0px">
                   <telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server" Culture="it-IT" DbValueFactor="1" LabelWidth="0px" Skin="Silk" Value="1" Width="50px" DataType="System.Int32" MaxLength="4">
                       <NumberFormat ZeroPattern="n" DecimalDigits="0" DecimalSeparator="."></NumberFormat>
                       <DisabledStyle Font-Underline="False" HorizontalAlign="Right" />
                   </telerik:RadNumericTextBox>
               </td>
               <td style="width: 85px;padding:0px;margin:0px">
                   <asp:Label ID="Label5" runat="server" Text="Tipo gruppo:" Width="85px"></asp:Label>
               </td>
               <td style="width: 160px;padding:0px;margin:0px">
                   <telerik:RadComboBox ID="tipogruppo" Runat="server" Skin="Silk">
                   </telerik:RadComboBox>
               </td>
           </tr>
           </table>
Magdalena
Telerik team
 answered on 26 Jun 2013
3 answers
1.0K+ views
Okay, I've a List<String> object and RadCombobox.Items collection. I want to check all items whose values fall in that List.

Above all, this does not actually check those items, even if the condition in the "if statement" seems to be satisfied and it does execute the if block w/o any errors.

I'd love to get this doing by LINQ in a bit more efficient manner than that of below (100s of items folks, that's why I'm thinking of this as a reasonable thing to do)

I tried the Intersect but evidently, I can not compare RadComboBoxItem with a string even if I do so
 
IEnumerable<string> AdditionalCategoryTypes = LoadAdditionalCategoryTypes(thisObj.ProductID);
foreach (string val in AdditionalCategoryTypes)
{
    if (ddAdditionalCategoryTypes.Items.FindItemByValue(val) != null)
        ddAdditionalCategoryTypes.Items.FindItemByValue(val).Checked = true;
}



Thanks you much,
-Aarsh
Nencho
Telerik team
 answered on 26 Jun 2013
5 answers
200 views
hi community,

I have been looking for a solution to swap docks between two zones.

The moment I drop dock from zone 2 to zone 1 i need dock from zone 1 should come to dock 2 . (Similar  to radgrid column swapping)


Thanks Guys,
SJ



Slav
Telerik team
 answered on 26 Jun 2013
1 answer
490 views
hello friends,

  I want to get value of bound column in itemcommand event in rad grid how can i do this?
Shinu
Top achievements
Rank 2
 answered on 26 Jun 2013
1 answer
44 views
Hello!

Ive come across a weird problem, Everytime I try to edit my form, the textboxes are in various width. Ive tried sorting this out by iterating thorugh Render.Columns and set the item.Width, with no result.

Eg something like this: 
 if (e.Item is GridEditableItem && e.Item.IsInEditMode)
                {
                    foreach (GridEditFormItem EdItem in rgRadGrid1.Columns)
                    {
                        EdItem.Width = System.Web.UI.WebControls.Unit.Pixel(300);
                    }
}

Ofc this piece of code with yield errors due to the difference of GridEditFormItem and the columns from my rgRadGrid1.

Any idea how to solve this? I ve been stuck for the last hour:) Appreciate any help! (I've tried searching for a solution, but couldn't find anything.)
Princy
Top achievements
Rank 2
 answered on 26 Jun 2013
5 answers
93 views
I cannot find the API reference for the Telerik.Web.UI.RadAsyncUpload (I mean the one under RadControls/API Reference/Telerik.Web.UI Namespace).
Neither in online help, nor in the downloaded offline version.
Yesterday I updated to last version, but still can't find API documentation.
Is it missing?

For example I see in the online demo (Ajaxified grid) that there's a server side event ValidatingFile, but no documentation on it and the VS properties panel does not show it among available events.

Thanks
Kate
Telerik team
 answered on 26 Jun 2013
1 answer
104 views
Hi,

Attached screen is taken from Telerik demo site. Here I set StartTime and EndTime properties of TimePicker control to 8 to 17.

When I select time from popup and then use arrow keys to change time then I can see all time from 0 to 24.

I want to prevent that. Please reply fast.

Regards,
Nehal 
Vasil
Telerik team
 answered on 26 Jun 2013
1 answer
91 views
Hi everyone,

Please tell me how to hide paging control in the radgrid when the user opens either edit or insert form in the usercontrol.

Thank you,
Chi Ming
Princy
Top achievements
Rank 2
 answered on 26 Jun 2013
3 answers
119 views

Hi Telerik Team,

There is Feature available in Editor when we  click the "Paste from Word" the content is copied in to Editor but i want in Code behind.
Reason being that , our client want that when click any word document(.doc,.docx) that content is available in Editor with formatted data display.Once he Edits/Update the data that Content is save in to the Word file.

Please help
kamii47
Top achievements
Rank 1
 answered on 26 Jun 2013
0 answers
212 views
Hello, 
I'm now developing a product entry with RadListView.
RadListView InsertItemTemplate contains three textboxes ,one RadAutoCompleteBox and two command buttons.
RadAutoCompleteBox is use to choose or add new tag for each products. I.e AllowCustomEntry is true.

There are two textboxes outside of RadListView. 
Those two textboxes and RadListView exists under different asp panels.

And there are 2 RadInputManager controls. One RadInputManager is for two textbox outside of RadListView and another one is for 
controls inside of RadListView templates. Both are used to validate Empty data.

There is another Button inside RadListView LayoutTemplate to trigger InsertItemTemplate to appear.
When I click that button, there are two javascript errors:
Uncaught TypeError: Object #<Object> has no method 'toUpperCase'  
Uncaught TypeError: undefined is not a function from Telerik.Web.UI.WebResource.axd:6.
Then, RadAutoCompletebox stopped working. It does nothing when I type ";" Delimiter.
I can't even see it's EmptyMessage.

These errors occur when there is no data in RadListView datasource.
If I manually add some records to ListView's datasource, it works like normal.

And also there is no errors if I remove RadInputManager for outside controls.
I don't know whether there is some conflict with RadInputMangager.and RadAutoCompleteBox.

I reproduced the error in sample page and you can see below.
There are some commented lines inside GetSampleData() function.
Uncomment them and there will be no errors on Button click.

SampleWebPage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SampleWebPage.aspx.cs" Inherits="CMMS.SampleWebPage"
     %>
 
<!DOCTYPE html>
 
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadSkinManager ID="RadSkinManager" runat="server" Skin="Hay" />
        <telerik:RadAjaxManager ID="ctl00_ajaxManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pnlProducts">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager_TemplateControls" UpdatePanelRenderMode="Inline" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="pnlOthers">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager1" UpdatePanelRenderMode="Inline" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <div>
            <telerik:RadAjaxLoadingPanel ID="ajaxloading" runat="server"
                IsSticky="true" Transparency="20" Skin="">
            </telerik:RadAjaxLoadingPanel>
 
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="ajaxloading">
                <asp:Panel ID="pnlOthers" runat="server">
                    <table>
                        <tr>
                            <td>Host Code:
                            </td>
                            <td>
                                <asp:TextBox ID="txtHostCode" runat="server" Width="300" ValidationGroup="gp1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Host Name:
                            </td>
                            <td>
                                <asp:TextBox ID="txtHostName" runat="server" Width="300" ValidationGroup="gp1" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <br />
                <asp:Panel ID="pnlProducts" runat="server">
                    <telerik:RadListView ID="lvProducts" runat="server" ItemPlaceholderID="ProductsContainer"
                        DataKeyNames="ID" AllowPaging="true" Width="500"
                        OnItemCreated="lvProducts_ItemCreated"
                        OnNeedDataSource="lvProducts_NeedDataSource"
                        OnItemCommand="lvProducts_ItemCommand">
                        <LayoutTemplate>
                            <fieldset>
                                <legend>Products and Services
                                </legend>
                                <asp:PlaceHolder ID="ProductsContainer" runat="server"></asp:PlaceHolder>
                                <div style="clear: both" />
                                <div>
                                    <telerik:RadButton ID="btnInitInsert" runat="server" Text="Insert new product"
                                        CommandName="<%# RadListView.InitInsertCommandName %>" ButtonType="LinkButton"
                                        OnClick="btnProductInitInsert_Click" />
                                </div>
                                </table>
                            </fieldset>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <fieldset>
                                <table>
                                    <tr>
                                        <td style="width: 100px;">Product Code:
                                        </td>
                                        <td>
                                            <%#Eval("Code")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Product Name:
                                        </td>
                                        <td>
                                            <%#Eval("Name") %>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Description:
                                        </td>
                                        <td>
                                            <%# Eval("Description")%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Tags:
                                        </td>
 
                                        <td>
                                            <asp:Label ID="lblTagString" runat="server" Visible="false" Text='<%#Bind("TagString")%>' />
                                            <telerik:RadAutoCompleteBox ID="racTag" runat="server" AllowCustomEntry="true"
                                                InputType="Token" Width="607" Enabled="false">
                                            </telerik:RadAutoCompleteBox>
 
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </ItemTemplate>
                        <InsertItemTemplate>
                            <fieldset>
                                <legend>New Product
                                </legend>
                                <table>
                                    <tr>
                                        <td style="width: 100px">Code<b style="color: Red">*</b>:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCode" runat="server" Text='<%# Bind("Code") %>' Width="300px" ValidationGroup="gp2"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Name<b style="color: Red">*</b>:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>' Width="300px" ValidationGroup="gp2"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Description<b style="color: Red">*</b>:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtDescription" runat="server" Text='<%#Bind("Description")%>' ValidationGroup="gp2"
                                                Width="500px" Height="60" TextMode="MultiLine" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Tags:
                                        </td>
                                        <td>
                                            <telerik:RadAutoCompleteBox ID="racTag" runat="server" AllowCustomEntry="true"
                                                EmptyMessage="Enter tag names separated by semicolon ( ; )" InputType="Token" Width="507" DropDownWidth="300"
                                                DataTextField="tag_value" DataValueField="ID">
                                            </telerik:RadAutoCompleteBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right;" colspan="2">
                                            <telerik:RadButton ID="btnPerformInsert" runat="server" Text="Insert" CommandName="<%# RadListView.PerformInsertCommandName %>" Width="70" ButtonType="LinkButton"
                                                CausesValidation="true" ValidationGroup="gp2" />
                                            <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" CommandName="<%# RadListView.CancelCommandName %>" CausesValidation="false" Width="70" ButtonType="LinkButton" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </InsertItemTemplate>
                        <EmptyDataTemplate>
                            <fieldset>
                                <legend>Products and Services
                                </legend>
                                <fieldset>
                                    No data to display!
                                </fieldset>
                                <telerik:RadButton ID="btnInitInsert" runat="server" Text="Insert new product"
                                    OnClick="btnProductInitInsert_Click" CommandName="<%# RadListView.InitInsertCommandName %>" ButtonType="LinkButton" />
                            </fieldset>
                        </EmptyDataTemplate>
                    </telerik:RadListView>
                </asp:Panel>
            </telerik:RadAjaxPanel>
 
            <telerik:RadInputManager runat="server" ID="RadInputManager1">
                <telerik:TextBoxSetting BehaviorID="txtbeh" InitializeOnClient="true" ErrorMessage="Required field!"
                    Validation-ValidationGroup="gp1" Validation-IsRequired="true">
                    <TargetControls>
                        <telerik:TargetInput ControlID="txtHostCode" />
                        <telerik:TargetInput ControlID="txtHostName" />
                    </TargetControls>
                </telerik:TextBoxSetting>
            </telerik:RadInputManager>
            <telerik:RadInputManager runat="server" ID="RadInputManager_TemplateControls">
                <telerik:TextBoxSetting BehaviorID="txtbeh2" InitializeOnClient="true" ErrorMessage="Required field!"
                    Validation-ValidationGroup="gp2" Validation-IsRequired="true">
                </telerik:TextBoxSetting>
            </telerik:RadInputManager>
        </div>
    </form>
</body>
</html>

SampleWebPage.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace CMMS
{
    public partial class SampleWebPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                LoadProductListView();
                lvProducts.DataBind();
            }
        }
 
        private void LoadProductListView()
        {
            lvProducts.DataSource = GetSampleData();
        }
 
        private DataTable GetSampleData()
        {
            DataTable l_Table = new DataTable("Sample");
            l_Table.Columns.Add("ID");
            l_Table.Columns.Add("Code");
            l_Table.Columns.Add("Name");
            l_Table.Columns.Add("Description");
            l_Table.Columns.Add("TagString");
 
 
           //l_Table.Rows.Add(new string[] { "1", "Code1", "Name1", "Description1", "" });
            //l_Table.Rows.Add(new string[] { "2", "Code2", "Name2", "Description2", "" });
            //l_Table.Rows.Add(new string[] { "3", "Code3", "Name3", "Description3", "" });
 
            return l_Table;
        }
        protected void btnProductInitInsert_Click(object sender, System.EventArgs e)
        {
            lvProducts.ShowInsertItem();
            lvProducts.FindControl("btnInitInsert").Visible = false;
        }
 
        protected void lvProducts_ItemCommand(object sender, RadListViewCommandEventArgs e)
        {
            if (e.CommandName == RadListView.CancelCommandName)
            {
                HideProductInsertItemTemplate();
            }
        }
 
        private void HideProductInsertItemTemplate()
        {
            lvProducts.InsertItemPosition = RadListViewInsertItemPosition.None;
            lvProducts.FindControl("btnInitInsert").Visible = true;
        }
 
        protected void lvProducts_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
        {
            LoadProductListView();
        }
 
        protected void lvProducts_ItemCreated(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item is RadListViewInsertItem && e.Item.IsInEditMode)
            {
                TextBox l_Code = e.Item.FindControl("txtCode") as TextBox;
                TextBox l_Name = e.Item.FindControl("txtName") as TextBox;
                TextBox l_Desc = e.Item.FindControl("txtDescription") as TextBox;
 
                TextBoxSetting l_textboxSetting = (TextBoxSetting)RadInputManager_TemplateControls.GetSettingByBehaviorID("txtbeh2");
                l_textboxSetting.TargetControls.Add(new TargetInput(l_Code.UniqueID, true));
                l_textboxSetting.TargetControls.Add(new TargetInput(l_Name.UniqueID, true));
                l_textboxSetting.TargetControls.Add(new TargetInput(l_Desc.UniqueID, true));
            }
 
            if (e.Item.FindControl("racTag") != null)
            {
                RadAutoCompleteBox l_AutoCompleteBox = e.Item.FindControl("racTag") as RadAutoCompleteBox;
                l_AutoCompleteBox.DataTextField = "tag_value";
                l_AutoCompleteBox.DataValueField = "ID";
                l_AutoCompleteBox.DataSource = GetSampleTagData();
                l_AutoCompleteBox.DataBind();
            }
        }
 
        private object GetSampleTagData()
        {
            DataTable l_Table = new DataTable("SampleTagTable");
            l_Table.Columns.Add("ID");
            l_Table.Columns.Add("tag_value");
 
            l_Table.Rows.Add(new string[] { "1", "Clothing" });
            l_Table.Rows.Add(new string[] { "2", "Shoes" });
            l_Table.Rows.Add(new string[] { "3", "Sunglasses" });
            l_Table.Rows.Add(new string[] { "4", "Watches" });
            l_Table.Rows.Add(new string[] { "5", "Books" });
 
            return l_Table;
        }
    }
}

Hope you can use my attached codes to reproduce the error.
Please let me know how can I make this work.
I have tested in Chrome, Firefox and IE10. All have same result.

Thanks in advanced, 
Robin







Robin
Top achievements
Rank 2
 asked on 26 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?