Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views

 

 

int idx = RegionCombo.FindItemIndexByValue(Convert.ToString(query.Region));

 

RegionCombo.Items[idx].Selected =

 

true;

 



not working and Combo.SelectIndex not work too. just i need on server do select like as user select item. But Text in combox is still sam - > first

thanx
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2010
1 answer
727 views

I have a radGrid on the page with the "Add New Record" button.  When I click the "Add New Record" button, a textbox appears above each column that allows me to enter values.  I want to limit the number of characters that can be entered in the textbox.  How do I set the MaxLength of those textboxes?
Daniel
Telerik team
 answered on 23 Jul 2010
1 answer
125 views
I have been trying to define the structure of the radEditor in my grid with a Theme as detailed in the RadEditor documentation (http://www.telerik.com/help/aspnet-ajax/usingthemes.html) but have had no success. Is this even possible?

Here is the code I am using. I added a reference to my theme in the page directive.

ASPX Page

            <telerik:GridHTMLEditorColumnEditor ID="NarrativeEditor" runat="server">
                <Editor runat="server" SkinID="ScorecardInput">
                </Editor>
            </telerik:GridHTMLEditorColumnEditor>

Skin
 <%@ Register TagPrefix="telerik"  Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadEditor runat="server" SkinId="ScorecardInput"  Skin="Windows7" Width="400px" Height="300px" ToolbarMode="Default" ContentFilters="DefaultFilters"  EditModes="Design,Html">
    <SpellCheckSettings AllowAddCustom="False" />
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="PastePlainText" />
            <telerik:EditorTool Name="StripAll" />
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="AjaxSpellCheck" />
            <telerik:EditorTool Name="FindAndReplace" />
        </telerik:EditorToolGroup>
    </Tools>
  <Content>
      <b>Setting inline properties</b>
  </Content>
</telerik:RadEditor>

The Format Code option does not seem to work for me. It just hangs - possible from the heavy firewall and proxy.

Mike
Pavlina
Telerik team
 answered on 23 Jul 2010
1 answer
174 views
By default, the exchange provider loads the "main" calendar of an account (DistinguishedFolderIdNameType.calendar), but I have a need to load other calendars within the same account (eg "personal", "business", etc) by their display name. I modified the exchange provider as below, and just post it here in case anyone else can make use of it.

Cheers
Jonathan

added a property to ExchangeSchedulerProvider:

        public string CustomCalendarName { get; set; }

modified the constructor to accept calendar name (though should really have created overload):

public ExchangeSchedulerProvider(string serverUrl, string username, string password, string domain, string calendarName)
    : this()
{
    ServerUrl = serverUrl;
    Username = username;
    Password = password;
    Domain = domain;
    CustomCalendarName = calendarName;
}


added the following method to ExchangeSchedulerProvider.cs:

protected internal List<BaseFolderIdType> FindCalendarFolderByName(string folderName)
{
    List<BaseFolderIdType> theReturn = new List<BaseFolderIdType>();
 
    if (folderName == null || folderName == string.Empty)
        theReturn.Add(new DistinguishedFolderIdType() { Id = DistinguishedFolderIdNameType.calendar });
    else
    {
        // LOOKUP THE FOLDER BY ITS FRIENDLY (DISPLAY) NAME
 
        FindFolderType findFolder = new FindFolderType();
        findFolder.FolderShape = new FolderResponseShapeType() { BaseShape = DefaultShapeNamesType.IdOnly };
        findFolder.Traversal = FolderQueryTraversalType.Deep;
 
        // Identify which folder to begin your search from.
        List<DistinguishedFolderIdType> folders = new List<DistinguishedFolderIdType>();
        DistinguishedFolderIdType rootFolder = new DistinguishedFolderIdType() { Id = DistinguishedFolderIdNameType.root };
        folders.Add(rootFolder);
        findFolder.ParentFolderIds = folders.ToArray();
 
        // need display name property to compare against
        PathToUnindexedFieldType displayNamePath = new PathToUnindexedFieldType() { FieldURI = UnindexedFieldURIType.folderDisplayName };
        findFolder.FolderShape.AdditionalProperties = new BasePathToElementType[] { displayNamePath };
 
        // execute the request
        FindFolderResponseType response = Service.FindFolder(findFolder);
 
        // FILTER OUT THE ONE FOLDER WE'RE LOOKING FOR, AND GET ITS ID
 
        // Access the response message.
        ArrayOfResponseMessagesType responseMessages = response.ResponseMessages;
 
        List<string> CalendarFolderIDs = new List<string>();
        foreach (ResponseMessageType responseMessage in responseMessages.Items)
        {
            if (responseMessage is FindFolderResponseMessageType)
            {
                FindFolderResponseMessageType ffrmt = (responseMessage as FindFolderResponseMessageType);
                FindFolderParentType ffpt = ffrmt.RootFolder;
 
                foreach (BaseFolderType item in ffpt.Folders)
                {
                    if (item is CalendarFolderType)
                    {
                        CalendarFolderType calendarFolder = item as CalendarFolderType;
                        if (calendarFolder != null)
                        {
                            if (calendarFolder.DisplayName.ToLower() == CustomCalendarName.ToLower())
                            {
                                FolderIdType calID = calendarFolder.FolderId;
                                theReturn.Add(calID);
                            }
                        }
                    }
                }
            }
        }
    }
 
    return theReturn;
}

and then in the FindCalendarItems() method, changed

            List<DistinguishedFolderIdType> folderIDs = new List<DistinguishedFolderIdType>();
            DistinguishedFolderIdType ownCalendar = new DistinguishedFolderIdType();
            ownCalendar.Id = DistinguishedFolderIdNameType.calendar;
            folderIDs.Add(ownCalendar);

to:

            List<BaseFolderIdType> folderIDs = FindCalendarFolderByName(CustomCalendarName);

Now from the aspx.cs, can set up the provider like:

ExchangeSchedulerProvider provider = new ExchangeSchedulerProvider(serverPath, _CalendarProperties.userName, _CalendarProperties.userPass, _CalendarProperties.userDomain, "myCalendar");
RadScheduler1.Provider = provider;


Peter
Telerik team
 answered on 23 Jul 2010
7 answers
149 views
Hi all,

A strange problem has just started happening with our scheduler.

When we right click an appointment and get the time it is giving us the selected time plus the time on the computer. So if we select 1am then the time it gives us is 1am + 16hrs = 17hrs

We have no idea how to solve this as it's just started happening. 

Any ideas?

Cheers
Jon
Peter
Telerik team
 answered on 23 Jul 2010
1 answer
82 views
Hi,

Could you please hint me how can I achive something like shown in Boxed.png where content of tab is boxed insided "red rectangle"? Basically a showing border of the tab content.

Many thanks.

M G
Shinu
Top achievements
Rank 2
 answered on 23 Jul 2010
1 answer
120 views
Good Day

i am using a RaSchedular(Telerik) and i have an XML File on my solution and i bind my Schedular like this


 
   <pre> private void Bind_Viewer_For(String Module)
    {

    
            string strExpr = "Code like '%" + Module + "%'";
            XmlDataDocument xmlDatadoc = new XmlDataDocument();
            xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
            RadScheduler1.DataStartField = "STARTDATE";
            RadScheduler1.DataSubjectField = "DESCRIPTION";
            RadScheduler1.DataEndField = "ENDDATE";
            RadScheduler1.DataKeyField = "ID";

            dsfinal = xmlDatadoc.DataSet;

            if (dsfinal.Tables[0].Rows.Count &gt; 0)
            {
                DataView dv = dsfinal.Tables[0].DefaultView;
                dv.RowFilter = strExpr;
                RadScheduler1.DataSource = dv;
                RadScheduler1.DataBind();
                RadScheduler1.SelectedView = SchedulerViewType.MonthView;
                RadScheduler1.SelectedDate = Convert.ToDateTime(dv.Table.Rows[30]["ENDDATE"]);

            }
     

    }
</pre>

 

dsfinal is declared Globally. i am filtering my data as you can see in the expression and bind the control with the Detail view.  Now , my problem is when the updates are made. In the Schedular when updates are made , or when an appointment is moved
i need to Update the Dataset with the changes made. The Demo here  Explains a simple xml binding, but i am binding the Schedular with a Dataset and when changes i made, i want to save the changes in the dataset.

Now i have a save button that is supposed to take the changes made in the dataset and merge it back to the xml and my code looks like this

 protected void btnCommitChanges_Click(object sender, EventArgs e)
    {

            XmlDataDocument xmlDatadoc = new XmlDataDocument();
            xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");

            DataSet dslist = new DataSet();
            dslist = xmlDatadoc.DataSet;

            dsfinal.Merge(dslist);
            dsfinal.WriteXml(@"C:\Pilot Project\App_Data\TimeTable.xml");

    }
 

 as you can see , i am taking the xml that is currently on the file system and i am loading it to a dataset and merge the two dataset. My question here is that is it going to updates the changes or it will override or insert new elements as if i am adding a new record on the xml ?

Again, after refresh the page, i could see the changes were not saved and the xml have not changed from the changes that were made in the dataset.

Thanks
Peter
Telerik team
 answered on 23 Jul 2010
7 answers
713 views
Hi,
I have a radGRid in which each row represent a customer and where I put several radTextBox in the cells so that the customers can input their info (firstname, lastname, etc.). I can have from 1 to 10 customers in the same grid.
I'm trying to get the row index where the value of a radTextBox as been changed.
I need to do this client side.

Any idea?
Thanks in advance

Sam
Sammy78
Top achievements
Rank 2
 answered on 23 Jul 2010
2 answers
251 views
Hello,

I work with vs 2008 and IE8.

I have a simple RadComboBox with a button.
If I tape a text in my RadComboBox, when I click on the button, the RadComboBox still always empty.

Code aspx :

<table>
  <tr>
     <td>
       <telerik:RadComboBox ID="RcmbPref" runat="server" DataSourceID="ds_pref" AutoPostBack = "true" AllowCustomText="true"  DataTextField="IDFavori" DataValueField="IDFavori" Skin="WebBlue" MarkFirstMatch="True">
       </telerik:RadComboBox>                
     </td>
     <td width="6px"> </td>
     <td>
        <asp:ImageButton ID="ImgBtn_pref" runat="server" ImageUrl="../Gen_Images/favorites_add.png" ToolTip="Ajouter une préférence d'affichage" />
     </td>                                               
   </tr>
</table>

<

 

asp:SqlDataSource ID="ds_pref" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:CsAppli %>"

 

 

SelectCommand="SELECT IDFavori FROM t_preferenceRadGrid WHERE (IDApplication = 'CEC') AND (IDSection = 'listeCL') ORDER BY IsCurrent DESC"></asp:SqlDataSource>

 



Code VB :
Private Sub ImgBtn_pref_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImgBtn_pref.Click
        Dim sNomPref As String = ""
        sNomPref = RcmbPref.Text
End Sub

Someone can see where is the problem, please ?

Anne
Anne
Top achievements
Rank 1
 answered on 23 Jul 2010
4 answers
260 views
Hi,

I wanted to create a RadCombobox programatically and a radtreeview also need to be there, how can I create/add control to the ITEMTEMPLATE?

My code is something like this:

Dim cbFolder as new RadCombobox
Dim tree as new radTreeView
        'Codes to add nodes to the Treeview
dim li as new radcomboboxitem
li.controls.add(tree)
cbFolder.items.add(li)

The code above created a radcombobox with the treeview but I can't select any node. I think I should add the treeview in an ItemTemplate instead of an item, any advise?

Thanks.

Andy Ho

Kalina
Telerik team
 answered on 23 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?