Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
438 views
I have a web control with a RadTabStrip, and when I call $find(), I'm getting NULL.  I know I must be doing something wrong, but for the life of me I don't know what.  Currently, I have both the RadTabStrip markup and the javascript that is calling $find() in the same .ascx file, and it's still not working.

Any ideas where I am going wrong?

<div runat="server"> 
    <telerik:RadTabStrip ID="radTabStrip" runat="server" Skin="Sunset" 
            MultiPageID="mpageTabs" SelectedIndex="0"> 
        <Tabs> 
            <telerik:RadTab Text="Graph"></telerik:RadTab> 
            <telerik:RadTab Text="Table"></telerik:RadTab> 
            <telerik:RadTab Text="Criteria"></telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="mpageTabs" runat="server" SelectedIndex="0"> 
        <telerik:RadPageView ID="pageGraph" runat="server"> 
        </telerik:RadPageView> 
 
        <telerik:RadPageView ID="pageChart" runat="server"> 
        </telerik:RadPageView> 
 
        <telerik:RadPageView ID="pageCriteria" runat="server"> 
        </telerik:RadPageView> 
         
    </telerik:RadMultiPage> 
 
</div> 
 
<script type="text/javascript"> 
    function getRadTabStrip() 
    { 
        debugger; 
        var clientId = "<%= radTabStrip.ClientID %>"; 
        var tabStrip = $find(clientId); 
        return tabStrip; 
    } 
</script> 
 

Jeff
Top achievements
Rank 1
 answered on 02 Feb 2010
1 answer
135 views

Hi guys,

I have been asked to output the RadGrid content to a PDF. I have used the following formatting code to do the formatting when the item is being created.
Note: that the Grid uses GroupBy headings (in which I am having trouble formatting)

Protected Sub RadGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgResults.ItemDataBound  
        If (TypeOf e.Item Is GridDataItem OrElse TypeOf e.Item Is GridHeaderItem) Then 
 
            'to align the field left in the PDF even tho it looks ok on the webpage  
            For Each cell As TableCell In e.Item.Cells  
                cell.Style("text-align") = "left" 
            Next 
 
   
 
            Select Case e.Item.ItemType 'Mimic RadGrid appearance for the exported PDF file  
                Case GridItemType.Item  
                    e.Item.Style("background-color") = "#E8E8E8" 
                    Exit Select 
                Case GridItemType.AlternatingItem  
                    e.Item.Style("background-color") = "#FFFFFF" 
                    Exit Select 
                Case GridItemType.GroupHeader  
                    e.Item.Style("background-color") = "#000000" 
                    e.Item.Style("color") = "#FFFFFF " 
                    Exit Select 
                Case GridItemType.Header  
                    e.Item.Style("background-color") = "#000000" 
                    e.Item.Style("color") = "#FFFFFF" 
                    Exit Select 
            End Select 
        End If 
    End Sub 
 
 

 

 

Im assuming that the following code will format the groupby headings in the table however in the PDF it is in plain black text and not with a black background and white text: 

                Case GridItemType.GroupHeader
                    e.Item.Style("background-color") = "#000000"
                    e.Item.Style("color") = "#FFFFFF "
                    Exit Select

Any comments will be grateful,

Thanks

Daniel
Telerik team
 answered on 02 Feb 2010
1 answer
94 views
Hey all, I have a very interesting thing happening with my code and I'm hoping someone can at least point me in the right direction of a solution.

I have a page with a RadAjaxManager, a RadTabStrip that is associated with a RadMultiPage control.  Inside one of the RadPageView controls of the RadMultiPage control is a UserControl that I have created.  In that UserControl I have a RadAjaxManagerProxy (to communicate with the RadAjaxManager on the page), and a RadGrid.  The problem I'm having is that whenever there is an Ajax postback from any of the buttons or drop down lists in the UserControl, when the postback is completed, the RadGrid is somehow rendered in a different place.  It's being put at the end of the RadMultiPageControl, after all of the <div>s of the RadPageView controls.

If I didn't explain that well enough, let me know and I'll try again.

Is there anything special I need to know about having a RadGrid in a UserControl, or using a RadAjaxManagerProxy in a UserControl?  I'm really at a loss as to why this control is seemingly jumping to this new position (outside of it's parent control) upon Ajax postback.
Pavlina
Telerik team
 answered on 02 Feb 2010
1 answer
93 views

