Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
183 views

I have a grid that when I go into edit mode I loose my Links except for refrest.

Here is part of my code.

 

 <table>
        <asp:Repeater ID="Repeater1" runat="server">
       
            <ItemTemplate>
                    <tr class="comment">
                        <td align="left" colspan="2">
                            &lt;
                            <asp:Label ID="lblCreatedBy" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "User.UserName") %>' />
                            &nbsp;
                            <asp:Label ID="lblCreatedDate" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "CreatedDateTime") %>' />
                            &gt;
                        </td>
                        <td align="left">
                            <asp:Label ID="lblComment" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "ApplicantNote") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td colspan="2">
                            <table>
                                <asp:Repeater ID="Repeater2" runat="server" DataSource='<%# DataBinder.Eval(Container.DataItem, "Notes") %>'>
                                    <ItemTemplate>
                                        <tr class="comment">
                                            <td align="left">
                                                <
                                                <asp:Label ID="lblCreatedBy2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "User.UserName") %>' />
                                                &nbsp;
                                                <asp:Label ID="lblCreatedDate2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "CreatedDateTime") %>' />
                                                >
                                            </td>
                                            <td align="left">
                                                <asp:Label ID="lblComment2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, ApplicantNote") %>' />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>

    <table style="margin-left:auto; margin-right:auto; border-style: solid; border-color: Navy; border-width: 2px;" width="760px">
        <tr>
            <td style="margin-left:auto; margin-right:auto">
                <asp:Label ID="noteTitleLabel"
                               runat="server"
                               Text="Note for "
                               Font-Bold="true" />
                <asp:Label ID="noteApplicant"
                               runat="server"
                               Font-Bold="true" />
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadGrid ID="gridComments"
                                runat="server"
                                Skin="Vista" Width="750px"
                                OnDetailTableDataBind="gridComments_DetailDataBind" OnNeedDataSource="gridComments_NeedDataSource"
                                OnInsertCommand="gridComments_InsertCommand"
                    ondeletecommand="gridComments_Delete" onupdatecommand="gridComment_Update"
                    onitemdatabound="gridComment_ItemDataBound" >
                    <MasterTableView AutoGenerateColumns="false"
                                    DataKeyNames="NoteID, ParentID"
                                    CommandItemDisplay="Top" EditMode="PopUp">
                        <DetailTables>
                            <telerik:GridTableView AutoGenerateColumns="false"
                                                    CommandItemDisplay="Top" DataKeyNames="NoteID, ParentID"  Width="710px">
                                <NoRecordsTemplate>
                                    <p>No replies to this comment</p>
                                </NoRecordsTemplate>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="ParentID" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="User.UserName" UniqueName="User.UserNameChild" HeaderText="User">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CreatedDateTime" HeaderText="Date" UniqueName="CreatedDateTimeChild">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ApplicantNote" HeaderText="Note" UniqueName="ApplicantNoteChild">
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <CommandItemTemplate>                                                         
                            <div style="padding:3px 0px;text-align:right;">
                               
                                    <asp:LinkButton ID="lnkEdit" runat="server" CommandName="EditSelected"
                                     CausesValidation="false" Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Edit.gif" />
                                     Edit / View
                             </asp:LinkButton>
                             &nbsp;
                                <asp:LinkButton Style="vertical-align: bottom" ID="lnkAdd" runat="server" CommandName="InitInsert"
                                        Visible='<%# !gridComments.MasterTableView.IsItemInserted && gridComments.EditIndexes.Count == 0 %>'>
                                    <img style="border:0px;"
                                        alt="" src="CssClass/Images/AddRecord.gif" />
                                    Leave Reply
                                </asp:LinkButton>
                                &nbsp;
                                 <asp:LinkButton ID="lnkDelete"
                                     OnClientClick="javascript:return confirm('Delete selected Note?')"
                                     runat="server"                                    
                                     CommandName="DeleteSelected"
                                     CausesValidation="false"
                                     Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Delete.gif" />
                                     Delete
                                     </asp:LinkButton>
                                &nbsp;
                               
                                <asp:LinkButton ID="lnkRefresh1" runat="server" CommandName="RebindGrid">
                                    <img style="border:0px;vertical-align:middle;"
                                        alt="" src="CssClass/Images/Refresh.gif" />
                                    Refresh
                                </asp:LinkButton>
                        </CommandItemTemplate>
                        <EditFormSettings EditFormType="Template">
                            <FormTemplate>
                                <table>
                                    <tr>
                                        <td align="center">
                                            Note
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="noteTextBoxChild"
                                                 Width="375px"
                                                 ReadOnly="false"
                                                 onChange="Count(this,700)"
                                                 onKeyUp="Count(this,700)"
                                                 Height="195px"
                                                 runat="server"
                                                 
                                                 TextMode="MultiLine"
                                                 MaxLength="700" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <asp:Button ID="btnUpdate"
                                                Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'
                                                runat="server"
                                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                            </asp:Button>
                                            &nbsp;
                                            <asp:Button ID="btnCancel" Text="Cancel"
                                                runat="server" CausesValidation="False"
                                                CommandName="Cancel">
                                            </asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </FormTemplate>
                        </EditFormSettings>
                       
                            </telerik:GridTableView>
                           
                        </DetailTables>
                       
                        <Columns>
                            <telerik:GridBoundColumn DataField="NoteID" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="User.UserName" UniqueName="User.UserName" HeaderText="User">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CreatedDateTime" HeaderText="Date" UniqueName="CreatedDateTime">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ApplicantNote" HeaderText="Note" UniqueName="ApplicantNote">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <div style="padding:3px 0px;text-align:right;">
                             <asp:LinkButton ID="lnkEdit" runat="server" CommandName="EditSelected"
                                     CausesValidation="false" Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Edit.gif" />
                                     Edit / View
                             </asp:LinkButton>

                            &nbsp;
                                <asp:LinkButton Style="vertical-align: bottom" ID="lnkAdd" runat="server" CommandName="InitInsert"
                                        Visible='<%# !gridComments.MasterTableView.IsItemInserted && gridComments.EditIndexes.Count == 0 %>'>
                                    <img style="border:0px;"
                                        alt="" src="CssClass/Images/AddRecord.gif" />
                                    Add Note
                                </asp:LinkButton>
                                &nbsp;
                                 <asp:LinkButton ID="lnkDelete"
                                     OnClientClick="javascript:return confirm('Delete selected Note?')"
                                     runat="server"                                    
                                     CommandName="DeleteSelected"
                                     CausesValidation="false"
                                     Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Delete.gif" />
                                     Delete
                                     </asp:LinkButton>
                                     &nbsp;
                                <asp:LinkButton ID="lnkRefresh1" runat="server" CommandName="RebindGrid">
                                    <img style="border:0px;vertical-align:middle;"
                                        alt="" src="CssClass/Images/Refresh.gif" />
                                    Refresh
                                </asp:LinkButton>
                        </CommandItemTemplate>
                        <EditFormSettings EditFormType="Template">
                            <FormTemplate>
                                <table>
                                    <tr>
                                        <td align="center">
                                            Note
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="noteTextBox"
                                                 Width="375px"
                                                 ReadOnly="false"
                                                 onChange="Count(this,700)"
                                                 onKeyUp="Count(this,700)"
                                                 Height="195px"
                                                 runat="server"
                                            
                                                 TextMode="MultiLine"
                                                 MaxLength="700" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <asp:Button ID="btnUpdate"
                                                Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'
                                                runat="server"
                                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                            </asp:Button>
                                            &nbsp;
                                            <asp:Button ID="btnCancel" Text="Cancel"
                                                runat="server" CausesValidation="False"
                                                CommandName="Cancel">
                                            </asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </FormTemplate>
                        </EditFormSettings>
                       
                        <NoRecordsTemplate>
                            <p>No comments have been added</p>
                        </NoRecordsTemplate>
                    </MasterTableView>
                    <ClientSettings >
                    <Selecting AllowRowSelect ="true" />
                   
                    </ClientSettings>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>

