Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
139 views
I have a TreeList with multiitemedit enabled as below.  Only one column 'Limit' is editable. I have two buttons placed outside the TreeList, one for edit and one for update(This is a user specification that the user doesn't want to go to each row and perform edit/update).  I have two problems here.

1. I have to click the Edit button twice to bring the TreeList  to edit mode
2. In the button click of Update button(btnUpdate_Click), I am not able to get the updated value in the edit box for 'Limit' column .

Thanks in Advance!

<

 

telerik:RadTreeList ID="RadTreeList1" runat="server" DataKeyNames="ID" ParentDataKeyNames="PID"

 

 

OnNeedDataSource="RadTreeList1_NeedDataSource" AutoGenerateColumns="false" HeaderStyle-Font-Bold="true" AllowMultiItemEdit= "true" EditMode="InPlace">

 

 

 

<Columns>

 

 

<telerik:TreeListBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false" ReadOnly="true">

 

 

</telerik:TreeListBoundColumn>

 

 

<telerik:TreeListBoundColumn DataField="PID" HeaderText="PID" UniqueName="PID" Visible="false" ReadOnly="true">

 

 

</telerik:TreeListBoundColumn>

 

 

<telerik:TreeListBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" ItemStyle-Width="150px" HeaderStyle-Width="150px" ReadOnly="true">

 

 

</telerik:TreeListBoundColumn>

 

 

<telerik:TreeListBoundColumn DataField="Limit" HeaderText="Limit" UniqueName="Limit" ItemStyle-Width="150px" HeaderStyle-Width="150px">

 

 

</telerik:TreeListBoundColumn>

 

 

<telerik:TreeListBoundColumn DataField="Expense" HeaderText="Expense" UniqueName="Expense" ItemStyle-Width="150px" HeaderStyle-Width="150px" ReadOnly="true">

 

 

</telerik:TreeListBoundColumn>

 

 

</Columns>

 

 

</telerik:RadTreeList>


 

 

protected void RadTreeList1_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e)

 

{

    tbl =

new CounterPartyHierarchy.CounterPartyHierachyTableDataTable();

 

    tbl.ReadXml(

@"..\hierarchy.xml");

 

    RadTreeList1.DataSource = tbl;

}

 

 

protected void btnEdit_Click(object sender, EventArgs e)

 

{

 

    foreach (TreeListDataItem item in RadTreeList1.Items)

 

    {

        item.Edit =

true;

 

    }

}

 

protected void btnUpdate_Click(object sender, EventArgs e)

 

{

 

    Hashtable table = new Hashtable();

 

 

    foreach (TreeListDataItem item in RadTreeList1.EditItems)

 

    {

        

 

 

string limit= (item.GetColumnEditor("Limit") as TreeListTextBoxColumnEditor).TextBoxControl.Text;

 

 

 

    }

}

 

Gijo
Top achievements
Rank 1
 answered on 31 Aug 2011
6 answers
600 views
Hello,
I have set the empty message property for the RadTextBox but when I set the Textmode to Password the empty message does not display. Is this a bug or is this by design? Does anyone know how I can display and emptymessage within the RadTextBox control while it is using the Password Textmode?
Thank you.
Keith
Top achievements
Rank 1
 answered on 31 Aug 2011
1 answer
74 views
Hello,
    I am using the RAd Combo Box with Check Boxes. Even though the Autopostback is set to true, the postback is not occuring . This is the sample code I am uisng
In Design:

<telerik:RadComboBox ID="rlMyGuys" runat="server" DataSourceID="SQLdsMyGuys" AutoPostBack="True" CheckBoxes="true" onitemchecked="OnItemChecked"
DataValueField="employid" DataTextField="empname" Width="240px">
</telerik:RadComboBox>

In Code:
Protected Sub OnItemChecked(ByVal sender As Object, ByVal e As RadComboBoxItemEventArgs)
BindEmployeeAssignments()
End Sub

I am not sure where the issue is.

 

 


Dimitar Terziev
Telerik team
 answered on 31 Aug 2011
2 answers
90 views
Hello,
    I am using 2011 Q2 ASPNET AJAX combo box control. I am trying to display multi select check boxes. For some reason the post back is not firing when I check the check boxes. Design time code I am using is as follows.
<telerik:RadComboBox ID="rlMyGuys" runat="server" DataSourceID="SQLdsMyGuys" AutoPostBack="true" CheckBoxes="true" OnItemChecked="OnItemChecked"
DataValueField="employid" DataTextField="empname"Width="240px">
</telerik:RadComboBox>

I was wondering if Telerik team see any issue with the above content.

Vamsi
Dimitar Terziev
Telerik team
 answered on 31 Aug 2011
