Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
241 views
I'm not sure if this post should be under here or under the Prometheus TreeView. We have a Prometheus TreeView with and Prometheus Ajax Manager that is handling all of its postbacks. In the TreeView, there are a considerable number of nodes. Only the first two levels are "visible" and the rest are hidden until the node expanded. At that point, the control postbacks through the ajax manager and the nodes under the node that was expanded are set to visible and then the expand and collapsing is set to be client side so it doesn't need to go to the server anymore.

A user is able to right click on a node and then add a level through the context menu. The user can then right click the new node and choose to edit the text of the node that was added. The issue we are having as that during this process, there are postbacks through the ajax manager. They are able to edit the node, but it appears that after the selection changes and it is posting back the name change, we sometimes get an "Invalid JSON Primitive" popup box. It doesn't always happen, and happens during different postbacks as well, but this is a common set of steps that people take. As soon as a person performs an action that does a true postback that doesn't go through the Ajax manager, the "Invalid JSON Primitive" shows up in the browser window.

So, I'm guessing this problem is related to the Ajax manager. Is there something that I can do to make it not do this anymore. I have been unable to duplicate it on my computer, but have seen it done on the production server.
Rainer Friedl
Top achievements
Rank 1
 answered on 25 Feb 2008
1 answer
258 views
I am trying to select a row from a RadGrid when it binds and I cannot get it to work....

It does not like e.item.dataitem("") nor does it do anything when I use the e.item.selected = true.

Protected Sub vendorGridView_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles vendorGridView.ItemDataBound 
 
        If Session("VendorClientID") = e.Item.DataItem("ClientID") Then 
 
        e.Item.Selected = True 
 
        End If 
 
 
    End Sub 


Any help would be appreciated.
Vlad
Telerik team
 answered on 25 Feb 2008
1 answer
145 views

I would like to use the RadDateTimePicker in my AdvancedInsert/Edit Templates. However, I can't find any documentation to resolve the issue I am experiencing. The code below includes the RadDateTimePicker as the startInput control. VS reports that DateFormat is not a member of RadDateTimePicker. Can someone shed some light on how to use this control?

The user needs the ability to alter the time frame of the appointment from the form.

Thank you for your time.
Al


If

((e.Container.Mode = SchedulerFormMode.AdvancedInsert) _

OrElse (e.Container.Mode = SchedulerFormMode.AdvancedEdit)) Then

Dim subjectBox As TextBox = CType(e.Container.FindControl("TitleTextBox"), TextBox)

subjectBox.Text = e.Appointment.Subject

Dim startInput As RadDateTimePicker = CType(e.Container.FindControl("StartInput"), RadDateTimePicker)

startInput.DateFormat = (scheduler.EditFormDateFormat + (

" " + scheduler.EditFormTimeFormat))

startInput.SelectedDate = RadScheduler1.DisplayToUtc(e.Appointment.Start)

Dim endInput As RadDateInput = CType(e.Container.FindControl("EndInput"), RadDateInput)

endInput.DateFormat = (scheduler.EditFormDateFormat + (

" " + scheduler.EditFormTimeFormat))

endInput.SelectedDate = RadScheduler1.DisplayToUtc(e.Appointment.End)

End If

Peter
Telerik team
 answered on 25 Feb 2008
3 answers
202 views
I'm having a problem trying to set a module to disabled but allowing it to still be in the module list so that users can turn it on if they want. The code I'm using is as follows:

<telerik:RadEditor ID="contents" runat="server" Content='<%# Bind("contents") %>'> 
  <Modules> 
    <telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true" /> 
    <telerik:EditorModule Name="RadEditorDomInspector" Visible="true" Enabled="false" /> 
    <telerik:EditorModule Name="RadEditorNodeInspector" Visible="true" Enabled="false" /> 
  </Modules> 
</telerik:RadEditor> 

The problem seems to relate to setting the visible property to true but the enabled property to false. When I do this I get the following javascript error:

Sys.InvalidOperationException: 'enabled' is not a property or an existing field.