Everything worked great until I added the Edit/View link and when the Edit/View link is clicked I only show Refresh icon.

Princy
Top achievements
Rank 2
 answered on 10 Sep 2009
1 answer
192 views
I have a 2 level hiearchy grid. The detail table has a commanditemtemplate with a link inside for add item. I am needing to add an onclick javascript event to this in the code behind and get the datakeyvalue of the master table row that we are adding to. So for instance
MasterTable = Schedule
DetailTable =  Event
Key = ScheduleID

When i databind the event datasource i want to use the event to grab the ScheduleID from the mastertable row and add it to a javascript call ShowEditForm(ScheduleId)

How can I get the key in the commanddataitem?
I am already grabbing the link and inserting a fake call that works - but I need that darn key? Any thoughts how i can get it here? I know how to get it if i'm in a griddataitem but not here?

 

If TypeOf (e.Item) Is GridCommandItem And e.Item.OwnerTableView.DataSourceID = "SqlDates" Then

 

 

Dim dataitem As GridCommandItem = CType(e.Item, GridCommandItem)

 

 

 

Dim hypr As HyperLink = CType(dataitem.FindControl("AddLink"), System.Web.UI.WebControls.HyperLink)

 

hypr.Attributes(

"onclick") = [String].Format("return ShowEditForm('{0}'", 0)

 

 

 

