Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views
Hi there,

I'm trying to check what a value is on a column. If the value for a record is say "Approved" within column "Status" then I want to disable the button I have in my template column.

I have something similar with headertext.
    protected void RadGrid1_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) 
    { 
        switch (e.Column.HeaderText) 
        { 
            case "DetailId": 
                e.Column.Display = false; 
                break; 
        } 
    } 

Now how do I check the actual value the record? I imagine it's something with the RadGrid1_ItemCreated event.
Please help thanks :)
Daniel
Telerik team
 answered on 18 Jun 2009
1 answer
77 views
Hi
I'm trying to embed my own Tooltip into RadScheduler.
But to do this, i need the ID of the Appointment on the mouse-over event.
how could i handle/get this?

thanks
Peter
Telerik team
 answered on 18 Jun 2009
2 answers
182 views
Hi,

I have been scratching my head trying to create an item template in the code behind for the tab strip.  I am trying to create a tab with text and close icon (linking to a javascript function) just like the itemtemplate example on the asp demo site.

Is it possable to do this in the codebehind?

Thanks

Paul
Top achievements
Rank 1
 answered on 18 Jun 2009
3 answers
191 views
Hi ,
     I have two Child Grid , the MasterTable Skin is "WebBule" the same is applied for other two child Grid  , I want to separate the Skin for other two Chid Grids.

Thanks for the  Help in advance

Regards
Vinodh
Princy
Top achievements
Rank 2
 answered on 18 Jun 2009
1 answer
121 views
I have a rotator with a ticker in the item template bound to an XLMDataSource on my page set up like:

                <telerik:RadRotator ID="RadRotator1" runat="server"  
                    DataSourceID="XmlDataSource1" Width="100%" FrameDuration="6000"  
                    ScrollDirection="Left" ScrollDuration="800" Height="250px"  
                    PauseOnMouseOver="False" ItemWidth="200px"> 
                    <ItemTemplate> 
                        <div class="tickdetail"> 
                            <div class="clogo"><img src="<%# XPath("LogoFile") %>" alt=""/></div> 
                            <div class="tickdesc" style="text-align:center"> 
                                <telerik:RadTicker ID="Ticker1" runat="server" TickSpeed="50"> 
                                    <Items> 
                                        <telerik:RadTickerItem Text='<%# XPath("Description") %>' /> 
                                    </Items> 
                                </telerik:RadTicker> 
                            </div> 
                        </div> 
                    </ItemTemplate> 
                    <SlideShowAnimation Duration="1000" Type="Fade" /> 
                </telerik:RadRotator> 

When I go to my page everything appears to work fine and I see the rotator doing its thing and the ticker is ticking.  But when I click an item on the page that causes a postback, the rotator shows the associated image but the ticker no noger runs.  Any ideas?


Fiko
Telerik team
 answered on 18 Jun 2009
3 answers
128 views
Hi,

I'm having a problem. I want to put info from a database in the title of a dock, but I can't do that.
I tried the following example, but it gaves a parse error, because it's not possible:

<

 

telerik:RadDock ID="RadDock2" runat="server" Title="Conteudos da Tag '<%# Eval("Nome")%>'" EnableDrag="false">

 


...
</telerik:RadDock>

How can I solve this problem?
Pero
Telerik team
 answered on 18 Jun 2009
2 answers
128 views
I have a page (1) with 2 grids. In grid1 you see the projects. When clicking on a project you see the Bewerkingen with images based on their status in grid2. Below each image you see the value of a counter. The status of each Bewerking depends on the enddate of the Task and todays date. Each status has a counter (teller).
P.E.
Project 1; task1; bewerking1; image1; counter1
Project 1; task2; bewerking2; image2; counter2
Project 1; task3; bewerking1; image1; counter1
Project 2; task1; bewerking1; image3; counter3
When you click on Project 1 in grid1 you will see in grid2 the figure 2 below image1 and the figure 1 below image2.
When you click on an image in grid2 a new page (2) opens an the details of the tasks will be shown.

There is my problem. The grid shows all tasks.

