Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
164 views
Hi Team,

I've been struggling with this for couple of hours, the Combobox does not seem to fill up with the web service.
This is the web service i'm using

namespace WebApplication
{
    /// <summary>
    /// Summary description for vendorsearch
    /// </summary>
    [WebService(Namespace = "http://jnkdfjdf.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class comboboxsearch : System.Web.Services.WebService
    {
        [WebMethod]
        public IEnumerable GetItems(RadComboBoxContext context)
        {
            RadComboBoxData result = new RadComboBoxData();
            int numberOfItems = (int)(context["ItemsCount"] ?? 1000);
 
            List<ComboBoxItemData> items = new List<ComboBoxItemData>();
            for (int i = 0; i < numberOfItems; i++)
            {
                ComboBoxItemData itemData = new ComboBoxItemData();
                itemData.Text = "Item " + i;
                items.Add(itemData);
            }
 
            return items;
        }
    }


And here is the asp.net default.aspx code

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication._Default" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
     
 
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
   <telerik:RadComboBox ID="RadComboBox1" CssClass="ComboBox" runat="server" Width="240px" Height="200px"
        OnClientItemsRequested="OnClientItemsRequested" OnClientItemsRequesting="OnClientItemsRequesting"
        EnableLoadOnDemand="true" OnClientDropDownClosed="OnClientDropDownClosed" EnableItemCaching="true">
        <ExpandAnimation Type="none" />
        <CollapseAnimation Type="none" />
        <WebServiceSettings Path="comboboxsearch.asmx" Method="GetItems" />
    </telerik:RadComboBox>
 
 
    <telerik:RadScriptBlock runat="Server" ID="RadScriptBlock1">
 
    </telerik:RadScriptBlock>
  
 
</asp:Content>

What could i be possibly doing wrong? , any help will be appreciated :) .


Cheers

Princy
Top achievements
Rank 2
 answered on 02 Jul 2012
3 answers
188 views
Hello
I am building a page where users can edit data
I have followed a sample case (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx)
and here is my sample page (http://gaia.agraria.unitus.it/prova3.aspx)
The problem rise in the second grid after user selects a site: when you switch to edit mode, you can enter anything in the textbox.
In your sample, I tried to enter the string  SELECT * FROM MyTable DELETE FROM MyTable or other attempts with dangerous words (such as delete or drop) and the input was blocked.
But inspecting your code there I could not find anything about sql injection prevenction; that is, when I tried to replicate the test into my page, all data were dangerously inserted.
Is there a way to process data before the update operatione in the database?
Thanks
Diego
Radoslav
Telerik team
 answered on 02 Jul 2012
1 answer
98 views
Hi All,
We are developing product in asp.net using c sharp.How to bind multiple Roles and RoleFeaures in TreeList it involves Role as parent and RoleFeature as child. that means how to implement this and what is code to aspx and aspx.cs pages..that is when i click Role and list of RoleFeature will display inTreeList..How to implement this...

Thanks in Advance..!
Radoslav
Telerik team
 answered on 02 Jul 2012
1 answer
112 views
Dear All,

We are developing product in asp.net using c sharp in 4-tier architecture namely DataAccessLayer,BusinessLayer,ServiceLayer and PresentationLayer.I have 3 methods namely SelectRoles,SelectRoleFeatures and Assign And UnassignRoleFeatures to bind in RadTreeList and that we are having multiple roles and rolefeatures.Every role have rolefeatures.How to assign and unassign rolefeatures in checkbox at TreeList.How to bind Roles and RoleFeatures in Treelist and update role feature.

Thanks,
Radoslav
Telerik team
 answered on 02 Jul 2012
1 answer
164 views

i have a little problem about direction of a specific column in telerik rad grid.
with firebug we can find and change the direction of a table(master or detail) easily.
but there is no any class for a specific column to access.
how can i change direction of a specific column, not entire row or table in telerik radgrid?

thanks in advance

Shinu
Top achievements
Rank 2
 answered on 02 Jul 2012
1 answer
86 views
Hi..

Is there any way to disable all the previous days in a RadCalendar?

Thanks,
Sigma
Princy
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
134 views
Dear All,

        We are developing product in asp.net using c sharp in 4-tier architecture namely DataAccessLayer,BusinessLayer,ServiceLayer and PresentationLayer.How to bind multiple Roles and RoleFeaures in RadGrid and here Roles are parent and rolefeature are child when i click or expand roles,list of role feature should be display also Every role have rolefeatures and user can be assign and un-assign role features to particular Role by Checkbox.
    Here i have three methods are selectRoles,selectRoleFeatures and Assign-UnassginRoleFeatures which is allocated to particular user.
how to implement this which kind of grid suitable for this and what is code to aspx and aspx.cs pages..


My aspx page code is
 
 <telerik:RadGrid ID="Roles" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleId" HeaderText="ParentRoleId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
 
         <telerik:RadGrid ID="RoleFeature" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleFeatureId" HeaderText="ParentRoleFeatureId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleFeatureId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
My aspx.cs code is
protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              ApplicationProcess a = new ApplicationProcess();
              Roles.DataSource = a.GetRoles();
              Roles.DataBind();
 
              RoleFeature.DataSource = a.GetRoleFeatures(1);
              RoleFeature.DataBind();
          }
 
      }

Thanks in Advance..!
Susi
Top achievements
Rank 1
 asked on 02 Jul 2012
1 answer
194 views
The rblHovered css class get's applied to list items in the listbox when I hover over the list item. How do you remove this effect? I can't seem to override the css :hover.
Princy
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
53 views
Hi,

I am using RadGrid control on my web application.
I tried to change hidden field value on server side when changing the grid page index, but the new value is not passed to the client.
I read and found out that I can recognize a page index changed inside the ajax function OnRequestStart.
How can I recognize that the trigger for the OnRequestStart function is really the grid page index change?

Thanks.
Covertix
Top achievements
Rank 1
 asked on 01 Jul 2012
4 answers
322 views

Hi team,

I'm using radgrid to export to excel file. Everything is ok except one thing. I would like to format the value as currency style but when exporting done the style is Accounting

I catch the event

grid_ExcelExportCellFormatting(object source
                               , ExcelExportCellFormattingEventArgs e)

and I handled in this as below

e.Cell.Style["mso-number-format"] = "Currency";

Please help!
Kim.

zorro
Top achievements
Rank 1
 answered on 01 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?