I didnot get the proper search results when i try to find (Bind template fields like (text box / dropdown) in Hierarchical / Details table in Grid). So, i posted here for just documentation purposes.
 

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
                        AllowSorting="True" GridLines="None" AutoGenerateColumns="False" Skin="WebBlue" 
                        EnableEmbeddedSkins="False" AllowMultiRowSelection="True">  
                        <MasterTableView TableLayout="Fixed" CellSpacing="-1" HierarchyLoadMode="Client" 
                            DataKeyNames="parent_Id">  
                            <DetailTables> 
                                <telerik:GridTableView Name="DetailsTable1" Width="100%" AllowFilteringByColumn="False" 
                                    runat="server">  
                                    <Columns> 
                                        <telerik:GridClientSelectColumn HeaderText="" UniqueName="CheckboxSelectColumn" HeaderStyle-Width="35px" 
                                            ItemStyle-Width="35px" /> 
 
                                        <telerik:GridBoundColumn FilterControlWidth="75px" DataField="child_Id" HeaderText="CHILD ID" 
                                            SortExpression="child_Id" UniqueName="child_Id" /> 
 
                                        <telerik:GridTemplateColumn HeaderText="RANK" AllowFiltering="False" SortExpression="Rank" 
                                            UniqueName="Rank">  
                                            <ItemTemplate> 
                                                <telerik:RadNumericTextBox ID="radRankInsideGrid" runat="server" NumberFormat-DecimalDigits="0" 
                                                    NumberFormat-GroupSeparator="" Type="Number" MaxLength="6" Width="40px" DataType="Integer">  
                                                </telerik:RadNumericTextBox> 
                                            </ItemTemplate> 
                                            <HeaderStyle HorizontalAlign="Center" /> 
                                            <ItemStyle HorizontalAlign="Center" /> 
                                        </telerik:GridTemplateColumn> 
 
                                        <telerik:GridTemplateColumn HeaderText="SELECTED" AllowFiltering="False" SortExpression="SelectedDesc" 
                                            UniqueName="Selected">  
                                            <ItemTemplate> 
                                                <telerik:RadComboBox ID="radSelectedInsideGrid" DataTextField="SelectedDesc" DataValueField="SelectedID" 
                                                    Width="100px" runat="server" EnableLoadOnDemand="true" AllowCustomText="false" 
                                                    OnItemsRequested="radSelectedInsideGrid_ItemsRequested" /> 
                                            </ItemTemplate> 
                                            <HeaderStyle HorizontalAlign="Center" /> 
                                            <ItemStyle HorizontalAlign="Center" /> 
                                        </telerik:GridTemplateColumn> 
                                         
                                    </Columns> 
                                </telerik:GridTableView> 
                            </DetailTables> 
                            <Columns> 
                                <telerik:GridBoundColumn  Visible="False" DataField="parent_Id" UniqueName="parent_Id" /> 
                                <telerik:GridBoundColumn DataField="Name" HeaderText="NAME" SortExpression="Name" 
                                    UniqueName="Name" FilterControlWidth="75%" /> 
                                <telerik:GridBoundColumn DataField="Type" HeaderText="TYPE" SortExpression="Type" 
                                    UniqueName="Type" FilterControlWidth="75%" /> 
                                <telerik:GridDateTimeColumn DataFormatString="{0:d}" DataField="StartDate" 
                                    FilterListOptions="VaryByDataType" HeaderText="START DATE" SortExpression="StartDate" 
                                    UniqueName="StartDate" HeaderStyle-Width="140px" FilterControlWidth="100px" /> 
                           </Columns> 
                        </MasterTableView>         
 </telerik:RadGrid> 

code behind:

Private Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
   If Not e.IsFromDetailTable Then 
      RadGrid1.DataSource = ParentBindData()  
   End If 