The code of page1
Public Function Active(ByVal PROJECTID As String, ByVal BEWERKINGID As String) As String 
        Dim tellernull As Integer = 0  
        Dim tellerrood As Integer = 0  
        Dim telleroranje As Integer = 0  
        Dim tellergroen As Integer = 0  
 
        Dim datum As String = Now.ToShortDateString  
        Dim retstring As String = "" 
        Dim strSQL As String = "Select * from tblTasks where ProjectId = @ProjectId and BewerkingId=@BewerkingId and ReadyDate IS NULL" 
        Dim command As New SqlCommand(strSQL)  
        command.Parameters.AddWithValue("@ProjectId", PROJECTID)  
        command.Parameters.AddWithValue("@BewerkingId", BEWERKINGID)  
        Dim dr As SqlDataReader = DBPortal.OpenReader(command)  
        While dr.Read  
            If dr("EstimatedReadyDate") Is DBNull.Value Then 
                tellernull += 1  
            Else 
                'begin eigen test  code  
                Dim EstimatedReadyDate As Date = dr("EstimatedReadyDate")  
                Dim task As Integer = dr("TaskId")  
                Dim TimeSpan As TimeSpan  
                Dim NumberOfDays As Integer 
 
                TimeSpan = EstimatedReadyDate.Subtract(Now)  
                NumberOfDays = TimeSpan.Days  
 
                If NumberOfDays <= 5 Then 
                    tellerrood += 1  
                Else 
                    If NumberOfDays >= 6 And NumberOfDays <= 10 Then 
                        telleroranje += 1  
                    Else 
                        tellergroen += 1  
                    End If 
                End If 
            End If 
        End While 
        dr.Close()  
 
        retstring = "null " + tellernull.ToString + ", " + tellergroen.ToString + ", " + telleroranje.ToString + ", " + tellerrood.ToString  
        Dim trow1 As String = "<tr>" 
        Dim trow2 As String = "<tr>" 
        If tellernull > 0 Then 
            trow1 += "<td style='border: 0px'><a href='ShowDetails.aspx?projectid=" + PROJECTID.Trim + "&bewerkingid=" + BEWERKINGID.Trim + "&soort=nullact'><img src='images/bluelight_cross.png' border='0' alt='no enddate'></a></td>" 
 
 
            trow2 += "<td style='border: 0px' align='center'>" + tellernull.ToString + "</td>" 
 
        End If 
        If tellerrood > 0 Then 
            trow1 += "<td style='border: 0px'><a href='ShowDetails.aspx?projectid=" + PROJECTID.Trim + "&bewerkingid=" + BEWERKINGID.Trim + "&soort=roodact'><img src='images/redlight.png' border='0' alt='critical'></a></td>" 
            trow2 += "<td style='border: 0px' align='center'>" + tellerrood.ToString + "</td>" 
        End If 
        If telleroranje > 0 Then 
            trow1 += "<td style='border: 0px'><img src='images/orangelight.png' alt='almost critical'></td>" 
            trow2 += "<td style='border: 0px' align='center' >" + telleroranje.ToString + "</td>" 
        End If 
        If tellergroen > 0 Then 
            trow1 += "<td style='border: 0px'><img src='images/greenlight.png' alt='on schedule'></td>" 
            trow2 += "<td style='border: 0px' align='center'>" + tellergroen.ToString + "</td>" 
        End If 
        trow1 += "</tr>" 
        trow2 += "</tr>" 
        retstring = "<table style='border: 0px'>" + trow1 + trow2 + "</table>" 
        Return retstring  
    End Function 
    Public Function Finished(ByVal PROJECTID As String, ByVal BEWERKINGID As String) As String 
        Dim tellernull As Integer = 0  
        Dim tellerrood As Integer = 0  
        Dim telleroranje As Integer = 0  
        Dim tellergroen As Integer = 0  
 
        Dim datum As String = Now.ToShortDateString  
        Dim retstring As String = "" 
        Dim strSQL As String = "Select * from tblTasks where ProjectId = @ProjectId and BewerkingId=@BewerkingId and ReadyDate IS NOT NULL" 
        Dim command As New SqlCommand(strSQL)  
        command.Parameters.AddWithValue("@ProjectId", PROJECTID)  
        command.Parameters.AddWithValue("@BewerkingId", BEWERKINGID)  
        Dim dr As SqlDataReader = DBPortal.OpenReader(command)  
        While dr.Read  
            If dr("EstimatedReadyDate") Is DBNull.Value Then 
                tellernull += 1  
            Else 
                'begin eigen test  code  
                Dim EstimatedReadyDate As Date = dr("EstimatedReadyDate")  
                Dim task As Integer = dr("BewerkingId")  
                Dim TimeSpan As TimeSpan  
                Dim NumberOfDays As Integer 
 
                TimeSpan = EstimatedReadyDate.Subtract(Now)  
                NumberOfDays = TimeSpan.Days  
 
                If NumberOfDays <= 5 Then 
                    tellerrood += 1  
                Else 
                    If NumberOfDays >= 6 And NumberOfDays <= 10 Then 
                        telleroranje += 1  
                    Else 
                        tellergroen += 1  
                    End If 
                End If 
            End If 
        End While 
        dr.Close()  
 
        retstring = "null " + tellernull.ToString + ", " + tellergroen.ToString + ", " + telleroranje.ToString + ", " + tellerrood.ToString  
        Dim trow1 As String = "<tr>" 
        Dim trow2 As String = "<tr>" 
        If tellernull > 0 Then 
            trow1 += "<td style='border: 0px'><a href='ShowDetails.aspx?projectid=" + PROJECTID.Trim + "&bewerkingid=" + BEWERKINGID.Trim + "&soort=nullfin'><img src='images/bluelight_cross.png' border='0' alt='no enddate'></a></td>" 
            trow2 += "<td style='border: 0px' align='center'>" + tellernull.ToString + "</td>" 
 
        End If 
        If tellerrood > 0 Then 
            trow1 += "<td style='border: 0px'><a href='ShowDetails.aspx?projectid=" + PROJECTID.Trim + "&bewerkingid=" + BEWERKINGID.Trim + "&soort=roodfin'><img src='images/redlight.png' border='0' alt='critical'></a></td>" 
            trow2 += "<td style='border: 0px' align='center'>" + tellerrood.ToString + "</td>" 
        End If 
        If telleroranje > 0 Then 
            trow1 += "<td style='border: 0px'><img src='images/orangelight.png' alt='almost critical'></td>" 
            trow2 += "<td style='border: 0px' align='center' >" + telleroranje.ToString + "</td>" 
        End If 
        If tellergroen > 0 Then 
            trow1 += "<td style='border: 0px'><img src='images/greenlight.png' alt='on schedule'></td>" 
            trow2 += "<td style='border: 0px' align='center'>" + tellergroen.ToString + "</td>" 
        End If 
 
        trow1 += "</tr>" 
        trow2 += "</tr>" 
        'retstring = "<table style='border: 0px'>" + trow1 + trow2 + "</table>"  
        retstring = "<table border='0'>" + trow1 + trow2 + "</table>" 
 
        Return retstring  
    End Function 

