Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
170 views
I am using a RADEditor in the Pop-up form of a RadGrid. The RadGrid is inside a RadAjaxPanel.

Now when I try to edit any record, it loads the data into the Popup form, which includes the RadEditor. However, in Firefox, when the Edit Form loads for the first time, the Editor displays as shown in the attached file. Just before the render is completed, I see the Toolbar items being loaded as an Unordered List (with the list circles being rendered across the height of the form) for an instant, and then the list disappears (the toolbar CSS comes into play), but the editor content pane is displayed as a slit in the middle of the control.

When I cancel out of the form, and re-open it again, it renders perfectly.

Has anyone else been experiencing this problem?

Andy
Andy
Top achievements
Rank 1
 answered on 19 Feb 2010
2 answers
114 views
Dear Sir/Ma'am,

This http://www.telerik.com/ClientsFiles/149082_saveraddockindb.zip is a really great example for "My Portal" features for RadDock. However I was wondering if someone could help by extending its features to include a Dock Edit Title feature like this http://demos.telerik.com/aspnet-ajax/dock/examples/edittitle/defaultcs.aspx and also take away the preset usercontrols and include a radEditor so that users can edit and save text into the Database. Thanks for your help
Gabe Silvarajoo
Top achievements
Rank 2
 answered on 19 Feb 2010
3 answers
176 views
Is there any way to save the layout of the page to a database on a user initiated event?  I've looked at all of the examples and they all seem to be based on the SaveDockLayout event.  Normally I want to allow all of this to happen via view state, but give the client the option of saving thier layout if desired via a button.  Unfortunately all of the examples seem to depend on the DockLayoutEventArgs being present. 

Any insight would be appreciated.

Thanks

Chris
Chris Trina
Top achievements
Rank 1
 answered on 19 Feb 2010
1 answer
115 views
Hi,

I am having WebForm.aspx which contains Master page(In master page Ajax Mangaer and Script Manager are there). In this web page I am having EditCandidate.ascx and in that I have RadTabStrip with 4 tabs. General, Preferences, Resume and Notes which are loading dynamically with Place holders inside the Multi page. So I have 4 user controls General.ascx, Preferences.ascx, Resume.ascx, Notes.ascx. Again I have in Notes.ascx another user control Grid.ascx. In this Grid.ascx I am not able to access the Rad Ajax Manager in client side. Following code I have written to acheive this

$find(

"<%=RadAjaxManager.GetCurrent( this.Page ).ClientID %>").ajaxRequest(requestArg);

But in other 3 user controls I don't have any user controls again like Notes.ascx. There I am able to access Rad Ajax Manager with this code. Even in Grid.ascx.cs I am able to access this with the following code.

 

RadAjaxManager

 

ajaxManager = RadAjaxManager.GetCurrent(Page);
But if I write the same client side script in Notes.ascx, it works fine for me.
I am not understanding what is the problem behind this.

Please help me on acheiving this as this one is little bit urgent for me.

Thanks in advance.

Hari.

 

Iana Tsolova
Telerik team
 answered on 19 Feb 2010
1 answer
193 views
Hi,
I'm trying for some time to figure out how can i use the rad scheduler  with an object data source behind. I tried all the suggestions from Telerik, examples, i looked on forums, but i cannot solve it. Maybe you can help me guys...
So... i work on VS 2010 and i use Telerik Q3 N35. Until now it is trial but if i solve this issue i bet my company will buy it. I have an aspx page with the content below. 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestA.aspx.vb" Inherits="TEST_VB_TestA" %> 
 
<!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></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
     
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"
        </telerik:RadScriptManager> 
      <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> 
     
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        </telerik:RadAjaxManager> 
     <telerik:RadScheduler runat="server" ID="RadScheduler1" 
                TimeZoneOffset="03:00:00" Height="500px" Width="750px" DataSourceID="ObjectDataSource1" 
                DataKeyField="NewsID" DataSubjectField="Title"  
            DataStartField="PublishDate" DataEndField="NewsType_DeadLine" 
               OnClientFormCreated="schedulerFormCreated" 
            DataDescriptionField="Subtitle"
                <AdvancedForm Modal="true" /> 
                <ResourceTypes> 
                    <telerik:ResourceType KeyField="NewsID" Name="Media" TextField="MediaID" ForeignKeyField="MediaID" 
                        DataSourceID="ObjectDataSource1" /> 
                    <telerik:ResourceType KeyField="NewsID" Name="User" TextField="Username" ForeignKeyField="Username" 
                        DataSourceID="ObjectDataSource1" /> 
                </ResourceTypes> 
               
         <TimeSlotContextMenuSettings EnableDefault="true" /> 
         <AppointmentContextMenuSettings EnableDefault="true" />  
            </telerik:RadScheduler> 
 
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"  
            DataObjectTypeName="NewsSpace.News" InsertMethod="insert"  
            SelectMethod="NewsSchedulerList" TypeName="NewsSpace.News_DB"  
            UpdateMethod="Update"
            <SelectParameters> 
                <asp:Parameter Name="NewsID" Type="Int32" /> 
            </SelectParameters> 
        </asp:ObjectDataSource> 
 
    </div> 
    </form> 
    <script type="text/javascript">    
