Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
Hi,
   
    How can I avoid showing up timeslotcontext menu when right clicked on resource header or row header ?

Thanks
Raj
  
Veronica
Telerik team
 answered on 24 Jun 2010
3 answers
164 views
I am using nested view templates. To expand into the nested view, user needs to click the arrow image on the row's left. Is there a way to put some labels to make the template opening action more explicit? Can the left-most column with the clickable arrow have a header, like other columns in the grid, where I could put text "Details"?

Also, can I replace the tooltip of the expand bottom? I'd like to put there "Click to see more details...".

If I can do the above, I will have to introduce a hyperlink column with text "Details" to open the nested view programmatically upon clicking the link. Is that possible?

Radoslav
Telerik team
 answered on 24 Jun 2010
2 answers
119 views
Hi,
I have a problem with my RadScheduler.
The radscheduler displays my AdvancedEditTemplate when I set <AdvancedForm Modal="false" />,
but when I set <AdvancedForm Modal="true" />, nothing happend.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Planning.aspx.cs" Inherits="planning.Planning" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Page sans titre</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        <div> 
            <telerik:RadScriptManager  runat="server" ID="RadScriptManager1" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadScheduler1"
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server" /> 
            <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="French (France)"  
                DataSourceID="SqlDataSourcePlanning" DataEndField="date_fin" DataKeyField="id_planning"  
                DataStartField="date_debut" DataSubjectField="description" GroupBy="Ressource"  
                GroupingDirection="Vertical" ShowViewTabs="False" StartInsertingInAdvancedForm="True"
                <ResourceTypes> 
                    <telerik:ResourceType ForeignKeyField="id_ressource" DataSourceID="SqlDataSourceRessource" 
                        KeyField="id_ressource" Name="Ressource" TextField="ressource" /> 
                </ResourceTypes> 
                <AdvancedForm Modal="true" /> 
                <AdvancedEditTemplate> 
                    <div> 
                        <asp:Label ID="Label1"  AssociatedControlID="TitleTextBox" runat="server">Description</asp:Label> 
                        <asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Text='<%# Bind("Subject") %>' Width="97%" TextMode="MultiLine"></asp:TextBox> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label2" AssociatedControlID="StartInput" runat="server">Start time:</asp:Label> 
                        <telerik:RadDateInput ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server"
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label3" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label> 
                        <telerik:RadDateInput ID="EndInput" SelectedDate='<%# Bind("End") %>' runat="server"
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                         
                    </div> 
                </AdvancedEditTemplate> 
            </telerik:RadScheduler> 
             
            <asp:SqlDataSource ID="SqlDataSourcePlanning" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [tbl_planning].[id_planning], [description], [date_debut], [date_fin], [lnk_planning_ressource].[id_ressource],  
                [lnk_planning_projet].[id_projet], [lnk_planning_role].[id_role], [tbl_projet].[id_couleur], [tbl_projet].[projet], [reccurence_rule], [recurrence_parent_id]  
                FROM [tbl_planning] INNER JOIN [lnk_planning_ressource] ON [lnk_planning_ressource].[id_planning] = [tbl_planning].[id_planning] 
                INNER JOIN [lnk_planning_projet] ON [lnk_planning_projet].[id_planning] = [tbl_planning].[id_planning]  
                INNER JOIN [tbl_projet] ON [lnk_planning_projet].[id_projet] = [tbl_projet].[id_projet]  
                INNER JOIN [lnk_planning_role] ON [lnk_planning_role].[id_planning] = [tbl_planning].[id_planning] 
                WHERE 1=1;"  
                InsertCommand="DECLARE @id_planning int; INSERT INTO [tbl_planning]([description], [date_debut], [date_fin], [reccurence_rule], [recurrence_parent_id], [duree]) VALUES (@description, @date_debut, @date_fin, @reccurence_rule, @recurrence_parent_id, DATEDIFF(mi, @date_debut, @date_fin)); SET @id_planning = @@identity; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role); SELECT @id_planning2 = @id_planning;" 
                UpdateCommand="DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning; UPDATE [tbl_planning] SET [description] = @description, [date_debut] = @date_debut, [date_fin] = @date_fin, [reccurence_rule] = @reccurence_rule, [recurrence_parent_id] = @recurrence_parent_id, [duree] = DATEDIFF(mi, @date_debut, @date_fin) WHERE [id_planning] = @id_planning; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role);" 
                DeleteCommand="DELETE FROM [tbl_planning] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning;"
                <DeleteParameters> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                </DeleteParameters> 
                <UpdateParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />                      
                </UpdateParameters> 
                <InsertParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="id_role" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />  
                    <asp:Parameter Direction="Output" Name="id_planning2" Type="Int32" />  
                </InsertParameters> 
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRessource" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_ressource], [ressource] FROM [tbl_ressource] WHERE [supprimer]=0"
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceProjet" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_projet], [projet], [id_couleur] FROM [tbl_projet] WHERE [supprimer]=0 ORDER BY [projet]"
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRole" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_role], [role] FROM [ref_role] WHERE [supprimer]=0 ORDER BY [role]" 
                InsertCommand="INSERT INTO [lnk_planning_role] ([id_planning], [id_role]) VALUES (@id_planning, @id_role)"
                <InsertParameters> 
                    <asp:Parameter Name="id_planning" Type="int32" /> 
                    <asp:Parameter Name="id_role" Type="int32" /> 
                </InsertParameters> 
            </asp:SqlDataSource> 
        </div> 
    </form> 
