Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
How To Remove the Icon in the Rad Sheduler and Different Icons for Different Events....

example
Attached

I used this method to coloured the Appoinments

 

 

 

 

If Trim(e.Appointment.RecurrenceParentID) = "E" Then

 

 

 

For i = 0 To reccount - 1

 

 

 

If RadScheduler1.Appointments(i).Subject = e.Appointment.Subject Then

 

RadScheduler1.Appointments.Item(i).BackColor = Drawing.

 

Color.Orange

 

 

 

Exit For

 

 

 

End If

 

 

 

Next

 

 

 

End If

 

 

 

'Display Work Order in Differnt colour

 

 

 

If Trim(e.Appointment.RecurrenceParentID) = "W" Then

 

 

 

For i = 0 To reccount - 1

 

 

 

If RadScheduler1.Appointments(i).Subject = e.Appointment.Subject Then

 

RadScheduler1.Appointments.Item(i).BackColor = Drawing.

 

Color.YellowGreen

 

 

 

Exit For

 

 

 

End If

 

 

 

Next

 

Peter
Telerik team
 answered on 28 Sep 2010
3 answers
120 views

I have upgraded telerik components from 2009.2.701.35 to 2010.2.826.35 

and nowreferencing the javascripts for Animation on Page causes out of 
memory exception on tool tip show
<asp:ScriptReference 
Path="~/RadResources/Scripts/Common/Animation/AnimationScripts.js" />
if i remove the reference, this doesn't happen and animation seems ok and no memory exception happens. 
am i missing some other reference that might be causing this error or should i remove the reference everywhere?
Svetlina Anati
Telerik team
 answered on 28 Sep 2010
2 answers
206 views
Hi folks,

I recieve a time duration data in seconds, lets say 90, and I need to show it as 1:30

I can just use TimeSpan.FromSeconds(90).ToString() to get this done for me, but I don't know where I can put it on RadGrid.

I only see a FormatString property, and I need to provide a little logic. Any suggestions?

Thanks,
Adilson Carvalho
Top achievements
Rank 1
 answered on 28 Sep 2010
5 answers
171 views
I am having an issue with a custom "help" button that I added to the Radwindow.  When I click on my custom button, the window maximizes. And when I click on the custom button again, nothing happens. I am NOT expecting the window size to change. Does anyone know what is going on?

Telerik.Web.UI V: 2009.2.701.20
Using IE8 in Browser mode: IE8 Document mode: IE 8 Standards

Is there some embedded event that I need to cancel?

function showRadWindow() {
    window.radopen("SamplePage.aspx", "sampleWindow");
    return false;
}
 
function AddHelpIcon(radWindow) {
 
    var radWindowDom = document.getElementById(radWindow.get_id());
    var TitleBar = radWindow.GetTitlebar();
    var parent = TitleBar.parentNode;
    var oUL = parent.getElementsByTagName('UL');
    var oLI = oUL[0].getElementsByTagName('LI'); //Get the unordered list html element
 
    if (oLI[0].id != "HelpListItem") { //If first (list item) does not have the id of "HelpListItem"
        var newLI = oLI[0].cloneNode(true);
        var newA = newLI.getElementsByTagName('a'); //html anchor
        oUL[0].style.width = "93px"; //width of titlebar
        newA[0].className = "helpbutton"; //class inside .css file
        newA[0].title = "Help Button";
        newA[0].lastChild.innerHTML = "Help Button";
        newA[0].onmousedown = callHelpFunction;
 
        if (radWindowDom.attributes["HelpId"] != null) {
            newA[0].setAttribute("helpId", radWindowDom.attributes["HelpId"].value);
        }
 
        oUL[0].insertBefore(newLI, oLI[0]);
        oLI[0].id = "HelpListItem"; //Name the first (list item) ID to "HelpListItem"
    }
}
 
function callHelpFunction(e) {
 
    //Do something
 
    //Cancel event!
    if (!e) e = window.event;
    return $telerik.cancelRawEvent(e);           
}
 
<asp:Button Id="button1" runat="server" Text="Open Rad Window2" OnClientClick="showRadWindow(); return false;" />
 
