Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
178 views
This issue is related to another form post, but slightly different regarding maintaining state of the tree view nodes changed by client side code across post back.

I have four nodes w/Check boxes
A
B
C
D

When A is clicked, if it is checked, it will disable and uncheck every other node.  If A is unchecked it will re-enable all other nodes.
What I have found is that if I check B, and then check A, post back, I get my expected result - only A checked with all others disabled and unchecked.
Now, if I uncheck A (which re-enables everything), on the next post back all the other nodes are once again disabled.  As if the enable/disable did not persist across the post back (yet it did the first time?).

Code below (code behind is empty):

    function TVOnNodeChecked(sender, e)  
    { 
        var Tree = $find('<%=rtvTest.ClientID %>'); 
        var TreeNodes = Tree.get_allNodes(); 
        var ClickedNode = e.get_node(); 
 
        if (ClickedNode.get_value() == 1)  
        { 
            Tree.trackChanges(); 
            for (var i = 0; i < TreeNodes.length; i++)  
            { 
                var thisNode = TreeNodes[i]; 
                var thisNodeCB = thisNode.get_checkBoxElement(); 
                if (thisNode.get_value() != 1)  
                { 
                    if (ClickedNode.get_checked()) { 
                        thisNode.set_checked(false); 
                        thisNode.set_enabled(false); 
                    } 
                    else  
                    { 
                        thisNode.set_enabled(true); 
                    } 
                }             
            } 
            Tree.commitChanges(); 
        } 
    } 

<asp:Panel ID="pnl1" runat="server"
    <telerik:RadTreeView ID="rtvTest" runat="server" CheckBoxes="true" CheckChildNodes="true"  OnClientNodeChecked="TVOnNodeChecked"
        <Nodes> 
            <telerik:RadTreeNode Text="Node1" Value="1"></telerik:RadTreeNode> 
            <telerik:RadTreeNode Text="Node2" Value="2"></telerik:RadTreeNode> 
            <telerik:RadTreeNode Text="Node3" Value="3"></telerik:RadTreeNode> 
            <telerik:RadTreeNode Text="Node4a" Value="-1"
            </telerik:RadTreeNode> 
        </Nodes> 
    </telerik:RadTreeView> 
 
</asp:Panel> 
 
<br /> 
<asp:Button ID="btnPostback" runat="server" Text="Go go Postback" /> 


Telerik control version is 2008.03.1314.35
Yana
Telerik team
 answered on 30 Apr 2009
3 answers
234 views
Have the following grid in my aspx page:
<telerik:RadGrid id="gridMessages" runat="server" AllowSorting="True" OnNeedDataSource="gridMessages_NeedDataSource" 
 
AutoGenerateColumns="False" Skin="Office2007" AllowMultiRowSelection="True" Width="99%" EnableViewState="true" > 
 
<MasterTableView Width="100%">  
 
<Columns> 
 
<telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn">  
 
<HeaderStyle Width="20px"></HeaderStyle> 
 
</telerik:GridClientSelectColumn> 
 
<telerik:GridHyperLinkColumn DataNavigateUrlFields="msgtype,msggroupid,msgnumber" UniqueName="View"   
 
DataNavigateUrlFormatString="MessageDetail.aspx?t={0}&g={1}&n={2}" Text="View" > 
 
<ItemStyle ForeColor="Blue" /> 
 
</telerik:GridHyperLinkColumn> 
 
<telerik:GridBoundColumn HeaderText="Type" DataField="msgtype" Visible="false">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Group" DataField="msggroupid">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Number" DataField="msgnumber" Visible="false">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Recv'd Date" DataField="recvdtdate">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Recv'd Time" DataField="recvdttime">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Tag" DataField="msgtag">  
 
</telerik:GridBoundColumn> 
 
<telerik:GridBoundColumn HeaderText="Description" DataField="msgdescription">  
 
</telerik:GridBoundColumn> 
 
</Columns> 
 
</MasterTableView> 
 
<ClientSettings> 
 
<Selecting AllowRowSelect="True" /> 
 
</ClientSettings> 
 
</telerik:RadGrid> 
 

I'm attempting to set up a Hashtable to the values from the grid with the following code:
        public List<Hashtable> getSelectedValues()  
        {  
            List<Hashtable> list = new List<Hashtable>();  
 
            GridItemCollection items = gridMessages.SelectedItems;  
            foreach (GridItem item in items)  
            {  
                Hashtable values = new Hashtable();  
                ((GridDataItem)item).ExtractValues(values);  
                list.Add(values);  
            }  
 
            return list;  
        } 

I can check any number of rows in the GridClientSelectColumn, but no matter what, gridMessages.SelectedItems is always zero.  Any ideas?
bdk0172
Top achievements
Rank 1
 answered on 30 Apr 2009
1 answer
93 views
Hi!

