Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
307 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
133 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
178 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
100 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
66 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
196 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
109 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
5 answers
276 views
Ive been using a radeditor inside a GridTemplateColumn using a EditItemTemplate so I can have full access to all the tools.   This was working fine then all of a sudden The editor inst showing the content of the database and the buttons and edit area do nothing.  there seems to be no events happening for the editor.  the other text columns in the editor work fine and I can update the values fine.  Im using all automatic operations with a linq datasource.

Any thoughts on how to debug this.  I cant figure out what I changed to make it stop working.  If I toss a radeditor on a single page it works fine so the installation seems to be ok.

Thanks
    -Keith

                <telerik:GridTemplateColumn HeaderText="Main Content" SortExpression="mainContent" 
                    UniqueName="mainContent" Display="false" ForceExtractValue="None"> 
                    <EditItemTemplate> 
                        <telerik:RadEditor ID="RE1" runat="server" Content='<%# Bind("mainContent") %>' ToolsFile="~/SI-Admin/Editors/ToolsFile.xml" 
                            Height="600" Width="600px" Skin="Telerik"> 
                        </telerik:RadEditor> 
                    </EditItemTemplate> 
            </telerik:GridTemplateColumn> 

SonicImaging
Top achievements
Rank 1
 answered on 05 May 2008
8 answers
348 views
I have RadGrid with FormTemplate, InsertButton (CommandName = "PerformInsert") in  FormTemplate and ObjectDataSource.

When I try to insert record I get exception "ObjectDataSource 'odsUsers' has no values to insert. Check that the 'values' dictionary contains values.".
Why?

Update works, but insert works only with AutoGenerated form.
Josh Winkler
Top achievements
Rank 1
 answered on 05 May 2008
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?