'editLink.Attributes("onclick") = [String].Format("return ShowEditForm('{0}','{1}');", dataitem("MessageId").Text, e.Item.ItemIndex)

 

 

End If

 

Princy
Top achievements
Rank 2
 answered on 10 Sep 2009
4 answers
125 views
Hi:
  I am the freshman for the Telerik. I just encounter a strange problem when using the grouping functionality provided by Grid.
  I just follow the grouping demo(Outlook-style Grouping) provided by Grid. It works fine.  But when i want to remove one of the grouping option, an error is throw. "Sys.WebForms.PageRequestManagerServerErrorException:Specified argument was out of range of valid value.Parameter Name: index"
  Please check my source code.


    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<div>  
        <%--        <telerik:Header runat="server" ID="Header1" NavigationLanguage="CS">  
        </telerik:Header>--%>  
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings>  
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    </UpdatedControls>  
                </telerik:AjaxSetting>  
            </AjaxSettings>  
        </telerik:RadAjaxManager>  
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">  
        </telerik:RadAjaxLoadingPanel>  
    </div>  
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" 
        GridLines="None" AutoGenerateColumns="False" Width="400px" PageSize="4" AllowCustomPaging="True" 
        ShowGroupPanel="true" PagerStyle-Position="Bottom" OnPageIndexChanged="RadGrid1_PageIndexChanged" 
        OnSortCommand="RadGrid1_SortCommand"  PagerStyle-AlwaysVisible="true" 
        OnGroupsChanging="RadGrid1_GroupsChanging"   
        onpagesizechanged="RadGrid1_PageSizeChanged">  
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>  
        <MasterTableView>  
            <GroupByExpressions>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Sex" FieldName="Sex"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Sex" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Age" FieldName="Age"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Age" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Name" FieldName="Name"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Name" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
            </GroupByExpressions>  
            <RowIndicatorColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </ExpandCollapseColumn>  
            <Columns>  
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="column" SortExpression="Name">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="Sex" HeaderText="Sex" UniqueName="column1" SortExpression="Sex">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="Age" DataType="System.Int32" HeaderText="Age" 
                    SortExpression="Age" UniqueName="column2">  
                </telerik:GridBoundColumn>  
            </Columns>  
        </MasterTableView>  
        <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">  
            <Selecting AllowRowSelect="True"></Selecting>  
            <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                ResizeGridOnColumnResize="False"></Resizing>  
        </ClientSettings>  
        <GroupingSettings ShowUnGroupButton="true" />  
    </telerik:RadGrid> 

In the server side,  a  List<Person> object is binded to the Grid.
There are 3 properties in Person.
public class Person  
{  
    public String Name { getset; }  
    public int Age { getset; }  
    public SexEnum Sex { getset; }  
}  
 