I'm trying to use the RadTabStrip to control the display of data in an IFrame in a Microsoft Dynamics CRM form. My application uses two TabStrips to filter out information displayed in the CRM IFrame. Both TabStrips are data bound to the CRM filtered database views. When the CRM form is loaded, my page is loaded OK in the IFrame. The top TabStrip is populated with two tabs, the tab text is correctly selected from the CRM database.

When I click the first tab, which has an ontabclick function (CS) that copies the label's text into another label used in the where clause in the data source for the second TabStrip, the page in the IFrame braks out and opens a new browser window outside the MS CRM application. Why does this happen, and is there a way to make my page stay inside the IFrame?
Paul
Telerik team
 answered on 30 Apr 2009
1 answer
63 views
i want to buil a shaeduler with 4 days in viewmode = weekview
the code in  .cs
protected void Page_Load(object sender, EventArgs e)
        {
            DateTime datenow = DateTime.Now.Date;
            RadScheduler1.SelectedDate = datenow;
            doDates();
      }
......

protected void doDates()
        {
            DateTime datenow = RadScheduler1.SelectedDate;
            DateTime firstday = datenow.AddDays(-1);
            DateTime endday = datenow.AddDays(2);
            DayOfWeek firstdayofWeek = firstday.DayOfWeek;
            DayOfWeek enddayofWeek = endday.DayOfWeek;
            RadScheduler1.FirstDayOfWeek = firstdayofWeek;
            RadScheduler1.LastDayOfWeek = enddayofWeek;

        }
the problem is when I change "today" in the calendar of scheduler, it does not change automatically RadScheduler1.FirstDayOfWeek and RadScheduler1.LastDayOfWeek but retains all the time 4 days.
This process what happens in the code of telerik and I can not change.
I need help for this problem.

Thanks

BUI
Top achievements
Rank 1
 answered on 30 Apr 2009
1 answer
77 views
Hello,

When I'm printing my webpage the image in the rotator only prints out properly when on the first frame. If any other frame is the active frame the image prints blank. Is there anyway to get it to print the second or third frame when the user clicks 'print' while that frame is showing?
Fiko
Telerik team
 answered on 30 Apr 2009
2 answers
106 views
Hi,

I am doing POC on RADGrid with Slider paging.
But I am getting an exception as "Input string was not in a correct format."  when I move / drags slider for paging. It's not working for me. I am attaching my ASPX and VB.Net code along I will appreciate if I can get feedback as early as possible.

We are planning to incorporate Telerik controls in our application for rich feel and high performance but only if I get rid of these kind of minor error which eats lots of head.

Actual Exception
Input string was not in a correct format.   
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
 
Exception Details: System.FormatException: Input string was not in a correct format.  
 
Source Error:   
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
 
Stack Trace:   
 
 
[FormatException: Input string was not in a correct format.]  
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599  
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112  
   Telerik.WebControls.GridClientChangesLoader.LoadAJAXScrolledControl(String scrolledControl) +155  
   Telerik.WebControls.GridClientChangesLoader.LoadChanges(String argument, NameValueCollection collection) +946  
   Telerik.WebControls.RadGrid.LoadPostData(String postDataKey, NameValueCollection postCollection) +582  
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +673  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2970  
 
   
 
 
--------------------------------------------------------------------------------  
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433  

ASPX File (Default.aspx)
<%@ Page Language="VB" %> 
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> 
<%@ Register TagPrefix="radG" Namespace="Telerik.WebControls" Assembly="RadGrid.Net2" %> 
<%@ Register TagPrefix="radC" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<script runat="server">  
 
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>POC Page</title> 
</head> 
<body> 
    <form id="frmPOC" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" EnablePartialRendering="True">  
            <scripts> 
                <asp:ScriptReference Path="~/ScriptLibrary/Atlas.js" /> 
            </scripts> 
        </asp:ScriptManager> 
        <radC:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <ajaxsettings> 
                <radC:AjaxSetting AjaxControlID="grdSliderPOC">  
                    <UpdatedControls> 
                        <radC:AjaxUpdatedControl ControlID="grdSliderPOC" /> 
                    </UpdatedControls> 
                </radC:AjaxSetting> 
            </ajaxsettings> 
        </radC:RadAjaxManager> 
        <h1> 
            POC for Telerik Grid</h1> 
        <h2> 
            Grid with Slider paging</h2> 
        <table cellpadding="0" cellspacing="0" border="0" width="100%">  
            <tr> 
                <td> 
                    <radG:RadGrid ID="grdSliderPOC" EnableAJAX="True" runat="server" Width="100%" AutoGenerateColumns="False" 
                        GridLines="None" AllowSorting="true" AllowPaging="true" PageSize="5">  
                        <mastertableview> 
                            <Columns> 
                                <radG:GridBoundColumn UniqueName="DueDate" ReadOnly="True" DataField="DueDate" HeaderText="Due Date">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="Action" ReadOnly="True" DataField="Action" HeaderText="Action">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="Description" ReadOnly="True" DataField="Description" 
                                    HeaderText="Description">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="Customer" ReadOnly="True" DataField="Customer" 
                                    HeaderText="Customer">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="Contact" ReadOnly="True" DataField="Contact" HeaderText="Contact">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="SalesRep" ReadOnly="True" DataField="SalesRep" 
                                    HeaderText="Sales Rep">  
                                </radG:GridBoundColumn> 
                                <radG:GridBoundColumn UniqueName="Status" ReadOnly="True" DataField="Status" HeaderText="Status">  
                                </radG:GridBoundColumn> 
                            </Columns> 
                            <RowIndicatorColumn Visible="False">  
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn Visible="False">  
                            </ExpandCollapseColumn> 
                        </mastertableview> 
                        <pagerstyle cssclass="pagingControls" mode="Slider" /> 
                    </radG:RadGrid> 
                </td> 
            </tr> 
        </table> 
    </form> 