When i get this error, the modules don't show up in the dropdown, and I get javascript errors when I click on it as well.

If I also set the visible property to false, there are no errors but then I don't get the desired functionality. What I want is for the modules to be initially disabled but show up in the list for users to enable if they want.

If anyone has any suggestions or solutions, i would greatly appreciate it.

Thanks,
Reinan
Rumen
Telerik team
 answered on 25 Feb 2008
3 answers
164 views
In the pervious version of the RadEditor, one could check if the user had clicked the OK button to insert code as follow:

<script type="text/javascript">    
var originalRadEditorFormatCodeBlock = RadEditorNamespace.radEditorFormatCodeBlock;    
RadEditorNamespace.radEditorFormatCodeBlock = function(returnValue, params)            
{         
    if (returnValue != undefined)  
    {  
        // <snip>
        originalRadEditorFormatCodeBlock(returnValue, params);  
    }  
};  
</script> 

How does one do this in 'Prometheus for ASP.NET'?
Tervel
Telerik team
 answered on 25 Feb 2008
2 answers
122 views

Hi,

I have a user control which has:

<asp:HyperLink ID="lnkDelete" runat="Server" NavigateUrl="#" Text="Delete" />

and I have the Tool Tip control referencing lnkDelete.  (So I can't use an HTML <a> tag).

Now this behaviour works in an aspx page, but as soon as it runs within a control it fails, as the hyplink control is being rendered with an href to the path of the user control.  So I end up getting a HTTP 403 error.

Is there any way of overriding this default behaviour of the hyperlink within a control?  This must be common....

Thanks!

Tervel
Telerik team
 answered on 25 Feb 2008
7 answers
201 views
Having recently upgraded from normal asp.net controls to the Prometheus versions, I'm having a hard time getting the controls to skin correctly.

Here's what I've done:
1. Added "skins" folder from installation directory to the root of my site
2. Added <add key="Telerik.Web.UI.Skin" value="Outlook"/> to web.config

I have managed to fix the broken image in RadAjaxLoadingPanel by using:
... src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' ...

(While we're on the topic, why don't all controls have common skins? ie, setting the skin in web.config is almost pointless since many controls may not have that skin)

So can someone please give me a "blow-by-blow" description on how to
set a "global" skin for all my telerik controls on the one page?

Cheers,
Daron
Nikolay
Telerik team
 answered on 25 Feb 2008
2 answers
113 views
It seems to me that the forum search includes the menu as part of the content to be searched. If I seek info on RadToolTip it returns every page in the forum since it finds it in the menu of every page.

This is very frustrating and is likely bloating your forum since many people post questions that would otherwise be located with a simple search.

I have been testing your new Prometheus suite and find it exhaustive due to this issue. I must spend 80% more time to find the answers I seek. Once in full production, this will cost me money and possibly lead me to drop your tool set as a result. I should be able to search on RadToolTip and return nothing but posts that actually contain the word RadToolTip.
Natalie Farah
Telerik team
 answered on 25 Feb 2008
1 answer
158 views
Using the latest version or RadGrid Prom.

I've got 2 SQL data sources on my page. The first binds the primary grid, and the second binds a dropdown that I have residing within a template column, in the edit portion.

The main form lists 3 columns, the buyer, the buyer code, and the current admin assigned to that buyer. What I want to do is have the dropdown show the value of the current admin that is listed on the main form, I just can't seem to get this to work.

Here is my current code:

 <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None" 
        DataSourceID="SQL_BuyFromName" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
        AllowAutomaticUpdates="True" Skin="Default2006" Width="600px"> 
        <ExportSettings> 
            <Pdf PaperSize="Letter" FontType="Subset"></Pdf> 
            <Excel Format="Html"></Excel> 
        </ExportSettings> 
        <MasterTableView CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" Frame="Border" 
            TableLayout="Auto" CommandItemDisplay="None" DataSourceID="SQL_BuyFromName" DataKeyNames="id"> 
            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                Visible="False"> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                Visible="False" Resizable="False"> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelImageUrl="Images\Cancel.gif" 
                    EditImageUrl="Images\Edit.gif" UpdateImageUrl="Images\Update.gif" HeaderStyle-Width="30px"> 
                    <HeaderStyle Width="30px"></HeaderStyle> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="BuyerName" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="Buyer Name" SortExpression="BuyerName" UniqueName="BuyerName" 
                    HeaderStyle-Width="400px"> 
                    <HeaderStyle Width="400px"></HeaderStyle> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="BuyerCode" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="Buyer Code" SortExpression="BuyerCode" UniqueName="BuyerCode" 
                    HeaderStyle-Width="125px"> 
                    <HeaderStyle Width="125px"></HeaderStyle> 
                </telerik:GridBoundColumn> 
                <telerik:GridTemplateColumn HeaderText="Current Admin" HeaderStyle-Width="130px"> 
                    <ItemTemplate> 
                        <asp:Label ID="lblName" Text='<%#Eval("CurrentAdmin") %>' runat="server"></asp:Label> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <asp:DropDownList ID="DropDownList1" runat="server" DataValueField='<%# Bind("id") %>' DataSourceID="SQL_Admins" DataTextField='<%# Bind("AdminName") %>' 
                            AppendDataBoundItems="True"> 
                             
                        </asp:DropDownList> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
            <EditFormSettings> 
                <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"> 
                </EditColumn> 
            </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 

And my SQL datasources

    <asp:SqlDataSource ID="SQL_Admins" runat="server" ConnectionString="<%$ ConnectionStrings:Spiral_MainConnectionString %>" 
        SelectCommand="SELECT id, (Admin_First + ' ' + Admin_Last) as AdminName from DEV_ADMIN_INFORMATION WHERE ACTIVE = '1' ORDER BY AdminName"> 
    </asp:SqlDataSource> 
    <asp:SqlDataSource ID="SQL_BuyFromName" runat="server" ConnectionString="<%$ ConnectionStrings:Spiral_MainConnectionString %>" 
        SelectCommand="SELECT b.id as id, b.HdrBuyFromBP as BuyerCode, b.HdrBuyFromBPName as BuyerName, b.adminNo, (d.Admin_First + ' ' + d.Admin_Last) as CurrentAdmin from DEV_BUY_FROM_NAME b LEFT JOIN DEV_ADMIN_INFORMATION d ON d.id = b.adminNo WHERE b.ACTIVE = '1' ORDER BY BuyerName" 
        UpdateCommand="UPDATE DEV_BUY_FROM_NAME set adminNo = @adminNo WHERE (id = @id)"> 
    </asp:SqlDataSource> 



Vlad
Telerik team
 answered on 25 Feb 2008
1 answer
113 views

Hello,

I have an issue when trying to Transfer/Post to another page using grdClientSrch_ItemCommand event on a "Prometheus" grid.

 I my scenario I want to select a row from the grid and to retrieve its ID and to transfer or post to another apsx page. On the next aspx page I want to use the PreviousPage property and to cast it to my first page with the grid.

Initially I used Server.Transfer in grdClientSrch_ItemCommand event to transfer to the next page. However with this approach I received the following error:

Error:

“Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.”

 I found similar issue http://www.telerik.com/community/forums/thread/b311D-bbcbek.aspx and the conclusion was the Server.Transfer is not supported with AJAX.

 I tried to use Response.Redirect() instead and the original error has gone. However, the PreviousPage property (on the next page) is null when I use Response.Redirect(). 
In order to get this property (PreviousPage) I need to post (or transfer to)  the page and I am not sure how to do this with GridButtonColumn. For regular button I need to use PostBackUrl property and to specify the url of the next page, but I couldn’t see such a property in the command event. There might be a cast from GridButtonColumn to regular button, but I am not sure how to do this either.

I would like first to check if there is a way to use directly Transfer (for better performance) and to change the grid select event as a regular post back and bypassing the AJAX limitation above.

If the first option is not possible, I would like to check how I can post the page to another page in the most efficient way.

Thanks,
Ivo

Vlad
Telerik team
 answered on 25 Feb 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?