Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hi dear,
my javascript code dosen't work and i got stack overflow error after a timeout.
this is my javascript code for itemShowing:

 

function itemShowing_handler(sender, args)

 

{

log(sender.get_id() +

" is about to change a frame");

 

 

 

var rotator = $find("<%= RadRotator1.ClientID %>");

 

rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right);

}

I have 2 rotator, RadRotator1 and RadRotator2. RadRotator2 has 4 items in every showing, RadRotator1 must show items of RadRotator2, one by one in the duration of itemshowing of RadRotator2. but
Marin Bratanov
Telerik team
 answered on 03 Aug 2011
3 answers
114 views
Hello,

I have a date column in my grid which shows dates in the "d" format, dd/MM/yyyy.  However, the underlying data sometimes (actually most of the time) contains dates that have a non-12 AM time component, such as 12/10/1998 8:30 am.  The user does not see the 8:30 am part, and when they try to use the column filter for date EdualTo 12/10/1998, they do not get a match, since the time component is not the perfect 12:00:00 am.  Is there any trick to get around this issue?
Dasha
Top achievements
Rank 1
 answered on 03 Aug 2011
1 answer
235 views
Hello,

I have the folowing RadSplitter control.
I need to expand the RadSlidingPane (ContentRadSlidingPane) onload, and to prevent the use from collapsing it (Exactly as http://www.telerik.com/help/aspnet-ajax/introduction.html).
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="700" Height="500">
           <telerik:RadPane ID="LeftPane" runat="server" Width="22px" Scrolling="none">
                <telerik:RadSlidingZone ID="ContentsSlidingZone" runat="server" Width="22px">
                    <telerik:RadSlidingPane ID="ContentRadSlidingPane" Title="Pane1" runat="server"  Width="150px">
                        Contents
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None">
                <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false">
                    <telerik:RadPane ID="Radpane2" runat="server">
                        <div style="padding: 5px">
                            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
         
                            </asp:ContentPlaceHolder>
                        </div>
                    </telerik:RadPane>
                </telerik:RadSplitter>
            </telerik:RadPane>
        </telerik:RadSplitter>

Please, I need you help,
It is appreciated to send me the modified code.

Regards,
Bader
Dobromir
Telerik team
 answered on 03 Aug 2011
1 answer
50 views
Hi All,
Please have a look on the image attached.

In That I have used rad grid with grouping option.
My requirement is like I need to group
-> group1
    ->groupmember1(now need to group based on groupmember1 )
    ->groupmember2(now need to group based on groupmember2 )
        -mem1
        -mem2
    ->groupmember3
->group2
 
I mean first i want to group based on group1 and inside group1
I need to group based on each member of group(groupmember1) as shown above.
In this i need to implement filteration , sorting , editing

Please let me if any way to achieve this....
Vasil
Telerik team
 answered on 03 Aug 2011
3 answers
84 views
I want to find a node on a Treeview based on not the value of the node but based on combination of both value and category as the value field is not unique.

I am writing the following code and just want to clarify whether it's correct.

  If Not radTree.FindNode(Function(o) o.Value = NodeValue  And  o.Category = "PORT") Is Nothing Then
            node = radTree.FindNode(Function(o) o.Value = NodeValue And o.Category = "PORT")
  End If

Thanks
Madhu Rao
Nikolay Tsenkov
Telerik team
 answered on 03 Aug 2011
1 answer
175 views
Hi, 

   I want to implement this RadAsyncUpload using FileApi and IFrame techniques, I needed some samples to implement them, request you to provide me the same as implementing this feature with silverlight or flash depends on clients desktop environment, am planning to implement the same with FileAPI n IFrame.

 Also I want to know that if these methods work in IE8? 

So please give me some sample code or project to implement multi file upload using RadAsyncUpload FileAPI and IFrame..

Awaiting for your reply.


thanks
Pramodh
Genady Sergeev
Telerik team
 answered on 03 Aug 2011
1 answer
171 views


Is it possible to modify the SqlDataSource of a RadGrid, before it gets bound to the grid?

In my example I have query that is returning sets of data with the following column names.

Parameter1Title
Parameter1Value
Parameter2Title
Parameter2Value
Parameter3Title
Parameter3Value


What I need to do is sort of normalize this set into just two columns that contains only the ones that have a value.

For example, imagine the returned set contains these values.

Parameter1Title   "Age"
Parameter1Value   "45"
Parameter2Title   null
Parameter2Value   null
Parameter3Title   "Color"
Parameter3Value   "Blue"


From this I need to created an SqlDataSource that holds the following info for the grid

Parameter   Value
"Age"       "45"
"Color"     "Blue"

Where the 2nd parameter set was ignored as it had no value.

Note also, this Parameter grid is a child grid to grid called Attributes. That is, it's SqlDataSource is fed the AttributeID as the rows on the Attribute grid as clicked.

Where would I make this change? That is, intercept before the data is bound to the grid? Also, am I better off creating a new DataSet to bind to the grid? Is that possible with the RadGrid?





Daniel
Telerik team
 answered on 03 Aug 2011
3 answers
111 views
Hi,

I need to refresh the nested grid for some functions. Please check the attached image for clear idea.
There is one textbox below the nested grid and on enter key press of that textbox, I need to rebind the nested grid without postback.
The code for that is as below. Issue is it always posts back the page, which i don't want.
It stores the data in database which I store on "saveComment" function, but on success of that, it does not call the button event, inestead of that it post backs the page.
Where am I wrong?

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
 
           $(function () {
               $('.water').bind('keypress', function (e) {
                   var bookID = document.getElementById(this.id.replace('txtComment', 'hdnCommentBookID')).value;
                   var btnRefreshComment = document.getElementById('<%=btnRefreshComments.ClientID %>');
 
                   if (e.keyCode == 13) {
                       e.preventDefault();
                       $.ajax({
                           type: "POST",
                           url: "LogbookForCoaches.aspx/saveComment",
                           data: '{commentText:"' + this.value + '",bookid:"' + bookID + '"}',
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function (msg) {
                               btnRefreshComment.click(); //It does not call the event too                           }
                       });
                   }
               });
           });
 
           //Delete comment from the comment list
           $(function () {
               $('.DelComment').click(function () {
                   var commentID = document.getElementById(this.id.replace('btnImgDelete', 'hdnCommentID')).value;
                   var bookID = document.getElementById(this.id.replace('btnImgDelete', 'hdnBookID')).value;
 
                   $.ajax({
                       type: "POST",
                       url: "LogbookForCoaches.aspx/DeleteComment",
                       data: '{commentID:"' + commentID + '",bookid:"' + bookID + '"}',
                       contentType: "application/json; charset=utf-8",
                       dataType: "json",
                       success: function (msg) {
                       }
                   });
               });
           });
       </script>
   </telerik:RadCodeBlock>
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
       EnableAJAX="true">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="btnRefreshComments" EventName="Click">
               <UpdatedControls>
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
   <telerik:RadGrid ID="dtBook" AllowPaging="True" runat="server" PageSize="10" ShowHeader="false"
       OnItemDataBound="dtBook_ItemDataBound">
       <PagerStyle Mode="NumericPages" />
       <MasterTableView TableLayout="Fixed" DataKeyNames="BookID">
           <ItemTemplate>
               <table>
                   <tr>
                       <td>
                           <div class="eg-bar">
                               <span id="faq2-title" class="iconspan">
                                   <img src="../Images/Logbook_Images/down-arrow.png" class="attachmentImage" /></span>Comments: 
                               <asp:Label ID="lblTotalComments" runat="server" ForeColor="Green"></asp:Label></div>
                           <div id="faq2" class="icongroup1" runat="server">
                               <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                   <tr>
                                       <td>
                                           <div id="divComments" class="Comments" runat="server" style="background-color: #EDEFF4;
                                               border: 1px; border-style: solid; border-color: #dbdbdb; padding-left: 3px;">
                                               <center>
                                                   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                                                   </telerik:RadAjaxLoadingPanel>
                                               </center>
                                               <asp:Label ID="lblCommentMessage" runat="server" Text="No comments entered yet."
                                                   ForeColor="Red" Visible="false" class="CommentMessage"></asp:Label>
                                               <telerik:RadGrid ID="radComments" AllowPaging="True" runat="server" PageSize="15"
                                                   Skin="" GridLines="None" BorderStyle="None" BorderColor="Transparent" ShowHeader="false"
                                                   OnItemDataBound="radComments_ItemDataBound" Width="97%" EnableTheming="false"
                                                   Style="padding-left: 16px;" OnPageIndexChanged="radComments_PageIndexChanged">
                                                   <PagerStyle Mode="NumericPages" />
                                                   <MasterTableView TableLayout="Fixed" Width="100%" Height="100%" BorderStyle="None"
                                                       DataKeyNames="BookID,commentid,CommentAttachment,userid,Commenttype">
                                                       <ItemTemplate>
                                                           <table width="100%" border="0" cellspacing="1" cellpadding="1">
                                                               <tr>
                                                                   <td class="altbg" width="5%">
                                                                       <asp:Image ImageAlign="AbsMiddle" ID="imgWriterImage" runat="server" />
                                                                   </td>
                                                                   <td class="altbg" width="20%" align="left">
                                                                       <strong>
                                                                           <%# Eval("UserName") + ":" %></strong>
                                                                   </td>
                                                                   <td class="altbg" width="55%" align="left">
                                                                       <%# Eval("Commenttext") %>
                                                                   </td>
                                                                   <td align="center" class="altbg" width="20%">
                                                                       <table border="0" cellspacing="0" cellpadding="4">
                                                                           <tr>
                                                                               <td align="center">
                                                                                   <asp:HiddenField ID="hdnCommentID" runat="server" Value='<%# Eval("commentid") %>' />
                                                                                   <asp:HiddenField ID="hdnBookID" runat="server" Value='<%# Eval("bookid") %>' />
                                                                                   <asp:ImageButton ID="btnImgDelete" runat="server" ImageUrl="~/Forum/ForumImages2/delete.gif"
                                                                                       class="DelComment" ToolTip="Delete" />
                                                                               </td>
                                                                           </tr>
                                                                       </table>
                                                                   </td>
                                                               </tr>
                                                           </table>
                                                       </ItemTemplate>
                                                   </MasterTableView>
                                               </telerik:RadGrid>
                                           </div>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td height="30" class="commentstext">
                                           Write Comments For:
                                       </td>
                                   </tr>
                                   <tr>
                                       <td class="writecommentpad">
                                                <asp:RadioButton ID="rdoPublic" runat="server" AutoPostBack="false"
                                               Checked="true" CssClass="PageLabel" GroupName="GrpCommentType" Text="Player & Coaches" />
                                           <asp:RadioButton ID="rdocoaches" runat="server" AutoPostBack="false" CssClass="PageLabel"
                                               GroupName="GrpCommentType" Text="Coaches" />
                                           <asp:RadioButton ID="rdoPrivate" runat="server" AutoPostBack="false" CssClass="PageLabel"
                                               GroupName="GrpCommentType" Text="Me (Private)" />
                                           <br />
                                              
                                           <asp:Panel ID="pnlComment" runat="server" Style="padding-left: 20px;">
                                               <asp:HiddenField ID="hdnCommentBookID" runat="server" Value='<%# Eval("BookID")%> ' />
                                               <asp:TextBox ID="txtComment" class="water" runat="server" Width="85%" BorderStyle="Solid"
                                                   BorderWidth="1px" ToolTip="Write a comment..." BorderColor="#dbdbdb" Text="Write a comment..."
                                                   ValidationGroup='<%# DataBinder.Eval(Container,"ItemIndex") %>'></asp:TextBox><br />
                                           </asp:Panel>
                                       </td>
                                   </tr>
                               </table>
                           </div>
                       </td>
                   </tr>
               </table>
               <br />
           </ItemTemplate>
       </MasterTableView>
   </telerik:RadGrid>
   <asp:Button ID="btnRefreshComments" runat="server" Text='<%# DataBinder.Eval(Container,"ItemIndex") %>'
       Style="display: none;" />

protected void dtBook_ItemDataBound(object sender, GridItemEventArgs e)
    {
        Book_Comment objComment = new Book_Comment();
        DataTable dt = new DataTable();      
      
        System.Web.UI.WebControls.Label lblAttachmentMsg = null;
        if ((e.Item.ItemType == GridItemType.AlternatingItem | e.Item.ItemType == GridItemType.Item))
        {        
            ID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["BookID"].ToString();
            string BookId = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["BookID"].ToString();
 
            TextBox txtComment = (TextBox)e.Item.FindControl("txtComment");
            Button btnComment = (Button)e.Item.FindControl("btnComment");
             
            #region "Comments"
 
            RadGrid radComments = (RadGrid)e.Item.FindControl("radComments");
            Button objButtonRefresh = (Button)e.Item.FindControl("btnRefreshComments");
            HtmlGenericControl divComments = (HtmlGenericControl)e.Item.FindControl("divComments");
            Label lblCommentMessage = (Label)e.Item.FindControl("lblCommentMessage");
            if (radComments != null)
            {
                ShowComments(BookId, radComments);
                Label lblTotalComments = (Label)e.Item.FindControl("lblTotalComments");
                lblTotalComments.Text = "(" + radComments.Items.Count.ToString() + ")";
                if (radComments.Items.Count < 1)
                    lblCommentMessage.Visible = true;
                else
                    lblCommentMessage.Visible = false;
            }
 
            AjaxSetting objAjxSetting = new AjaxSetting();
            objAjxSetting.AjaxControlID = btnRefreshComments.ClientID;// txtComment.ClientID;
            AjaxUpdatedControl objUpdatedCntrl = new AjaxUpdatedControl();
            objUpdatedCntrl.ControlID = radComments.ClientID;
            objUpdatedCntrl.UpdatePanelRenderMode = UpdatePanelRenderMode.Inline;
            objAjxSetting.UpdatedControls.Add(objUpdatedCntrl);
            this.RadAjaxManager1.EnableAJAX = true;
            this.RadAjaxManager1.AjaxSettings.Add(objAjxSetting);
 
            AjaxUpdatedControl objUpdatedCntrl1 = new AjaxUpdatedControl();
            objUpdatedCntrl1.ControlID = radComments.ClientID;
            this.RadAjaxManager1.AjaxSettings[0].UpdatedControls.Add(objUpdatedCntrl1);
            #endregion
        }
    public void btnRefreshComments_Click(object sender, System.EventArgs e)
    {
    }
Maria Ilieva
Telerik team
 answered on 03 Aug 2011
1 answer
103 views
Hi,

I want to display a new child window(created by me) for creating a new appointment instead of the one which is built in Telerik Scheduler.
How can I achieve this?

Thanks,
Navya
Peter
Telerik team
 answered on 03 Aug 2011
11 answers
159 views
Dear Telerik,

In IE the TimeLineView looks like this: http://bart.nimio.info/images/fora/verspringScheduler.JPG
In FireFox the same TimeLineView looks like this: http://bart.nimio.info/images/fora/verspringSchedulerFF.JPG

How can I make the IE-timelineview look the same as the FF timelineview?
Ivan Zhekov
Telerik team
 answered on 03 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?