public enum SexEnum  
{  
    Male,  
    Female  
 Anybody can help me?
Michael Tao
Top achievements
Rank 1
 answered on 10 Sep 2009
3 answers
115 views
Is there a way to hide or remove the LoadingAjaxPanel for the grid? I have a situation where i have a grid inside a TabStrip and it's showing two LoadingAjaxPanels, one for the TabStrip and one for the grid. I need to always show the tabstrip one but i don't need to show it for the grid.
Stephen
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
122 views
Hello All!

I LOVE my RAD Controls on my normal asp.net pages.  They have greatly changed the way I work, for the better!

I am just beginning an adventure into a "Dynamic Data Website" and all the freedom of having LINQ do the work for me, and am having difficulty using my precious controls in that environment. 

For instance, the RadEditor displays well enough, but the <ImageManager> and other editor items cause a web.config error even though my web.config does display the Telerik items. While the Editor displays and does capture the text, it is only saving plain text, not the text as formatted within the control ** I HAVE READ all the posts on this site concerning web.config errors with the DialogHandler, and HAVE tried the various fixes with aspx vs axd extension in the web.config, but they have not worked. **

Other controls simply error.  I put the control on the aspx page (a custom page in the CustomPages folder in a "Dynamic Data Website"), and on the vb code behind page I get a message that the control has not been declared.

Since it's a pretty consistent 'non starter' using my controls within a Dynamic Data site, I am sure I am missing something global rather than something specific to one control or the other.

I know there must be a way to register these controls to work properly within the framework of a Dynamic Data website - LINQ and the ability to scaffold all tables is just too cool to be ignored, but upon searching this forum specifically for issues related to Dynamic Data sites I am not finding any results, and I am at a loss of what to try next.  I suspect it's that I am just too much of a newbie, so please be as specific as possible in your replies.

I am using the 2009.Q2 controls for asp.net 3.5, with a Dynamic Data Website generated in VS2008, with scaffoldAllTables set to true.  I am doing CustomPages where I want to use my Awesome Rad Controls. :)

Thank you for your time.  I appreciate Telerik's attention to helping us!

Susan 
Susan
Top achievements
Rank 1
 answered on 09 Sep 2009
2 answers
94 views
Hi,

I have one issue with Datetime filter textbox not set to empty after clicking on NoFilter menu item. Is there any solution for that?

Thanks,
Sam
Samnang
Top achievements
Rank 1
 answered on 09 Sep 2009
3 answers
916 views
Hello, I am having a problem with the radtext editor....  I am inserting the text from the radeditor into a sql table.  When I insert it the record in the db contains everything including the html tags. 
<span style="text-decoration: underline">this is a test.</span><br /><br /><span style="text-decoration: underline">this is another test.</span><br /><br />

My problem is when I try to pull that data back into any kindof of gridview, data repeater, datalist, it pulls all the tags as well.  I need to some how pull all the data into my ContentPlaceHolder1 and have it formatted like it was in the editor.  I have seen this done in classic asp, where the data is pulled straight from the sql table into an html table and then all the formating does what its suppose to do.  I am using asp.net though.  I have an update page with my rad editor and a display page for the results.  Can anybody help me out here?

Thank you

 

ManniAT
Top achievements
Rank 2
 answered on 09 Sep 2009
5 answers
186 views
Hello.

I am converting a page using asp:GridView to a RadGrid control and am having trouble with the latter's server side event DataBound.  In the GridView, I have used the DataBound to alter the HeaderText of a particular column based on the value of a Session variable:


protected
void scheduleGridView_DataBound(object sender, EventArgs e)

{

 

 

// Set the correct label on the data grid using session variable

 

 

 

if (clinTypeID == 1) //MD

 

 

 

{

 

scheduleGridView.Columns[0].HeaderText = 

"MD";
}

 

 

 

else //CRNA

 

 

 

{

 

scheduleGridView.Columns[0].HeaderText = 

"CRNA";

 

 

}}

Exactly the same code is used with the RadGrid:

 


protected
void scheduleRadGrid_DataBound(object sender, EventArgs e)

{

 

// Set the correct label on the RadGrid using session variable

 

 

 

 

if (clinTypeID == 1) //MD

 

 

 

 

{

 

 

scheduleRadGrid.Columns[0].HeaderText = 

"MD";
}

 

 

 

else //CRNA

 

 

 

 

{

 

 

scheduleRadGrid.Columns[0].HeaderText = 

"CRNA";

 

 

 

}}

This does not work for the RadGrid.  I set a breakpoint in this code and confirmed that the HeaderText value IS being changed.  However, this is not reflected when the control is rendered.  What could I be missing?  Thanks!

Tom Stanley

 

T. Stanley
Top achievements
Rank 1
 answered on 09 Sep 2009
0 answers
87 views
I was creating my own appointments and binding them to the RadScheduler. I seem to be adding the appointments, but am having trouble getting the other occurences of the ReccurenceRule to show. I kept the appointment data to the minimum, but maybe i missed a key property?