<telerik:RadWindowManager id="radWindowManager" runat="server">
        <windows>
                 
            <telerik:RadWindow
                id="notesWindow"
                Runat="server"
                Behaviors="Close, Move, Resize, Maximize"
                ReloadOnShow="true"
                VisibleStatusbar="true"
                ShowContentDuringLoad="false"
                Width="440px" Height="440px"
                Left="250px"
                Modal="true"
                EnableEmbeddedSkins="false"
                Skin="mySkin"
                EnableEmbeddedBasestylesheet="false"
                OnClientShow="AddHelpIcon">
            </telerik:RadWindow>           
        </windows>
    </telerik:RadWindowManager>
Svetlina Anati
Telerik team
 answered on 28 Sep 2010
1 answer
362 views
Hi,

I want to know if there's any way to hide a column if is empty without iterate on each value.

I'm usign SQL Server 2008 and it's not important the kind of the datasource object.

Thanks
Dimo
Telerik team
 answered on 28 Sep 2010
1 answer
122 views
I want to do like in the picture. How do ?
Princy
Top achievements
Rank 2
 answered on 28 Sep 2010
7 answers
201 views
   
I have a grid that is working fine, the problem is, when I put it inside RadAjaxPanel, I click 
add new record, the insert open successfully, I enter the values and click insert the RadGrid_InsertCommand
does not get invoked, and the grid shows empty again...

When I remove it from RadAjaxPanel it works normally..

Any pointers to this behavior ??
 


<
telerik:radgrid ID="radgrid_Languages"  runat="server" Skin="Office2007"
            GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
            Width="97%" OnNeedDataSource="RadGrid_NeedDataSource"
            OnDeleteCommand="RadGrid_DeleteCommand"
            OnInsertCommand="RadGrid_InsertCommand"
            OnUpdateCommand="RadGrid_UpdateCommand" EnableAJAX="True"  > 
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 
                
            <MasterTableView DataKeyNames="ID" GridLines="None" Width="100%" CommandItemDisplay ="Top" > 
                
<CommandItemSettings ExportToPdfText="Export to Pdf" AddNewRecordText="Add new language"></CommandItemSettings>
                
                <Columns> 
                    <telerik:GridEditCommandColumn > 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridDropDownColumn DataField="LanguageID" DataSourceID="lds_Languages"
                        HeaderText="Language" ListTextField="LanguageName" ListValueField="ID"
                        UniqueName="LanguageID">
                    </telerik:GridDropDownColumn>
 
                   <telerik:GridDropDownColumn DataField="ReadLevelID" DataSourceID="lds_ProficiencyLevels"
                        HeaderText="Read" ListTextField="LevelName" ListValueField="ID"
                        UniqueName="ReadLevelID">
                    </telerik:GridDropDownColumn>
 
                    <telerik:GridDropDownColumn DataField="WriteLevelID" DataSourceID="lds_ProficiencyLevels"
                        HeaderText="Written" ListTextField="LevelName" ListValueField="ID"
                        UniqueName="WriteLevelID">
                    </telerik:GridDropDownColumn>
 
                    <telerik:GridDropDownColumn DataField="SpeakLevelID" DataSourceID="lds_ProficiencyLevels"
                        HeaderText="Spoken" ListTextField="LevelName" ListValueField="ID"
                        UniqueName="SpeakLevelID">
                    </telerik:GridDropDownColumn>
 
                    
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
                        UniqueName="Delete" ConfirmText="Are you sure you want to delete ?"
                        ConfirmTitle="Alert">  
                    </telerik:GridButtonColumn> 
                </Columns> 
                      <EditFormSettings>
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
 
                            <FormStyle BackColor="#EEF2EA" Width="100%"></FormStyle>
 
                            <FormTableStyle CellPadding="2" CellSpacing="0"></FormTableStyle>
 
                            <FormTableItemStyle Height="29px" Width="100%"></FormTableItemStyle>
                        </EditFormSettings>
 
                <ExpandCollapseColumn Visible="False">  
                    <HeaderStyle Width="19px"></HeaderStyle> 
                </ExpandCollapseColumn> 
 
                   <NoRecordsTemplate>
                            <table style="width: 100%;height:100px">
                                <tr>
                                    <td>
                                        Please add your languages proficiency<br />
                                        <br />
                                        (Indicate Very Good , Good , Average , Weak )
                                    </td>
                                </tr>
                            </table>
                        </NoRecordsTemplate>
 
                <RowIndicatorColumn Visible="False">  
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
            </MasterTableView> 
        </telerik:radgrid>