End Sub

 

 Private Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind  
        Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)  
        Select Case e.DetailTableView.Name.ToUpper()  
            Case "DETAILSTABLE1" 
                Dim obj As New ClassName  
                obj.Id = dataItem.GetDataKeyValue("parent_Id").ToString()  
                  
                e.DetailTableView.DataSource = obj.bindResults()  
 
                objPI = Nothing 
        End Select 
 End Sub 

 

 Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If e.Item.OwnerTableView.Name = "DetailsTable1" And _  
        (e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem) Then 
 
            'Grid Item  
            Dim objGridItem As GridDataItem  
            objGridItem = CType(e.Item, GridDataItem)  
 
            'Rank  
            Dim objRadTextBox As RadNumericTextBox  
            objRadTextBox = CType(objGridItem("Rank").FindControl("radRankInsideGrid"), RadNumericTextBox)  
            If Not IsNothing(objRadTextBox) Then 
                objRadTextBox.Text = e.Item.DataItem("Rank").ToString()  
            End If 
 
            'Selected, re-using the same objRadComboBox object.  
            Dim objRadComboBox1 As RadComboBox  
            objRadComboBox1 = CType(objGridItem("Selected").FindControl("radSelectedInsideGrid"), RadComboBox)  
            If Not IsNothing(objRadComboBox1) And e.Item.DataItem("SelectedID").ToString() <> String.Empty Then 
                GetSelectedLKUP(objRadComboBox1)  
                objRadComboBox1.SelectedValue = e.Item.DataItem("SelectedID").ToString()  
            End If 
 
        End If 
    End Sub 

 

 Private Sub GetSelectedLKUP(ByVal objRadComboBox As RadComboBox, Optional ByVal customText As String = "")     
        Dim objLookup As New Lookup     
        Dim objDataSet As DataSet = objLookup.bindSelectedLKUP()     
    
        objRadComboBox.DataSource = objDataSet     
        objRadComboBox.DataBind()     
    
        objLookup = Nothing    
 End Sub    
 
    Protected Sub radSelectedInsideGrid_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs)     
        Dim objRadComboBox As RadComboBox = DirectCast(sender, RadComboBox)     
        objRadComboBox.Items.Clear()     
        GetSelectedLKUP(objRadComboBox, e.Text)     
    End Sub   
Radoslav
Telerik team
 answered on 02 Feb 2010
3 answers
72 views
Hi,

I am using radscheduler in my application. In that i want to validate and overlap the appointment depends on the duration when i drag & drop an appointment.

Here I can able to read the selected appointment(Source)  subject, id and timings using 'RadScheduler1_AppointmentUpdate' event and by

'e.ModifiedAppointment'.


but i am unable to read the id, start time, end time and subject of an appointment(target) where i dropping it.

Please give any suggestions to solve it.

Thanks in Advance.

Regards
Maha
Peter
Telerik team
 answered on 02 Feb 2010
3 answers
106 views
I've just been in to the Online Docs (for the first time in a while) to look something up for RadScheduler.

What's is going on with the entries under the Telerik.Web.UI entry? There are lots of entries that are not in the right place. As an example the following is a list of items as the appear ...

ListViewArrayComparerHelper
MultiDayViewSettings
ListViewControlLocator
NavigationItemBinding
NavigationItemBindingCollection
ListViewControlStateManager

There are lots of example like this.

--
Stuart
Peter
Telerik team
 answered on 02 Feb 2010
2 answers
183 views
Hello,

The docs say that raddatepicker has get_wrapperElement function.

Is it missing ? or is this only docs error ?
Roland
Top achievements
Rank 1
 answered on 02 Feb 2010
5 answers
212 views
I've got an odd problem that just started happening and I'm not sure what has changed.

My environment is Windows 7, VS 2008 SP1 using Q3 Rad controls.

If I am in Design View and drop a Rad control on the page, it shows up but when I switch to Source, it's not there.  What's more frustrating is that if I delete the control and drop again it says that the control already exists.

However, if I am in Source View, and I drag over a Rad control from the toolbox, it does create it on the page.

It's only doing it with the Rad controls.  The standard .NET controls work fine.

Also, if I make any changes using the pop-up Tasks menu, those changes appear in there, but no on my page.  For example, adding items to a ComboBox.

Has anyone run into this?  I think I will re-install the controls.  Maybe something got messed up?
Mark Galbreath
Top achievements
Rank 2
 answered on 02 Feb 2010
1 answer
87 views
Hi Telerik Team,

Im using Timeline view for my schedular with Groupingdirection as 'Vertical'.
I have two queries regarding Timelineview.
1) Problem is the height of the Timelineview is reduced if appointments are not there.
2) The half of the part of datapicker is not visible.

Please find the screen shot for reference.

Regards.

Peter
Telerik team
 answered on 02 Feb 2010
1 answer
222 views

Hello.

We use some telerik's controls for our site and sometime have problems with rendering.

Please, see attached picture.

After site installing and first start all controls have wrong styles and AJAX not works.

After some time (1-2 hours sometime day) all works correct...

OS and all applications is German.

Please, tell what can be reason of this issue?

Schlurk
Top achievements
Rank 2
 answered on 02 Feb 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?