Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
170 views

I have a problem moving the contextmenus from the ASP.NET-treeview to the ASP.NET AJAX-treeview.

I loaded the contextmenus for differenct nodetypes like this:
myTree.ContextMenuContentFile = "AllMenus.xml";

It seems I have to split the AllMenus.xml into an xml-file for each nodetype and load it like this:
RadTreeViewContextMenu contextMenu = new RadTreeViewContextMenu();

contextMenu.LoadContentFile("Menu1.xml");
myTree.ContextMenus.Add(contextMenu);

contextMenu.LoadContentFile("Menu2.xml");
myTree.ContextMenus.Add(contextMenu);

contextMenu.LoadContentFile("Menu3.xml");
myTree.ContextMenus.Add(contextMenu);

But when I rightclick on any node it shows the standard IE-contextmenu. What am I doing wrong or not doing at all?

Nikolay
Telerik team
 answered on 06 May 2008
2 answers
176 views
I have a Radgrid Control on my aspx page with one hyperlink column. I bind my grid with my datatable.  But the hyperlink column data will point to different urls, depends on its value. I need to check  the values on every rowbound and then setup the url for that row. How do I do that.  Which event fires on each rowbound. how do i access my row and  my hyperlink column. i have following:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/ColumnTypes/DefaultCS.aspx

but still i am not clear. please let me know the event that will fire and how do i write code to access that event to get my row data.
Shinu
Top achievements
Rank 2
 answered on 06 May 2008
7 answers
305 views
I have a web part in which I want to use the TreeView.  I am creating the controls in code during the CreateChildControls.  When the page renders I get the error:

Script controls may not be registered before PreRender

In CreateChildControls I am doing the following:

                rsm = new RadScriptManager();
                rsm.ID = "rsm";
                this.Controls.Add(rsm);

                rtv = new RadTreeView();
                rtv.ID = "rtv";
                this.Controls.Add(rtv);

My OnPreRender is calling base.OnPreRender

I have ensured the SafeControls entry and HttpHandler entries are in the web.config and also made sure the Telrik DLLs are in the GAC.

I am sure I am missing something simple but can't figure it out.

Thanks,
Raman
Erjan Gavalji
Telerik team
 answered on 06 May 2008
2 answers
126 views
I am making a registration form, which includes a birthday field.  However, we don't want to (and cannot) ask for the year of the client birthday.  I am trying to utilitize the RadComboBox (to select Month) and RadCalendar (to select date).  When the Month ComboBox's SelectedItem changed, I would like to change the RadCalender. 

But I am having some problems.  Here're the questions:

1) Can I eliminate the Title that showing Month/Year, coz we do not need it.
2) How can I change the initial month (not showing current day, but, say, Jan 1 2009)?  I tried to change the SelectedDate property, but no effect.

Thanks

Raymond Mui
Top achievements
Rank 1
 answered on 06 May 2008
1 answer
175 views
I have used MS gridView control and I was using following code to access every row on OnRowDataBound event.

Protected Sub gvRowDataBoundHandler(ByVal sender As Object, ByVal e As GridViewRowEventArgs)

If e.Row.RowType = DataControlRowType.DataRow Then

Dim o As Object = e.Row.DataItem

Dim rowView As DataRowView = DirectCast(o, DataRowView)

Dim row As DataRow = rowView.Row

Dim lblDesc As Label = e.Row.FindControl("lblDesc")

lblDesc.Text = row(

"ParentItem").ToString()

Dim lbSku As HyperLink = DirectCast(e.Row.FindControl("lbSku"), HyperLink)

lbSku.Text = row(

"ParentItem").ToString()

lbSku.NavigateUrl =

"http://www.yahoo.com?id=" & row("ParentItem").ToString()

End If

End Sub

aspx:

<asp:GridView ID="GridView1" runat="server" OnRowDataBound="gvRowDataBoundHandler" AutoGenerateColumns="False">

<Columns>

<asp:TemplateField HeaderText="Desc">

<HeaderStyle CssClass="HeaderCell" Width="14%" ForeColor="#1094C9" />

<ItemTemplate> <asp:Label ID="lblDesc" runat="server"></asp:Label></ItemTemplate>

</asp:TemplateField>

<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">

<ItemTemplate>

<asp:HyperLink ID="lbSku" runat="server" CssClass="Regular"></asp:HyperLink>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

I have to do exactly same task using RADGrid control. Can you help me how to do that.  Please explain with code, dont give me just the link to any tutorial. Because sometimes tutorials do not explain exactly what i am looking for. thanks