Rabeeh
Top achievements
Rank 2
 answered on 28 Sep 2010
1 answer
163 views
Hi
How do I add Items of RadcomboBox to a session.

I have a lstCourseCode to give back Tutor Emails which I want to store for each coursecode.

I probably have to use session array?
I dont know the length of array for Items.It will be dynamic.
And each item (lstCourseCode.SelectedItem.Text) should be stored in Session array.
On the same page OnClick of Submit I restore each of the session value to send emails.

Any suggestions !!!!


Shinu
Top achievements
Rank 2
 answered on 28 Sep 2010
1 answer
117 views
Hi

I am trying to bind a collection of objects to a Hierarchy grid. The Parent rows are the Comment objects and the Children are the Activity objects. The Comment object contains a list of Activity objects.

the code I'm trying to get working is

<telerik:RadGrid CssClass="telerikrid" ID="CommentsGrid1" runat="server" GridLines="None"
           Width="100%" ShowGroupPanel="False" AllowSorting="True" Skin="Windows7" OnNeedDataSource="Comments1_NeedDataSource"
           Font-Size="7">
           <MasterTableView RetrieveAllDataFields="true" AutoGenerateColumns="False">
               <DetailTables>
                   <telerik:GridTableView>
                    <ParentTableRelation>
                           <telerik:GridRelationFields DetailKeyField="JdeSite" MasterKeyField="JdeSite" />
                       </ParentTableRelation>
                       <Columns>
                              <telerik:GridBoundColumn DataField="JdeSite" HeaderText="Site" />
                           <telerik:GridBoundColumn DataField="Type" HeaderText="Type" />
                           <telerik:GridBoundColumn DataField="OwnerName" HeaderText="Owner" />
                       </Columns>
                   </telerik:GridTableView>
               </DetailTables>
               <Columns>
                   <telerik:GridBoundColumn DataField="JdeSite" HeaderText="Site" />
                   <telerik:GridBoundColumn DataField="JdeCode" HeaderText="JDE Site" />
                   <telerik:GridBoundColumn DataField="TradingName" HeaderText="Trading Name" />
                   <telerik:GridBoundColumn DataField="BookingStartDate" HeaderText="Booking Start Date" />
                   <telerik:GridBoundColumn DataField="BookingEndDate" HeaderText="Booking End Date" />
                   <telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" />
               </Columns>
           </MasterTableView>
       </telerik:RadGrid>



public class Comment
  {
      public string OptyRowId { get; set; }
      public int WeekNo { get; set; }
      public string JdeSite { get; set; }
      public string JdeCode { get; set; }
      public string TradingName { get; set; }
      public DateTime BookingStartDate { get; set; }
      public DateTime BookingEndDate { get; set; }
      public string Comments { get; set; }
      public List<Activity> ActivityList { get; set; }
 
  }
   
   
   public class Activity
  {
      public string JdeSite { get; set; }
      public string Type { get; set; }
      public string OwnerName { get; set; }
       
  }

Thanks,
Joe
Radoslav
Telerik team
 answered on 28 Sep 2010
1 answer
101 views
I am working on a specific requirement in Rad grid. Encounter an issue while deleting all the data corresponding to a current filter and reloads the page with the filter expression still in the combo box.

I was hoping to tackle this situation by setting the Current filter value to "All" but not successful.

RadGrid1.MasterTableView.GetColumn("Name").CurrentFilterValue = "All";

But still RadGrid1.MasterTableView.FilterExpression contains the expression for the deleted data. In prevsious version for 3.5 I could handle this situation by replacing the filter expression by string manipulation and setting the filter expression to the radgrid once again. But in the upgraded version targeting .netframework 4.0, this is not possible as the filter expression is different from that of .net 3.5 version and difficult to replace the expired value.

Is there a way to handle the filter expression for data deleted from the database, but the expression still remains in the combo box. I have a number of filter expressions but would like to avoid only those filters which don't have data exists in the database.


Mira
Telerik team
 answered on 28 Sep 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?