//<![CDATA[
        function schedulerFormCreated(scheduler, eventArgs) {
            var $ = $telerik.$;
            var schedulerElement = scheduler.get_element();
            var formElement = $("div.rsAdvancedEdit", schedulerElement);
            if (formElement.length == 1) {
                // Initialize the client-side object for the advanced form 
                var advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement);
                advancedTemplate.initialize();
            }
        } 
//]]>    
</script>    
</body> 
</html> 
 

The errors appears when i try to edit the appointment : "Microsoft JScript runtime error: 'this._pickers.startDate' is null or not an object". If i continue form debugger it will show me the correct data. Also , when i try to update the user it gave me an another error in html page: "Object of type 'System.Int32' cannot be converted to type 'System.String'", but this is for later :).
Thank you for the help,
Moro


Peter
Telerik team
 answered on 19 Feb 2010
5 answers
278 views
Hai Telerik Team,

 I'm using radgrid to show the details and has given the filtering property of the rad grid. But when entering the special charcters for filtering it causes the error. I tried to get the filter string on the client side and checked for special characters, if found then to cancel the filter operation. But if i gave '|' along with the filter contents it also caused error.
If its possible to block the special from entering the filter box it would be better. Please give me a solution.

Regards & Thanks
Unni.
Maria Isabel Henao
Top achievements
Rank 1
 answered on 19 Feb 2010
2 answers
190 views
Is there an example of the best practices for integrating the splitter control and dock controls on the same page?  Picture a portal style page where the splitter can basically resize the docking zones and the content, contained in docks resizes based on the zone it is dropped into.

Seems like a common use case, but I cannot find an existing example.

Thx

Chris
Chris Trina
Top achievements
Rank 1
 answered on 19 Feb 2010
2 answers
118 views
I'd like to display some text in the all day row.  The text will be different for each day.  Is this possible?  Another option would be to change the actual date header (where it currently displays "Mon, 15").

Has anybody accomplished this, and can give some tips?
Paul Fountain
Top achievements
Rank 1
 answered on 19 Feb 2010
3 answers
142 views

Hi,

 

My name is Sunggoo and I found these weird behaviors while using GridDropDownColumns to implement RadGrid edit form with cascading dropdowns.

 

Like many others, I followed Grid / Accessing Cells and Rows demo and other forum threads, and was successful to get really close to my goal.

However, I discovered the following erroneous behaviors which I think are some kinds of bug:

 

  1. Cascading dropdown on the last row item isn’t reactive. This problem is also found on the demo linked above. Since all other (same column) dropdowns on non-last rows work perfectly fine, this is definitely a bug.
  2. When entering edit mode, the preset selected item of the cascading dropdown is ignored and, instead, first item in the dropdown is selected. This problem is not found in the demo; please refer to my code when analyzing.
  3. This is more like an extended error of error# 2. When entering edit mode on the first row item, not only its cascading dropdown, but cascading dropdowns of off other rows are also reset.


C# code-behind:

public partial class WSSummary : System.Web.UI.Page  
    {  
        public static String ConnString = "Data Source=CHINABERRY\\SQLEXPRESS;Initial Catalog=TestGridview;Integrated Security=True";  
 
        public static DataTable GetRelatedRecords(string query)  
        {  
            SqlConnection conn = new SqlConnection(ConnString);  
            SqlDataAdapter adapter = new SqlDataAdapter();  
            adapter.SelectCommand = new SqlCommand(query, conn);  
 
            DataTable myDataTable = new DataTable();  
 
            conn.Open();  
 
            try 
            {  
                adapter.Fill(myDataTable);  
            }  
            finally 
            {  
                conn.Close();  
            }  
 
            return myDataTable;  
        }  
 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            SqlConnection conn = new SqlConnection(ConnString);  
            SqlDataAdapter adapter = new SqlDataAdapter();  
            adapter.SelectCommand = new SqlCommand("SELECT Date, Client, CostElementName, ServicePackage, Description, BillingNumber, Hours, Rate, Status FROM [WSItem]", conn);  
 
            DataSet myDataSet = new DataSet();  
 
            conn.Open();  
            try 
            {  
                adapter.Fill(myDataSet, "WSItems");  
                adapter.SelectCommand = new SqlCommand("SELECT Client FROM [Client]", conn);  
                adapter.Fill(myDataSet, "Clients");  
                adapter.SelectCommand = new SqlCommand("SELECT CostElementName FROM [CostElementName]", conn);  
                adapter.Fill(myDataSet, "CostElementNames");  
                adapter.SelectCommand = new SqlCommand("SELECT ServicePackage FROM [tblServicePackage]", conn);  
                adapter.Fill(myDataSet, "ServicePackages");  
            }  
            finally 
            {  
                conn.Close();  
            }  
 
            RadGrid1.DataSource = myDataSet;  
        }  
 
        protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                // reference the edited grid item   
                GridEditableItem editedItem = e.Item as GridEditableItem;  
                GridEditManager editMan = editedItem.EditManager;  
 
                RadComboBox clientColumn = editedItem["ClientColumn"].Controls[0] as RadComboBox;  
 
                // reference the column editor which holds the CostElementName dropdown list instance in the edit form  
                GridDropDownColumnEditor costElementNameEditor = editMan.GetColumnEditor("CostElementNameColumn"as GridDropDownColumnEditor;  
 
                DataTable tempCENtable = GetRelatedRecords("SELECT CostElementName FROM [CostElementName] WHERE Client = '" + clientColumn.SelectedValue + "'");  
 
                costElementNameEditor.DataSource = tempCENtable;  
                costElementNameEditor.DataBind();  
 
                // reference the column editor which holds the CostElementName dropdown list instance in the edit form  
                GridDropDownColumnEditor servicePackageEditor = editMan.GetColumnEditor("ServicePackageColumn"as GridDropDownColumnEditor;  
 
                DataTable tempSPtable = GetRelatedRecords("SELECT ServicePackage FROM [tblServicePackage] WHERE Client = '" + clientColumn.SelectedValue + "'");  
 
                servicePackageEditor.DataSource = tempSPtable;  
                servicePackageEditor.DataBind();  
            }  
        }  
 
        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                GridEditableItem editedItem = e.Item as GridEditableItem;  
 
                RadComboBox clientColumn = editedItem["ClientColumn"].Controls[0] as RadComboBox;  
 
                // add SelectedIndexChanged event handler to Client dropdown list column  
                clientColumn.AutoPostBack = true;  
                clientColumn.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(ClientComboBoxControl_SelectedIndexChanged);  
            }  
        }  
 
        protected void ClientComboBoxControl_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            //first reference the edited grid item through the NamingContainer attribute  
            GridEditableItem editedItem = (sender as RadComboBox).NamingContainer as GridEditableItem;  
 
            //the dropdown list will be the first control in the Controls collection of the corresponding cell  
            //for custom edit forms (WebUserControl/FormTemplate) you can find the column editor with the FindControl(controlId) method  
            RadComboBox ddlCENList = editedItem["CostElementNameColumn"].Controls[0] as RadComboBox;  
 
            // change the data source for ContactTitle with custom code here  
            DataTable tempCENtable = GetRelatedRecords("SELECT CostElementName FROM [CostElementName] WHERE Client = '" + (editedItem["ClientColumn"].Controls[0] as RadComboBox).SelectedValue + "'");  
            ddlCENList.DataSource = tempCENtable;  
            ddlCENList.DataBind();  
 
            //the dropdown list will be the first control in the Controls collection of the corresponding cell  
            //for custom edit forms (WebUserControl/FormTemplate) you can find the column editor with the FindControl(controlId) method  
            RadComboBox ddlSPList = editedItem["ServicePackageColumn"].Controls[0] as RadComboBox;  
 
            // change the data source for ContactTitle with custom code here  
            DataTable tempSPtable = GetRelatedRecords("SELECT ServicePackage FROM [tblServicePackage] WHERE Client = '" + (editedItem["ClientColumn"].Controls[0] as RadComboBox).SelectedValue + "'");  
            ddlSPList.DataSource = tempSPtable;  
            ddlSPList.DataBind();  
        }  