1 answer
125 views
Hi ,

I've built a SharePoint webpart that uses a radScheduler in Timeline view. The oddest thing Ive seen happens with the scheduler. In IE 8 it renders great and works like a charm. However in IE 7, when a user clicks the next and previous buttons and then mouses out , the scheduler simply disappears. The next and previous buttons do not make any server calls as I've bound 10 days worth of appointment data when the form initiallys loads. Any help with this would be appreciated.

Here is the aspx code for the control:
<br />
  
<style type="text/css">
      
    .rsTimelineView .rsAllDayRow 
      {
           height:32px !important;    
      }
     .rsContentScrollArea
    {
        /*overflow-x: scroll;*/
          
        }
  
    .rhs table tbody tr td iframe
    {
        z-index: 9000000!important;
        }
                  
    .rsAllDayTable  ,.rsHorizontalHeaderTable 
    {
        width:100%!Important;
          
     }    
      
           
    .RadScheduler, .rsHeader
    {
        /*Z-index:0!important;*/
        }
      
    .rsHeader
    {
        /*z-index:1;   */
        /*z-index:0!Important; */
        }
      
    .rsContent
    {
        position:relative;              
        /*top:-8px;*/
        top:0px;
        /*z-index:-1!important;*/
        }        
          
    .rsAptRecurrenceException
    {
        display:none!important;
        }
      
    .ms-inputuserfield
    {
        border-style:solid;
        border-color:Gray;
        border-width:1px;    
        }                 
      
    /*.rsAptOut*/
    .overrideRsAptOut
    {
        width: inherit !important;        
        }
      
    .placeholder
    {
        /*border-color:Teal;
        border-width:1px;
        border-style:solid;*/
        }   
      
    .clear
    {
        float:none;
        clear: both;
        }
      
    .lhs
    {   
        position:relative;
        float:left;  
        width: 150px;            
        }
      
    .rhs
    {
        position:relative;
        float:left;
        width:300px;
        margin-right:10px; 
        margin-left:5px;   
        }
          
    #divResourcePicker
    {
        padding-top:10px!important;
        }   
          
    #divDisplayMissingResources, .errors
    {
        padding-top:10px;
        color:Red;
        }
          
    #divDisplayAvailability
    {
         margin:0px auto 0px auto;
         padding-top:10px;
         }    
      
    #divGetAvailability, #divDisplayMissingResources, #divDisplayAvailability
    {
        position:relative;
        top:40px;
        }
          
          
</style>
  
<script type="text/javascript" src="~/_layouts/Amp.AvailabilityViewer.SharePoint/jquery-1.6.2.min.js"></script>
  
<script type="text/javascript">
</script>
  
  
<div id="divWebPartContainer" >
        <div id= "divStartDateTime">
            <div class="lhs placeholder"> Start Date & Time </div>
            <div class="rhs placeholder"> 
                <SharePoint:DateTimeControl ID="dtcStartingDateTime" runat="server"  />
            </div>
        </div>
        <div class="clear"></div>
  
        <div id= "divResourcePicker">
            <div class="lhs placeholder"> Names</div>
            <div class="rhs placeholder" style="height:26px;"> 
                <SharePoint:PeopleEditor id="peopleEditor" runat="server" IsValid="true" AllowEmpty="true" Height="20px" Width="290px"  AllowTypeIn="true" MultiSelect="true" />
            </div>
        </div>
        <div class="clear"></div>
          
        <div id= "divGetAvailability">
            <div class="lhs placeholder"> 
                <asp:Button ID="btnCheckAvailability" runat="server" Text="Check Availability"  onclick="btnCheckAvailability_Click"  /> 
            </div>
            <div class="rhs placeholder"> </div>
        </div>
        <div class="clear"></div>
  
        <asp:Panel ID="pnlDisplayMissingResources" runat="server" visible="false">
            <div id= "divDisplayMissingResources">
                <div class="lhs placeholder"></div>
                <div class="rhs placeholder">   <asp:Literal ID="litInaccableCalendars" runat="server" ></asp:Literal></div>
                 
            </div>
        </asp:Panel>       
        <div class="clear"></div>
          
        <div id= "divDisplayAvailability" class="placeholder">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server"  UpdateMode="Conditional">
                <ContentTemplate>   
                      
                     <div class="lhs placeholder"></div>
                     <div class="rhs placeholder"><asp:Label ID="RadSchedulerError" runat="server" Text="" Visible="false"  CssClass="errors"></asp:Label></div>
                     <div class="clear"></div>       
                      
                                       
                     <telerik:RadScheduler ID="RadScheduler1" runat="server" 
                                                AllowEdit="false" AllowInsert="false" ShowViewTabs="false"
                                                OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                                                ShowNavigationPane="true"
                                                EnableExactTimeRendering="true"                                                
                                                OnNavigationCommand = "RadScheduler1_NavigationCommand"                                                                                                                                                                                          
                                                EnableDatePicker="false"
                                                visible="true"
                                                >
  
                                                <AdvancedForm Modal="true" />
                                                <TimelineView   GroupingDirection="Vertical"                                                                                                         
                                                                />
                                                <MonthView UserSelectable="false" />
                                                <DayView UserSelectable="false" />
                                                <WeekView UserSelectable="false" />
                                       
                        </telerik:RadScheduler>    
                         
  
                </ContentTemplate>     
            </asp:UpdatePanel>                                           
        </div>
          
  
        <br />