And the code of page2
Protected Sub gvShowDetail_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gvShowDetail.ItemDataBound  
        Dim strid As String = "" 
        Dim BewerkingId As String 
        Dim Projectid As String 
        BewerkingId = Request.QueryString("BewerkingId")  
        ProjectId = Request.QueryString("ProjectId")  
        Dim strSQL As String = "Select * from tblTasks where (ProjectId = @ProjectId) AND (BewerkingId = @BewerkingId)" 
 
 
        Dim command As New SqlCommand(strSQL)  
        command.Parameters.AddWithValue("@ProjectId", ProjectId)  
        command.Parameters.AddWithValue("BewerkingId", BewerkingId)  
        Dim dr As SqlDataReader = DBPortal.OpenReader(command)  
 
        While dr.Read  
            If dr("EstimatedReadyDate") Is DBNull.Value Then 
                strid = "" 
            Else 
                If dr("ReadyDate") Is DBNull.Value Then 
 
                    Dim EstimatedReadyDate As Date = dr("EstimatedReadyDate")  
                    Dim task As Integer = dr("TaskId")  
                    Dim TimeSpan As TimeSpan  
                    Dim NumberOfDays As Integer 
                    Dim Soort As String 
                    Dim retstring As String = "" 
                    Soort = Request.QueryString("soort")  
 
                    TimeSpan = EstimatedReadyDate.Subtract(Now)  
                    NumberOfDays = TimeSpan.Days  
 
                    If Soort = "roodact" Then 
                        If NumberOfDays <= 5 Then 
                            'roodact  
                            BewerkingId = Request.QueryString("BewerkingId")  
                            ProjectId = Request.QueryString("ProjectId")  
                            Dim strSQLRoodAct As String = "Select * from tblTasks where (ProjectId = @ProjectId) AND (BewerkingId = @BewerkingId)" 
                            Dim commandRoodact As New SqlCommand(strSQLRoodAct)  
                            commandRoodact.Parameters.AddWithValue("@ProjectId", ProjectId)  
                            commandRoodact.Parameters.AddWithValue("BewerkingId", BewerkingId)  
                            Dim drRoodAct As SqlDataReader = DBPortal.OpenReader(commandRoodact)  
 
 
                            drRoodAct.Close()  
                        End If 
                    End If 
                End If 
            End If 
 
 
        End While 
 
        dr.Close()  
 
    End Sub 
 