.aspx:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
        <script type="text/javascript">  
            var hasChanges, inputs, dropdowns, editedRow;  
 
            function RowClick(sender, eventArgs) {  
 
            }  
 
            function RowDblClick(sender, eventArgs) {  
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());  
            }  
 
            function GridCommand(sender, eventArgs) {  
                if (eventArgs.get_commandName() != "Edit") {  
                    editedRow = null;  
                }  
            }  
 
            function GridCreated(sender, eventArgs) {  
                var gridElement = sender.get_element();  
                var elementsToUse = [];  
                inputs = gridElement.getElementsByTagName("input");  
                for (var i = 0; i < inputs.length; i++) {  
                    var lowerType = inputs[i].type.toLowerCase();  
                    if (lowerType == "hidden" || lowerType == "button") {  
                        continue;  
                    }  
 
                    Array.add(elementsToUse, inputs[i]);  
                    inputs[i].onchange = TrackChanges;  
                }  
 
                dropdowns = gridElement.getElementsByTagName("select");  
                for (var i = 0; i < dropdowns.length; i++) {  
                    dropdowns[i].onchange = TrackChanges;  
                }  
 
                //setTimeout(function() { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100);  
            }  
 
            function TrackChanges(e) {  
                hasChanges = true;  
            }  
        </script> 
    </telerik:RadCodeBlock> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Skin="Windows7" 
        OnNeedDataSource="RadGrid1_NeedDataSource"   
        OnItemCreated="RadGrid1_ItemCreated"   
        OnItemDataBound="RadGrid1_ItemDataBound" 
        GridLines="None">  
        <PagerStyle Mode="NextPrevAndNumeric" /> 
        <MasterTableView ShowHeadersWhenNoRecords="true" 
            GridLines="Vertical" AutoGenerateColumns="false" EditMode="InPlace">  
            <Columns> 
                <telerik:GridDateTimeColumn UniqueName="DateColumn" PickerType="DatePicker" 
                    HeaderText="Date" DataField="Date">  
                    <ItemStyle Width="100px" /> 
                </telerik:GridDateTimeColumn> 
                <telerik:GridDropDownColumn UniqueName="ClientColumn" DataField="Client" 
                    ListTextField="Client" ListValueField="Client" ListDataMember="Clients" 
                    HeaderText="Client" DropDownControlType="RadComboBox">  
                    <ItemStyle Width="150px" /> 
                </telerik:GridDropDownColumn> 
                <telerik:GridDropDownColumn UniqueName="CostElementNameColumn" DataField="CostElementName" 
                    ListTextField="CostElementName" ListValueField="CostElementName" ListDataMember="CostElementNames"   
                    HeaderText="Cost Element Name" DropDownControlType="RadComboBox">  
                    <ItemStyle Width="200px" /> 
                </telerik:GridDropDownColumn> 
                <telerik:GridDropDownColumn UniqueName="ServicePackageColumn" DataField="ServicePackage" 
                    ListTextField="ServicePackage" ListValueField="ServicePackage" ListDataMember="ServicePackages"   
                    HeaderText="Service or Package" DropDownControlType="RadComboBox">  
                    <ItemStyle Width="200px" /> 
                </telerik:GridDropDownColumn> 
                <telerik:GridBoundColumn UniqueName="DescriptionColumn" DataField="Description" 
                    HeaderText="Description" AllowSorting="false">  
                    <ItemStyle Width="200px" Height="3em" /> 
                </telerik:GridBoundColumn> 
                  
                <telerik:GridBoundColumn UniqueName="BillingNumberColumn" DataField="BillingNumber" 
                    HeaderText="Billing #">  
                    <ItemStyle Width="100px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn UniqueName="HoursColumn" DataField="Hours" 
                    HeaderText="Hours">  
                    <ItemStyle Width="50px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn UniqueName="RateColumn" DataField="Rate" 
                    HeaderText="Rate">  
                    <ItemStyle Width="50px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn UniqueName="Status" DataField="Status" 
                    HeaderText="Status" SortExpression="Status">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="True"   
            ReorderColumnsOnClient="True">  
            <Selecting AllowRowSelect="True" /> 
            <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" 
                OnGridCreated="GridCreated" OnCommand="GridCommand" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <telerik:RadAjaxManager runat="server">  
        <ajaxsettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </ajaxsettings> 
    </telerik:RadAjaxManager> 


Here are some additional information:

  • By selecting Client, both Cost Element Name and Service or Package columns should cascade
  • Since there are different sets of Cost Element Name and Service/Package lists for each client selected

I spent many hours to error# 2 and 3. Because my code isn’t much different from the demo, I though it might be caused by some unknown bugs. Please take a look at my code and help me out.

 

Thank you,

 

Sunggoo.

Pavlina
Telerik team
 answered on 19 Feb 2010
1 answer
78 views
I have a right-click context menu for a grid and it was showing up when the user clicked the header, filter, and pager rows.  I found the OnColumnContextMenu to cancel the menu on the header row, but I can't find any way to cancel it for the pager and filter rows.  Any suggestions?
Nikolay Rusev
Telerik team
 answered on 19 Feb 2010
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?