</body> 
</html> 

Pierre MAUREL
Top achievements
Rank 1
 answered on 24 Jun 2010
7 answers
268 views
Hi,
I'm working with the Radtabstrip and multipage controls in 2010 release. I get an AJAX related javascript error when I click on any other tab (other than the active one) and it tries to make an AJAX callback. The error is:
i.get_postBackElement() is undefined
on the line:
if(Array.contains(c,i.get_postBackElement().id)){this._isRequestInProgress=true;

I've already tried compilation debug="false" in web.config and Scriptmode="release" on the scriptmanager. Any help will be appreciated.






Yana
Telerik team
 answered on 24 Jun 2010
1 answer
426 views
Hi,

      I have a requirement like, I should accept any string which does not contain some special characters like @,*,& etc. Actually i should block the user from typing these character.
Similar behavior as the unit price text box in this example
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx.

At the same time i should display some error message to the user about the blocking action. I am bit confused of acheiving this through radinputmanager and a asp text area control.

I tried setting the telerik:RegExpTextBoxSetting tag with the right regular expression, validation message and the control id, but the validation happens only on click of any button.
This is the link i used as reference http://www.telerik.com/help/aspnet-ajax/using_radinputmanager.html

Kindly help me with some code snippets.

Regards,
Saravanan K
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2010
1 answer
166 views
I'm using the following demo to load Combo items from a DB which I don't have linked to an Entity model (so old command query).

 
    [WebMethod(CacheDuration = 0)] 
    public RadComboBoxItemData[] LoadMedportalUsers(RadComboBoxContext context) { 
        IDictionary<stringobject> contextDictionary = (IDictionary<stringobject>)context; 
        string filterString = ((string)contextDictionary["FilterString"]).ToLower(); 
 
        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["myDB"].ConnectionString); 
 
         
        SqlCommand selectCommand = new SqlCommand(@" SELECT UserID, UserName FROM Aspnet_Users
                                                     WHERE LOWER(UserName) LIKE '%" + filterString + "%'", connection); 
 
        SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); 
        DataTable users = new DataTable(); 
        adapter.Fill(users); 
 
        List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(users.Rows.Count); 
 
        foreach (DataRow row in users.Rows) { 
            RadComboBoxItemData itemData = new RadComboBoxItemData(); 
            itemData.Text = row["UserName"].ToString(); 
            itemData.Value = row["UserID"].ToString(); 
            result.Add(itemData); 
        } 
        return result.ToArray(); 
    } 

We have about 3000 users in the AspNet_Users table...so this throws:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Is there perhaps a way to tweak to allow the dynamic loading?

Any way around that?


Simon
Telerik team
 answered on 24 Jun 2010
3 answers
92 views
Hi,

I am trying to set a controls value, based on values sent from one listbox to the other. I have set up code to find the control in the ontransferred event of the listboxes. Currently I am using the findcontrol method of listbox that the item is being sent to, then I try to find the control by the ID. When the code runs though the control is being set to a null value instead of the control in the listbox.

Thanks,
jonathan
Yana
Telerik team
 answered on 24 Jun 2010
1 answer
74 views
I'm having issues running RadScriptManager on a page that's uisng the RadGridView.  If I use the regular ScriptManager I get javascript errors and the GridView does not let you select rows.  If I switch to the RadGridView I get this:

Object reference not set to an instance of an object.


[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.RadMenuUtils.RadControl.GetUpdatingUpdatePanel(Control target) +101
   Telerik.RadMenuUtils.RadControl.IsInAjaxUpdatePanel(Control target) +50
   Telerik.RadMenuUtils.RadControl.Page_PreRenderComplete(Object sender, EventArgs e) +21
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698542
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
Maria Ilieva
Telerik team
 answered on 24 Jun 2010
5 answers
124 views
I have a web page using the RadTreeView and it has some data. I have a add and Edit button to edit the contents of the tree.

This all works fine with IE and firefox.

With safari, when I click the buton, the tree look changes. Instead of the + icon, I get dot icon. It all works but the look gets distorted. (the tree node changes from + to .)
Kamen Bundev
Telerik team
 answered on 24 Jun 2010
4 answers
177 views
i have a radgrid
dynamic create columns, in function to dataset returned from db, this grid show ok but when i export to excel..   dont show column titles (column headers)
i asign values for  UniqueName, HeaderText, DataField  etc...
i export using this code..
        gdw.ExportSettings.FileName = "MyXlsFile"
        gdw.ExportSettings.OpenInNewWindow = True
        gdw.ExportSettings.IgnorePaging = True
        gdw.ExportSettings.HideStructureColumns = True
        gdw.ExportSettings.Excel.Format = GridExcelExportFormat.Html
        gdw.MasterTableView.ExportToExcel()


whats wrong.??
Daniel
Telerik team
 answered on 24 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?