</body> 
</html> 

VB File (Default.aspx.vb)
Imports System.Data  
 
Partial Class _Default  
    Inherits Web.UI.Page  
 
    ''' <summary>  
    '''   
    ''' </summary>  
    ''' <param name="sender"></param>  
    ''' <param name="e"></param>  
    ''' <remarks></remarks>  
    Protected Sub grdSliderPOC_NeedDataSource(ByVal sender As ObjectByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles grdSliderPOC.NeedDataSource  
 
        PopulateSliderGrid()  
 
    End Sub 
 
    ''' <summary>  
    '''   
    ''' </summary>  
    ''' <remarks></remarks>  
    Private Sub PopulateSliderGrid()  
 
        Dim dtSource As New DataTable()  
        Dim drNew As DataRow  
 
        dtSource.Columns.Add("DueDate")  
        dtSource.Columns.Add("Action")  
        dtSource.Columns.Add("Description")  
        dtSource.Columns.Add("Customer")  
        dtSource.Columns.Add("Contact")  
        dtSource.Columns.Add("SalesRep")  
        dtSource.Columns.Add("Status")  
 
        For iCount As Integer = 1 To 20  
 
            drNew = dtSource.NewRow()  
            drNew("DueDate") = "10/21/2009" 
            drNew("Action") = "Submit Proposal" 
            drNew("Description") = "Contact / Contract follow up" 
            drNew("Customer") = "Customer Name Two" 
            drNew("Contact") = "Contact Name" 
            drNew("SalesRep") = "Sales Rep Name" 
            drNew("Status") = "Message Left" 
            dtSource.Rows.Add(drNew)  
 
        Next 
 
        grdSliderPOC.MasterTableView.DataSource = dtSource.DefaultView  
 
    End Sub 
 
 
End Class 

Thanks,
Avi
Avinash
Top achievements
Rank 2
 answered on 30 Apr 2009
9 answers
118 views
I ask because its not a choice on the skin demo, and more importantly, more and more css sprite images seem to be wrong in the last builds.  For example, the icons on the AJAX spell check context menu now seem wrong.  The alignment icons (like in table wizard) have been wrong for awhile.
Georgi Tunev
Telerik team
 answered on 30 Apr 2009
1 answer
266 views
Hi

I am getting this problem. Please help me.

In my scheduler, if I add a new appointment, its getting added and reflected in the schedule.
If I drag or resize an appointment, it is getting updated and reflected in schedule. If I delete an appointment it also works fine.

Problem is: Suppose I am editing an appointment immediately after creation, The advanced editor is not getting opened. If I press refresh after adding an appointment and then editing it, then it opens.

Also if I am editing an appointment using advanced editor, the update is done in database, but it is not reflected in scheduler. I need to refresh the screen to see the update.

Note: I am using Telerik RAD controls Q3 2008 Trial version. I also have resource types (additional drop down lists) in my appointment.

Thanks.

Saranya
Saranya
Top achievements
Rank 2
 answered on 30 Apr 2009
1 answer
81 views
Hi all ! I spend all my morning to search an a priori very simply thing...

I have a grid with a GridDateTimeColumn

In this GridDateTimeColumn, i allow filter, so i have a calendar in my thead

Question, how can i set the tooltip of my calendar ? I have "Open the calendar popup", and i simply want to have another text !

Thanks for your answer and sorry if this is a simply property !
Princy
Top achievements
Rank 2
 answered on 30 Apr 2009
2 answers
104 views
hello to all expert in telerik

                          i would like to ask help once again on how am i going to get all the rows values in a grid..please help

sample codes is higly appreciated

thanks
Princy
Top achievements
Rank 2
 answered on 30 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?