Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
I'm trying to get rid of the 'More' link that is displayed is Month view. So far, the only solution I can find is to use css to hide it -

.rsShowMore   
{   
   displaynone !important;  

But this simply removes the text. The space the text occupies is still there, which leaves a rather large gap at the bottom of every day in the calendar. Is it possible to also remove/hide this space?
Peter
Telerik team
 answered on 22 Jul 2009
2 answers
131 views
I've got 2 RadDatePickers on my page, one is set to run the following function on OnDateSelected, however, this function fails on the final line, stating that the method isn't supported by the object. What am I doing wrong? How am I meant to be changing the selected date of the second datepicker?

function OneMonthApart(sender, eventArgs) {  
        var start = eventArgs.get_newDate();  
        var end = start.setMonth(start.getMonth() + 1);  
        var cal = $find("<%= calEndDate.ClientID %>");  
        cal.set_selectedDate(end);  
    } 
Peter
Top achievements
Rank 1
 answered on 22 Jul 2009
2 answers
172 views
I am trying to bind a RadGrid instance to a collection of objects such as this:

Region
    -Id, Name, etc
    -List<Locations>

I am using the NeedDataSource event and DetailTableDatabind event to accomplish this, but something isn't working right as I don't get any data back for the child entities. When I run through everything in intellisense I can see the DetailTableView.DataSource property contains the objects I expect, but upon binding nothing shows up for the DetailTable except a single empty row (regardless of whether there are 0 or 100 records present). If I try and add a DataKeyName or parent relationship entry it tells me the property doesn't exist on my object, yet it definitely does. In fact, if I use the <%# Eval("Property") %> tag on any property (like in a template column) it tells me that property doesn't exist.

Here is my markup:

<telerik:RadGrid runat="server" ID="grRegions" OnNeedDataSource="grRegions_NeedDataSource" OnItemDataBound="grRegions_ItemDataBound" OnItemCommand="grRegions_ItemCommand" Skin="Default2006" Width="750px" AllowPaging="true" PageSize="25" PagerStyle-Mode="NumericPages" OnDetailTableDataBind="grRegions_DetailTableDataBind"
    <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemStyle-Height="30px" DataKeyNames="Id" HierarchyLoadMode="Client"
        <DetailTables> 
            <telerik:GridTableView AutoGenerateColumns="false" runat="server" CommandItemDisplay="Top" CommandItemStyle-Height="30px" Name="Locations"
                <CommandItemTemplate> 
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/_assets/images/AddRecord.gif" BorderStyle="None" hspace="5" /><a href="javascript:void(0);" onclick="javascript:__associateLocation(<%#Eval("RegionId") %>);">Associate Location</a> 
                </CommandItemTemplate> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields MasterKeyField="Id" DetailKeyField="Id" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridTemplateColumn ItemStyle-Wrap="false" ItemStyle-Width="45px"
                        <ItemTemplate> 
                            <asp:Button runat="server" ID="cmEdit" Text="Edit" SkinID="SmallButton" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn>  
                    <telerik:GridBoundColumn DataField="Id" Visible="false" />                            
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" /> 
                    <telerik:GridBoundColumn DataField="StateProv.Name" HeaderText="State/Prov" /> 
                    <telerik:GridBoundColumn DataField="Country.Name" HeaderText="Country" /> 
                    <telerik:GridBoundColumn DataField="PostalCode" HeaderText="PostalCode" /> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables> 
        <CommandItemTemplate> 
            <asp:Image ID="Image2" runat="server" ImageUrl="~/_assets/images/AddRecord.gif" BorderStyle="None" hspace="5" /><a href="javascript:void(0);" onclick="javascript:__showRadWindow(null);">Add Region</a> 
        </CommandItemTemplate> 
        <Columns> 
            <telerik:GridTemplateColumn ItemStyle-Wrap="false" ItemStyle-Width="45px"
                <ItemTemplate> 
                    <asp:Button runat="server" ID="cmEdit" Text="Edit" CommandArgument='<%#Eval("Id") %>' SkinID="SmallButton" /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn HeaderText="Code" DataField="Code" /> 
            <telerik:GridBoundColumn HeaderText="Name" DataField="Name" /> 
            <telerik:GridButtonColumn ConfirmText="Are you sure you wish to permanently remove this region?<br /><br />This action will remove all associated locations and is not reversible."  
                            ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete"  ItemStyle-Width="45px"  
                            Text="Delete" UniqueName="DeleteColumn" ItemStyle-HorizontalAlign="Center" ImageUrl="~/_assets/images/delete.gif"
                <ItemStyle HorizontalAlign="Center" /> 
            </telerik:GridButtonColumn>  
        </Columns> 
    </MasterTableView> 
    <ClientSettings EnableRowHoverStyle="true" /> 
</telerik:RadGrid> 


Here is my code-behind:

Private _Regions As List(Of Core.TenderingRegion) = Nothing 
Protected ReadOnly Property Regions() As List(Of Core.TenderingRegion) 
    Get 
        If Me._Regions Is Nothing Then 
            Me._Regions = New Core.TenderingRegionBiz().GetAllRegions() 
        End If 
 
        Return Me._Regions 
    End Get 
End Property 
 
Protected Sub grRegions_NeedDataSource(ByVal sender As ObjectByVal e As GridNeedDataSourceEventArgs) 
 
    If Not e.IsFromDetailTable Then 
        Me.grRegions.DataSource = Me.Regions 
    End If 
 
End Sub 
 
Protected Sub grRegions_DetailTableDataBind(ByVal sender As ObjectByVal e As GridDetailTableDataBindEventArgs) 
 
    If e.DetailTableView.Name = "Locations" Then 
        Dim locs = From r In Me.Regions Where r.Id = Convert.ToInt32(e.DetailTableView.ParentItem.GetDataKeyValue("Id")) Select r.Locations 
        e.DetailTableView.DataSource = locs 
    End If 
 
End Sub 
 

It's definitely driving me crazy as to why the expected entities exist in the DataSource property of the DetailTableView but when it goes to show the records it always shows one line item that is blank.
Georgi Krustev
Telerik team
 answered on 22 Jul 2009
3 answers
573 views
Hi,

      I used several Rad ComboBox in a DNN page, however, the scroll bars are always shown even there is only one item and the width is large enough. My question is how to remove the scroll bars, especially the horizontal scroll bar? Can you please look at the DNN page on the web site: http://dev.barbourconsulting.com/dnn/?  Username: userHR  Password: userHR123
     After log in, click "Human Resources" tab, then click "Edit" link for any employee record. Please check the ComboBox in the "Classification" box. Here are asp codes for the "Department" Combo Box:

<tr> 
   <td class="labelWidth">  
       Department  
   </td> 
   <td> 
      <telerik:RadComboBox CssClass="ddlText" ID="DepartmentRadComboBox" Width="150px" 
         runat="server" DataSourceID="dsDepartmentInfo" AppendDataBoundItems="true" Skin="Outlook" 
         DataTextField="Department_Name" DataValueField="Department" DropDownWidth="230px" 
         SelectedValue='<%# Bind("Department") %>'>  
         <Items> 
            <telerik:RadComboBoxItem Text="None" runat="server" /> 
         </Items> 
         <ItemTemplate> 
            <table class="ddlText" style="width: 210px; text-align: left; line-height: 10px">  
              <tr> 
                 <td style="width: 60px;">  
                    <%#DataBinder.Eval(Container.DataItem, "Department")%> 
                 </td> 
                 <td style="width: 150px;">  
                    <%#DataBinder.Eval(Container.DataItem, "Department_Name")%> 
                 </td> 
              </tr> 
            </table> 
         </ItemTemplate> 
         <HeaderTemplate> 
            <table class="ddlText" style="width: 210px; text-align: left; line-height: 10px">  
              <tr> 
                 <td style="width: 60px;">  
                     Department</td> 
                 <td style="width: 150px;">  
                     Name</td> 
              </tr> 
           </table> 
         </HeaderTemplate> 
       </telerik:RadComboBox> 
     </td> 
   </tr> 

Thank you,
Hong  
Yana
Telerik team
 answered on 22 Jul 2009
1 answer
115 views
Hi,

Isn't it possible to specify an url in RadTickerItem, so my users can click the visible item and go to an url??

Thanks,
Morten
Fiko
Telerik team
 answered on 22 Jul 2009
1 answer
106 views
Hello

Can anyone tell me how I add a tool tip to a custom button that I have added to my tool bar on the editor?
Can't seem to find the info..

Thanks

Bex
Rumen
Telerik team
 answered on 22 Jul 2009
3 answers
130 views
html:
<img id="delete" src="../Images/delete.gif" class="vodelete" onclick="return vodelete(this)" />

javascript:

function vodelete(object)
{

     function callBackFn(arg)
     {
            if(arg)
            //do something
      }  
      radconfirm('Are you sure?',callBackFn,330,100,null,'system');
}

but it doesn't work, i don't know where the problem is,thanks!

Fiko
Telerik team
 answered on 22 Jul 2009
2 answers
83 views
Hi!
I'm trying to make my custom dialog like in http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx
The problem is your example doesn't correctly works in firefox (particulary in versions 3.0 and 3.5) - when you select text and try to make it a link, the link is always inserted at the beginning of the whole text.
I think the problem is exactly in your example 'cause the builtin tootip tool for links works fine.
Can you say what to change in your example to make it workable in firefox?


Konstantin Golovchenko
Top achievements
Rank 1
 answered on 22 Jul 2009
2 answers
216 views
Scenario: I need to achieve multi level grouping using radgrid in sharepoint 2007 dynamically. i need a demo source code to be given so as to achieve the result.

ex: http://www.telerik.com/help/aspnet-ajax/grdbasicgrouping.html. The very first example is the requirement.

Thanks a million in advance.
Ali Akbar
Top achievements
Rank 1
 answered on 22 Jul 2009
2 answers
150 views
Hi,

Bit of help please.

I am trying to follow this tutorial: http://www.telerik.com/help/aspnet-ajax/grdapplyingdefaultfilteroninitialload.html but am struggling to get my head around it. I want to set a filter on a "Date modified" field so that the last document modified (my grid row) is always at the top of the list.

I am using advanced databinding to populate my grid but I do not use a traditional SQL datasource directly. I am populating my grid from an object returned as a list.

Would somebody been kind enough to give me some example code of a filter that orders by date as described?

Thanks,

Michael
Michael Dunbar
Top achievements
Rank 2
 answered on 22 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?