


| [WebGet(ResponseFormat = WebMessageFormat.Xml)] |
| IEnumerable<RadComboBoxItemData> ICommonManager.EnumToList(Type t) |
| { |
| SortedList<string, int> myList = Common.GetEnumDataSource(t); |
| List<RadComboBoxItemData> items = new List<RadComboBoxItemData>(); |
| for (int i = 0; i < myList.Count; i++) |
| { |
| RadComboBoxItemData itemData = new RadComboBoxItemData(); |
| itemData.Text = myList.Keys[i]; |
| itemData.Value = myList.Values[i].ToString(); |
| items.Add(itemData); |
| } |
| return items; |
| } |
RadComboBoxContext
but that does not help as all that is, is an IDictionary. There are over 100 Enums that i try to do this with, it would be horrible if i had to create a WebMethod for each and everyone of these Enums.
Is there something i can set when i create this combobox(i create all of my dynamically with the ability to know if it's datasource comming from a webservice before the control is created) to send in to the webservice the type of enum i need it to return? Also all of my dropdowns have an 'EmptyMessage' set to something.
BTW: the reason i do that SortedList is so that i can return the Enum in Alpa order, here is that function for those that would like it.
| public static SortedList<string, Int32> GetEnumDataSource(Type enumType) |
| { |
| SortedList<string, Int32> returnCollection = new SortedList<string, Int32>(); |
| try |
| { |
| if (enumType.BaseType == typeof(Enum)) |
| { |
| string[] enumNames = Enum.GetNames(enumType); |
| foreach (string current in enumNames) |
| { |
| returnCollection.Add(current, Convert.ToInt32(Enum.Parse(enumType, current))); |
| } |
| } |
| return returnCollection; |
| } |
| catch (Exception ex) |
| { |
| return null; |
| } |
| } |
I looked at your troubleshooting, tried things there. Looked at the below forum post where you say it is a problem you found in 3.5:
http://www.telerik.com/community/forums/thread/b311D-bgdmde.aspx
I am having the same problem using 3.5 Visual studio 2008 as well.
I am using the trial version however, and do not have an account to send you the project.
What response did you give this individual to help them? I would like to purchase for the November special, but if I can't get it to work, there's no point.
It works locally, but not when I load it to my webserver remotely. I have gone through the troubleshooting and added the lines they indicate:
I have this:
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.1001.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
And this:
<location path="bin/Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
But the second thing above doesn't make sense, since it has its own little system.web inside the location, and I didn't know you could do that.
Adding that causes it to stop erroring remotely, but none of my radtabstrips load on click, as they do locally.
What can I do to get this to work painlessly locally and remotely?
I have the trial version telerik.web.ui.dll and the telerik.web.ui.xml and the telerik.charting.dll and .xml in my /bin folder.
thanks.
Moon
thanks.
| <telerik:RadTreeView ID="ReportRadTreeView" Height="80%" RetainScrollPosition="False" ExpandDelay="0" runat="server"></telerik:RadTreeView> |
| function ExpandNode(NodeId) { |
| var treeView = $find('<%= RadTreeView1.ClientID %>'); |
| var node = treeView.findNodeByValue(NodeId); |
| node.select(); |
| } |