Mydatafactory
Top achievements
Rank 1
 answered on 18 Jun 2009
1 answer
409 views
Hi,

I am using Rad Controls version: Telerik.Web.UI 2008.01.0619.35.
I have nested splitters and Rad panes, in which I am trying to align Image vertical middle and horizontal center.  I am using asp:Panel inside RadPane, and setting the HorizontalAlign property of panel to align center.  Horizontal Align is working fine in IE but not on firefox.  I have to use Div tag as Image container because I want to resize the image.

Also I need to vertical-align: middle for the content in RadPane. Below is the code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestResize.aspx.cs" Inherits="VX2Casting.TestResize" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>FullWindow</title>
    <style type="text/css">
    html, body, form
    {
        height: 100%;
        margin: 0px;
        padding: 0px;
        overflow: hidden;
    }
    </style>
    
<telerik:RadCodeBlock ID="radCodeBlockMain" runat="server">
    <script type="text/javascript">
        function OnLvLargeViewResizeHandler() {
            var imgLvLargeView = document.getElementById("imgLvLargeView");

            //Resize Image large view
            var nWidthL, nHeightL, nImgWidthL, nImgHeightL, nOrgWidthL, nOrgHeightL;
            var RadSplitterLvRight = $find("<%=RadSplitterLvRight.ClientID%>");

            if (RadSplitterLvRight != null) { var RadPaneLvRightTop = RadSplitterLvRight.getPaneById("RadPaneLvRightTop"); nWidthL = RadPaneLvRightTop.get_width() - 10; nHeightL = RadPaneLvRightTop.get_height() - 10; }
            var imgLvLargeViewTmp = new Image(); imgLvLargeViewTmp.src = imgLvLargeView.src; nOrgWidthL = imgLvLargeViewTmp.width; nOrgHeightL = imgLvLargeViewTmp.height;

            if (nWidthL > 0 && nHeightL > 0) {
                var p = 0; var pH = nOrgHeightL / nHeightL; var pW = nOrgWidthL / nWidthL;
                if (pH > pW) { p = pH; } else { p = pW; }
                nImgWidthL = nOrgWidthL / p; nImgHeightL = nOrgHeightL / p;
            }

            if (imgLvLargeView != null) {
                var divImageObj = imgLvLargeView.parentNode;
                if (nImgWidthL > 0 && nImgHeightL > 0) {
                    if (divImageObj != null) { divImageObj.style.width = (nOrgWidthL > nImgWidthL ? nImgWidthL : nOrgWidthL) + 'px'; divImageObj.style.height = (nOrgHeightL > nImgHeightL ? nImgHeightL : nOrgHeightL) + 'px'; }
                }
                if (divImageObj != null) { divImageObj.style.visibility = "visible"; }
            }
        }
    
    </script>