</div


Here is the code that initialises the control through code:

private void initialiseSchedulerUI()
     {          
                      
         RadScheduler1.SelectedView = Telerik.Web.UI.SchedulerViewType.TimelineView;
         RadScheduler1.DayStartTime= TimeSpan.Parse("08:00:00") ;            
         RadScheduler1.DayEndTime=TimeSpan.Parse("19:00:00") ;
         RadScheduler1.Skin= "Office2007" ;
         RadScheduler1.TimelineView.UserSelectable = false;
         RadScheduler1.TimelineView.GroupBy = "User";
         RadScheduler1.TimelineView.ShowInsertArea = false;
           
         //Timescales scale = Timescales.Hours;
         //RadScheduler1.TimelineView.ShowTimescale(scale);
         RadScheduler1.DataKeyField = "ID";
         RadScheduler1.DataStartField = "Start";
         RadScheduler1.DataDescriptionField = "Subject";
         RadScheduler1.DataEndField = "End";
         RadScheduler1.DataSubjectField = "Subject";
         RadScheduler1.DataRecurrenceField = "RecurrenceRule";
         RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
         //RadScheduler1.OverflowBehavior="Expand" ;
         RadScheduler1.TimelineView.SlotDuration = TimeSpan.Parse("00:15:00");
         RadScheduler1.TimelineView.TimeLabelSpan = 4;
         RadScheduler1.TimelineView.ColumnHeaderDateFormat = "h tt";
         RadScheduler1.TimelineView.NumberOfSlots = 64;
         RadScheduler1.TimelineView.StartTime = TimeSpan.Parse("08:00:00");
         RadScheduler1.TimelineView.HeaderDateFormat = "dddd, dd MMMM yyyy";
         RadScheduler1.RowHeight = Unit.Pixel(32);                                   
              
         RadScheduler1.ReadOnly = true;
           
     }

And here are the server side events I've hooked into:
   protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
     {
         string radDate; // = startDate.ToShortDateString();
         string dtcDate;
         DateTime convertedRadDate; //= DateTime.Parse(sDate);
         DateTime converteddtcDate;
         radDate = RadScheduler1.SelectedDate.ToShortDateString();
         dtcDate = dtcStartingDateTime.SelectedDate.ToShortDateString();
         convertedRadDate = DateTime.Parse(radDate);
         converteddtcDate = DateTime.Parse(dtcDate);
         if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView)
         {
             if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod)
             {
                 RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(8);
                 RemoveRadEditorError();
                  
                 //if (RadScheduler1.SelectedDate > dtcStartingDateTime.SelectedDate.AddDays(5))
                 if (convertedRadDate > converteddtcDate.AddDays(5))
                 {
                     DisplayRadEditorError("You can only browse five days in Advance!");
                     RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(-8);
                     e.Cancel = true;
                     UpdatePanel1.Update();
                 }
             }
             else if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod)
             {
                 RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(-8);
                 RemoveRadEditorError();
                 //if (RadScheduler1.SelectedDate < dtcStartingDateTime.SelectedDate)
                 if (convertedRadDate <= converteddtcDate)
                 {
                     DisplayRadEditorError("You cannot browse before the selected date!");
                     RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(8);
                     e.Cancel = true;
                     UpdatePanel1.Update();
                 }
             }
         }
     }
protected void RemoveRadEditorError()
     {
         RadSchedulerError.Text = "";
         //RadScheduler1.Visible = true;
         RadSchedulerError.Visible = false;
     }


Kalina
Telerik team
 answered on 31 Aug 2011
3 answers
66 views
Hi, i saw the example of AdvanceTemplate RadschedulerTemplate and also some tips about using Radschedulerrecurrence control, but always it is use from a Radscheduler control.

Can be used or fired the radschedulertemplateeditform for example from a radmenunitem without a radscheduler (so big control) present?

