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

Kinda new to the PanelBar and I am trying to do something specific with it that I am not finding on the forums.

I have a PanelBar which I am databinding in the code behind.

Each Item will have a repeater inside it so I have the following code
<telerik:RadPanelBar ID="RadPanelBar1" runat="server"  ExpandMode="FullExpandedItem">
    <ExpandAnimation Type="None" />
    <CollapseAnimation Type="None" />
    <ItemTemplate>
        <asp:Repeater ID="PremisesRepeater" runat="server">
            <ItemTemplate>
                <%--..some user control--%>
            </ItemTemplate>
        </asp:Repeater>
    </ItemTemplate>
</telerik:RadPanelBar>

Bound like this.

RadPanelBar1.DataSource = MyCustomer.MyBusinesses;
RadPanelBar1.DataTextField = "Id";
RadPanelBar1.DataValueField = "Id";
RadPanelBar1.DataBind();

The problem is that once this is databound, the PanelBar doesnt collapse any items at all. Everything is expanded and the repeater and it's contents are shown for all items. Items will not collapse when the header is clicked on.

Am I missing something? I would like to use this control specifically for the expand/collapse functionality.

Kind Regards,
Andrew
Andrew
Top achievements
Rank 1
 answered on 01 Feb 2011
4 answers
121 views
Hey all,

I have a RadComboBox that I want to have pull data from a separate WCF service project, and I've followed the guide for linking a RadComboBox to a WCF service (http://www.telerik.com/help/aspnet-ajax/combobox-loading-items-from-wcf-service.html), but it will not work when the service is in a WCF project separate from the web project.  I first tried configuring the RadComboBox to use a service within the same web project and that worked great, but once I moved the service to a separate project, it started giving the error "The server method GetData failed".

So, I have two projects in my solution.  A WCF service project and a web project, and the web project has a service reference to the WCF service project.  The web project has the following RadComboBox on its default page:
<telerik:RadComboBox ID="RadComboBox1"
   EnableLoadOnDemand="true"
   Width="250"
   runat="server">
    <WebServiceSettings Method="GetData" Path="http://localhost:4835/Service.svc" />         
</telerik:RadComboBox>

The WCF service project has the following ajax-enabled service:
namespace WcfService
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Service
    {
        [OperationContract]
        [WebGet(ResponseFormat=WebMessageFormat.Xml)]
        public RadComboBoxData GetDataTelerik(RadComboBoxContext context)
        {
            RadComboBoxData data = new RadComboBoxData();
 
            //todo: call db..
 
            RadComboBoxItemData item = new RadComboBoxItemData();
            item.Text = "rawr";
            item.Value = "teh value";
 
            data.Items = new RadComboBoxItemData[] { item };
            return data;
        }
    }
}

And the service project has the following web.config file:
<?xml version="1.0"?>
<configuration>
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
 
  <system.serviceModel>
      <behaviors>
          <endpointBehaviors>
              <behavior name="WcfService.ServiceAspNetAjaxBehavior">
                  <enableWebScript />
              </behavior>
          </endpointBehaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true"/>
            </behavior>
          </serviceBehaviors>
      </behaviors>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
          multipleSiteBindingsEnabled="true" />
      <services>
          <service name="WcfService.Service">
              <endpoint address="" behaviorConfiguration="WcfService.ServiceAspNetAjaxBehavior"
                  binding="webHttpBinding" contract="WcfService.Service" />
          </service>
      </services>
  </system.serviceModel>
   
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
 
</configuration>

When the service was in the web project and working properly, the same serviceModel section of the above config file was in the web project's web.config.  When I moved the service to its own project, I pulled that section out and put it in the service project's web.config.  The only difference is I set httpGetEnabled to true (so that the service could be referenced and the wsdl could be viewed).

But when the RadComboBox tries to pull data from the service, it gives the error message "The server method GetData failed".  What am I missing?  Thanks!

-Joey
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
 answered on 01 Feb 2011
3 answers
336 views
Hi,

I am working over a RadMenu.
In my development, I would like to create, in a certain condition, a menu item for this menu in which the url is opened in a new window.
There is someone who have an idea???

Thanks.
Mehdi Baatout
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
116 views
Hi,

I'm binding my grid to a collection of objects, unfortunately, the object only contains an id of another object that I want to display the Display Value for.  So rather than make a service tier change, I'm handling the retrieval within the UI.

My question is, do DataItem Attributes have a DataField property value so I can bind to them?

I'm using NeedsDatasource to bind and then explicitly using telerik:GridBoundColumn to handle which columns are displayed.

I'm adding my Attributes in the code behind in ItemDataBound, like this:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        Object obj1= (Object)e.Item.DataItem;
        e.Item.Attributes.Add("Attribute1", DataSet.Find(p => p.Code == obj1.Code).DisplayValue);
    }
}


Is there a way to bind a column to the Attribute named "Attribute1"?

Thanks!

Coy
Coy
Top achievements
Rank 1
 answered on 01 Feb 2011
3 answers
183 views
Need solution:
Click on RadComboBox and scroll mouse weel - List Box opens and remains open on top of screen as the screen scrolls underneath.
Please help!
Cori
Top achievements
Rank 2
 answered on 01 Feb 2011
4 answers
75 views
Hi,

I have a problem when using  a RadGrid with scrolling, when I activate the edit and delete columns the scrolling do not work if I remove that columns the scrolling works again. Is it a bug?

I tried with both auto and manual edit and delete columns, in both ways horizontal scrolling didn't work.

Arturo
Top achievements
Rank 1
 answered on 01 Feb 2011
1 answer
94 views
Hi Telerik,

I am using Radmenu.

We are populating the item dynamically by attaching DataTable. (ID , ParentID.. are set ..)

Radmenu is getting populated with correct data , but the problem is with the Root MenuItems Row.

Items are getting wrapped in two rows when browser window is resized to smaller size.

Is there any way to set No Wrap property to Radmenu ?

Please suggest .

Thanx.
Kate
Telerik team
 answered on 01 Feb 2011
3 answers
80 views
I have a custom control that contains a radSkinManager, radScriptManager and a radMenu. This control is on every web page. My client wants the "Default" skin applied and the font on the menu set to bold. I have set the radMenu property "Font-Bold='true'" but the skin overrides this and turns off the bold. How do I get around this??
Kate
Telerik team
 answered on 01 Feb 2011
1 answer
78 views
I'm successfully using a WebService to load the child items for the main root items. However, your online examples all use the webservice to also populate subitems only when the user hovers over them - I would like to load all items under the root, including any child subitems, on the first request.  How can this be achieved?
Kate
Telerik team
 answered on 01 Feb 2011
3 answers
106 views
Hi All

I want to use the Custom Attribute within Rad Scheduler but i would like to make it "Read only",
In other words i would like to exclude it from the insert and update statements? Is this possible?
I have tried EnableCustomAttributeEditing="False" but this still throws and exception on Insert or Update.

My reason for doing this is i have created Schedule Types that the user selects on creating an appointment, The Type colour is assigned in the Type table, I have then created a query for the scheduler's data source that links the typeID with the type table to show the correct colour,
This runs perfectly until it comes to Insert and Update as the scheduler insists on the colour parameter?

Any help would be greatly appreciated.

Many Thanks

Cush
Peter
Telerik team
 answered on 01 Feb 2011
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?