Princy
Top achievements
Rank 2
 answered on 06 May 2008
5 answers
97 views
Hi dear Telerik support
I have some problems with RadTree.
I have a grid that on edit it used usercontrol mode, in my usercontrol I have a tree.I want all node of tree be expanded when it showed, but tree just show parent nodes and when I duble click on each node It show child nodes, is it posible to make this?
I found that this problem is only in rtl mode. if grid mode is Rtl , then in usercontrol page tree dosn't work cuurectlly.even we set direction of tree to ltr it dosn't work yet.I think problem is in script that tree generat
Nikolay
Telerik team
 answered on 06 May 2008
1 answer
62 views
I am trying to use the rad ajax manager and i can get it to successfully update my form controls, however when I have two form controls side by side and the ajax manager fires, the form controls are displayed on top of one another.

Here is the secenario

I have
[txtboxProvinceState] [ddlProvinceState]

[ddlCountry]

If ddlCountry = "Canada" Then
ddlProvinceState.Visible = True
Else
ddlProvinceState.Visible = False


When this fires, it is displayed on the page like

[txtboxProvinceState]
[ddlProvinceState]


Any Suggestions?
Chase Florell
Top achievements
Rank 1
 answered on 06 May 2008
1 answer
187 views
Dear All,
I have a masterpage with header user control, this user control has a RadDock
where I placed (RadMenu, Radtoolbar) objects inside a table definition inside RadDock as shown in the code below:

<telerik:RadDockLayout id="dockManagerToolbar" runat="server" SkinID="Dock" /> 
        <telerik:RadDockZone ID="dockZoneToolbar" runat="server" Height="25px" Width="100%" Orientation="horizontal">  
            <telerik:RadDock ID="dockObjectToolbar" runat="server" Height="25px" Width="0px" DockMode="Default" Text="Toolbar" Pinned="True" > 
                <ContentTemplate> 
                    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">  
                    <tr> 
                        <td> 
                            <telerik:RadToolBar id="toolBar" Runat="server" SkinID="Toolbar">  
                            </telerik:RadToolBar> 
                        </td> 
                        <td> 
                            <telerik:RadMenu id="menuToolbar" runat="server" SkinID="Menu" clicktoopen="True" ></telerik:RadMenu> 
                        </td> 
                    </tr> 
                    </table> 
                </ContentTemplate>        
                <Commands> 
                    <telerik:DockCommand Name="Pin" Text="Pin" /> 
                    <telerik:DockCommand Name="Unpin" Text="Unpin" /> 
                </Commands> 
            </telerik:RadDock> 
        </telerik:RadDockZone> 

However when I try to access the toolbar object using findcontrol in the page load of the master page, it returns null.
protected void Page_Load(object sender, EventArgs e)  
    {  
        mtoolBar = dockObjectToolbar.FindControl("toolBar") as RadToolBar;  
        mtoolBar.Items.Clear();  
        mtoolBar.LoadContentFile("~/Context Menus/en/Toolbar.xml");  
 
        mToolBar = dockObjectToolbar.FindControl("menuToolbar") as RadMenu;  
        mToolBar.Items.Clear();  
        mToolBar.LoadContentFile("~/Context Menus/en/menuToolbar.xml");  
        mToolBar.Items[0].CssClass = "firstItem";  
          
        UpdateMenuImages();  
    } 

What could be the reason for that.
Thanks and best regards

Waleed
Waleed Seada
Top achievements
Rank 2
 answered on 06 May 2008
1 answer
107 views
Hello,

Is there a way to reoder a grid's rows by using drag and drop and client-side API only? I see I can do it by using ajax but I'd like something similar without callbacks.

Thanks,

Martín
Shinu
Top achievements
Rank 2
 answered on 06 May 2008
1 answer
105 views
Hi Guys

I've got a scheduler with data from the generic list example. I've added the context menu from the integration example and have the menu displaying with the right click.

The context menu adds new appointments but when I click edit or delete I get an error complaining about the input string being in the incorrect format.

I'm sure this is the problem line 

int

id = Convert.ToInt32(requestParams[2]);

Because it is trying to convert what looks like a GUID to an int. How can I change the code so that it will work? I assume I'll have to change this line:

doAjaxRequest(

"Appointment Edit " + selectedAppointment.get_id());

But I don't know what to change it too.

Thanks for your help
Jon

Jonathan
Top achievements
Rank 1
 answered on 05 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?