Also, can be radschedulerrecurence control extended to use additional fields and functionality?

Thanks.

Plamen
Telerik team
 answered on 31 Aug 2011
2 answers
154 views
Hi,

I'm using single click buttons.  What do I need to do for the client-side validators to fire before the button gets disabled?  The problem I'm having is my button is becoming disabled in the OnClientClicked, but my asp:RequiredFieldValidators are preventing the form from being submitted.  I only want the single click feature to kick in if all the client-side validation passes.

Thanks,
Mike
Slav
Telerik team
 answered on 31 Aug 2011
6 answers
242 views
Hi,

This is my code ,

<telerik:RadEditor runat="server" OnClientSubmit="OnClientSubmit" ID="RadEditor1" 
ContentFilters="None">
<Content>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" style="background-color: #ffffff; margin: 0px;"><tbody><tr><td valign="top" align="right"> <img alt=""  src="/editorQ2SP12008/Images/Deisy.jpg"  align="left" /></td></tr></tbody></table>
</Content>
</telerik:RadEditor>
------------------------------------------------------------------------------------------------------------------
Facing Issue  :
1 ] When i change ContentFilters="None"  ---- > in browser Firefox Changing the Hex colour(style="COLOR: #000000") to RGB(style="color: rgb(0, 0, 0)).
2 ] When i change ContentFilters="ConvertToXhtml" ---- >  align="left"  (inside Img Tag name) converting to style="float: left;".


Please help me out as soon as possible.

Thanks 
Anand
Rumen
Telerik team
 answered on 31 Aug 2011
0 answers
190 views
Sorry this is for a listbox not a combobox but the answer should be the same.

========================================================================

I am using two Comboboxes in an asp.net form that also uses EOWeb's progressbar. Everything seems to work internally. The file is called from the first box processed and moved to the second box. Unfortunately when calling it from within this function the boxes never display the new information.

How can I trigger this change or display the changes once completed? here is the code I am using

protected void ProgressBar2_RunTask(object sender, EO.Web.ProgressTaskEventArgs e)
{
    int tcount = UploadListBox.Items.Count;
    if (tcount < 1)
    {
        e.UpdateProgress(0, "You must have files to process.");
        return;
    }
    int increment = 100 / tcount;
    int completed = 0;
    string pfile;
    string[] fileparts;
    //var item = new Telerik.Web.UI.RadListBoxItem();
    for (int i = 0; i < (tcount); i++)
    {
        string filetype;
        InitMstrVariables();
        InitFGVariables();
        InitTransactionSet();
        pfile = UploadListBox.Items[0].Value.ToString();
        e.UpdateProgress(completed, "Processing: " + pfile);
        fileparts = pfile.Split('_');
        MstrType = Right(fileparts[1], 1).ToUpper();
        Batch = Convert.ToInt32(fileparts[0]);
        MstrYearMonth = Convert.ToInt32(Left(fileparts[3], 6));
        DateCreated = StrToDate(fileparts[3]);
        filetype = Left(fileparts[1], 3);
        if (filetype == "834")
        {
            DeleteBatch834();
            ProcessFile834(pfile);
        }
        else if (filetype == "820")
        {
            DeleteBatch820();
            ProcessFile820(pfile);
        }
        var item = new Telerik.Web.UI.RadListBoxItem();
        item.Value = pfile;
        item.Text = pfile;
        ProcessedListBox.Items.Add(item);
        UploadListBox.Items[0].Remove();
        File.Delete(filepath + pfile);
        completed = completed + increment;
    }
    e.UpdateProgress(100, "Completed...");
}

 The progressbar does call this javascript routine as well.

function OnProgress(progressBar)
{
    var extraData = progressBar.getExtraData();
    if (extraData)
    {
        //The following code demonstrates how to update
        //client side DHTML element based on the value
        //RunTask passed to us with e.UpdateProgress
        var div = document.getElementById("divStatus");
        div.innerHTML = extraData;      
    }
}

Help is always greatly appreciated.


David
Top achievements
Rank 1
 asked on 31 Aug 2011
1 answer
104 views
In the RadScheduler live demo code I found an exchange provider created for Exchange 2007 (also mentioned here http://www.telerik.com/help/aspnet-ajax/scheduler-exchange-provider.html).

But Microsoft Exchange Server 2010 SP1 provides new and improved Web services interfaces that you can use to implement client applications that access and manage Exchange store items (http://msdn.microsoft.com/en-us/library/dd877059(v=exchg.140).aspx).

I wonder would the current provider be compatible with Microsoft Exchange Server 2010 SP1 Web services? Do you plan to update the provider code?
Kalina
Telerik team
 answered on 31 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?