</telerik:RadCodeBlock>        
</head>
<body>
    <form id="form2" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server" />
        <div id="ParentDivElement" style="height: 100%;">
            <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%"
                Orientation="Horizontal" Skin="Outlook">
                <telerik:RadPane ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150"
                    Scrolling="none">
                    <!-- Place the content of the pane here -->
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" />
                <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500">
                    <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Outlook" LiveResize="true">
                        <telerik:RadPane ID="LeftPane" runat="server" Width="200" MinWidth="150" MaxWidth="400">
                            <!-- Place the content of the pane here -->
                        </telerik:RadPane>
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" />
                        <telerik:RadPane ID="ContentPane" runat="server">
                            <telerik:RadSplitter ID="RadSplitterLv" runat="server" Orientation="Vertical" VisibleDuringInit="false" SplitBarsSize="2">
                                <telerik:RadPane ID="RadPaneLvLeft" runat="server" >
                                    LV Left pane
                                </telerik:RadPane>
                                <telerik:RadSplitBar ID="RadSplitBarLv" runat="server" CollapseMode="None" />
                                <telerik:RadPane ID="RadPaneLvRight" runat="server">
                                    <telerik:RadSplitter ID="RadSplitterLvRight" runat="server" Orientation="Horizontal" VisibleDuringInit="false" OnClientLoaded="OnLvLargeViewResizeHandler">
                                        <telerik:RadPane ID="RadPaneLvRightTop" runat="server" Scrolling="None">
                                            <asp:Panel ID="pnlLvLargeView" runat="server" Width="100%" Height="100%" BorderWidth="0" HorizontalAlign="Center">
                                                  <asp:PlaceHolder ID="PlaceHolderForLvImage" runat="server">
                                                    <div id="divLvLargeView" style="width:350px; height:500px; visibility:visible;">
                                                        <asp:Image ID="imgLvLargeView" ImageUrl="test1.JPG" runat="server" BorderWidth="0" Width="100%" />
                                                    </div>
                                                  </asp:PlaceHolder>                                                
                                                  <asp:PlaceHolder ID="PlaceHolderForLvVideo" Runat="server">
                                                        VIDEO CONTENT                                                  
                                                  </asp:PlaceHolder>
                                            </asp:Panel>
                                        </telerik:RadPane>
                                        <telerik:RadSplitBar ID="RadSplitBarLvRight" runat="server" Visible="false" />
                                        <telerik:RadPane ID="RadPaneLvRightBottom" runat="server" Height="40" Locked="true">
                                            LV Navigation
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPane>
                            </telerik:RadSplitter>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
            </telerik:RadSplitter>
            <telerik:RadSplitter ID="RadSplitter1" Runat="server">
            </telerik:RadSplitter>
        </div>
        
    </form>
</body>
</html>


Could you please suggest me how to align content in Radpane Horizontal center and Vertical middle on Internet explorer and Firefox browsers.

Thanks
Svetlina Anati
Telerik team
 answered on 18 Jun 2009
3 answers
122 views
It seems like you can only use the ImageEditor in the RadEditor. I am trying to use it for FileExplorer. Is there a way to enable this? If not, that's fine too : )

Thanks!
Rumen
Telerik team
 answered on 18 Jun 2009
6 answers
169 views
i have the following scenario:
<asp:Button...>
<asp:Panel id="refresh"..>
<telerik:RadDatePicker SharedCalendarID="SharedCalendar"...>
</asp:Panel>
<telerik:RadCalendar id="SharedCalendar"...>

the panel is being refreshed with telerik's ajax panel and manager.
problem is, after refreshing the panel, a javascript error occurs, saying he cannot find the control 'SharedCalendar'.
thus, the radDatePicker doesn't work anymore...
is this a familier problem? what could i be doing wrong?
Denis Susac
Top achievements
Rank 1
 answered on 18 Jun 2009
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?