IList<Appointment> AppointmentList = new List<Appointment>();
foreach (DataRow row in data.AsEnumerable())
        {
            Appointment app = new Appointment();
            app.ID = row["ID"].ToString();
            app.RecurrenceParentID = row["RecurrenceParentID"].ToString();
            app.Subject = row["Subject"].ToString();
            app.Start = (DateTime)row["StartTime"];
            app.End = (DateTime)row["EndTime"];
            app.RecurrenceRule = row["RecurrenceRule"].ToString();
            AppointmentList.Add(app);
        } 

   RadScheduler1.DataSource = AppointmentList;
   RadScheduler1.DataBind();


my RecurrenceRule is a string like below

DTSTART:20090310T210000Z\r\nDTEND:20090311T210000Z\r\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU\r\n

I see the appointment, but its only for that one Tuesday?

other things i have attempted
  • modify the DTEND to a further date
  • set the appointment with all the different RecurrenceState values on the Enum
  • went ahead and put EnableRecurrenceSupport="true" on the scheduler itself
  • move the code from pageload to page_Init
  • tried the RecurrenceRule with and without the \r\n  (i read they are needed)

I feel theres something im missing as i am hoping to move from the XmlSchedulerProvider to my own custom implemented provider that has a database backend. I feel as if the provider is doing something that I'm missing, although i cant seem to find that something within reflector when i look at it.

cheers,
ryan




ryan grubbs
Top achievements
Rank 1
 asked on 09 Sep 2009
5 answers
323 views
Hello,

I'm trying to display a userControl in a tooltip for a treeview control which is displayed for few nodes based on a condition, The tooltip should display textboxes with some attributes of the Node, I'm Using RadToolTipManager following the demo

 <telerik:RadToolTipManager Width="215px" Skin="Sunset" Height="260px" 
                            RelativeTo="Element" AutoTooltipify="false" HideEvent="FromCode" ShowEvent="FromCode" ID="RadToolTipManager2" runat="server" OffsetX="15" Position="MiddleRight" 
                            OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate"
                        </telerik:RadToolTipManager> 

I'm setting the value of the tooltip to the NodeID
function OnClientMouseOver(sender, args) { 
         
         var nodeElem = args.get_node(); 
         if (nodeElem.get_level() != 0) { 
             var node = nodeElem.get_textElement(); 
 
             var tooltipManager = $find("<%= RadToolTipManager2.ClientID%>"); 
 
             //If the user hovers the image before the page has loaded, there is no manager created 
             if (!tooltipManager) return; 
 
             //Find the tooltip for this element if it has been created  
             var tooltip = tooltipManager.getToolTipByElement(node); 
 
             //Create a tooltip if no tooltip exists for such element 
             if (!tooltip) { 
                  
                 if (nodeElem.get_attributes().getAttribute("userdefined") == "yes") { 
                     tooltip = tooltipManager.createToolTip(node); 
                      
                     tooltip.set_value(nodeElem.get_attributes().getAttribute("NodeID")); 
                     tooltip.show(); 
                 } 
             } 
         } 
     } 
On the ToolTipManager AjaxUpdate event I'm trying to get the node from the treeview based on the attribute NodeID.But the treeview always shows just one node (root node) on the tree when it actually has 4 nodes totally.
 protected void RadToolTipmanager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) 
        { 
            ColumnDetails details = (ColumnDetails)this.LoadControl("ColumnDetails.ascx"); 
            details.NodeID = e.Value; 
            RadTreeNode oNode = rtvAssignSelectedTree.Nodes[0].Nodes.FindNodeByAttribute("NodeID", e.Value); 
            details.rtvSelectedTree = rtvAssignSelectedTree
            details.rttNodeToolTip = RadToolTipManager2
            string Text = oNode.Text.Substring(0, oNode.Text.IndexOf('(')); 
            string Length = oNode.Text.Substring(oNode.Text.IndexOf(','), oNode.Text.IndexOf(')') - oNode.Text.IndexOf(',')); 
            ((TextBox)details.FindControl("txtColumnName")).Text = Text; 
            ((TextBox)details.FindControl("txtLength")).Text = Length
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(details); 
        } 

Can someone please help me figure what i'm doing wrong. oNode in the above event is always null, rtvAssignSelectedTree.Nodes[0].Nodes.Count is always 0.

Thank you,
Phani
Phani Alla
Top achievements
Rank 1
 answered on 09 Sep 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?