Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
OK I know that you know that the docs need work.

But I don't know if you know which bits are wrong.

The code examples for the events Appointment_Insert, Appointment_Update and Appointment_Delete, but, oddly, not Appointment_CancellngEdit, all declare the method as private meaning it won't compile it the event is defined in the markup.

-- 
Stuart
Veronica
Telerik team
 answered on 20 Oct 2010
3 answers
76 views
hi,

we are getting some message while enabling the filter in radgrid
details are shown in attachment

Dimo
Telerik team
 answered on 20 Oct 2010
2 answers
108 views
I am using the Scheduler with the WebService for all the data binding. I have custom data provider that talks to the database and used into the contoller for the webservice. It works fine when it is used with the setting: ResourcePopulationMode="ClientSide". When I change it to ResourcePopulationMode="ServerSide", I get the error. The reason is that webservice is secured by forms authentication and I need to pass in the credentials before I make calls to the webservice. I tried to see if I can create and assign proxy myself with no success. Looks like it only takes the path to the webservice url. How would I solve this problem?

Thanks a lot...
T. Tsonev
Telerik team
 answered on 20 Oct 2010
1 answer
133 views

I discovered this problem today and believe it may be of benefit to the community...

I have a RadFileExplorer and have implemented my own FileBrowserContentProvider that bounces off our database.

Very often when I click on a folder the ajax loading doughnut appears and does not go away.  If I repeatedly click on another folder and then back to the original the doughnut will disappear and the directory listing will appear successfully.


The problem never occurs on a folder with no subfolders or files. But it does occur if the folder has a single subfolder or file.

When it stops working it is associated with an exception appearing in the Visual Studio output window....


A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in WebDev.WebHost.dll

I enabled exception breaking on this exception and the stack trace showed....

 WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Request.ReadEntityBody(byte[] buffer = {byte[8192]}, int size = 1957) + 0x57 bytes 
  System.Web.dll!System.Web.HttpRequest.GetEntireRawContent() + 0x2c7 bytes 
  System.Web.dll!System.Web.HttpRequest.FillInFormCollection() + 0x13f bytes 
  System.Web.dll!System.Web.HttpRequest.Form.get() + 0x45 bytes 
  System.Web.dll!System.Web.HttpRequest.this[string].get(string key = "HTTP_X_MICROSOFTAJAX") + 0x28 bytes 
  Telerik.Web.UI.dll!Telerik.Web.UI.RadCompression.IsAjaxRequest() + 0x3c bytes 
  Telerik.Web.UI.dll!Telerik.Web.UI.RadCompression.Compress(System.Web.HttpApplication application = {ASP.global_asax}) + 0x348 bytes 
  Telerik.Web.UI.dll!Telerik.Web.UI.RadCompression.PreRequestHandlerExecute(object sender = {ASP.global_asax}, System.EventArgs e = {System.EventArgs}) + 0x4d bytes 
  System.Web.dll!System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x45 bytes 
  System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.SyncEventExecutionStep}, ref bool completedSynchronously = true) + 0x4c bytes 
  System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x133 bytes 
  System.Web.dll!System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(System.Exception error) + 0x25 bytes 
  System.Web.dll!System.Web.HttpApplication.AsyncEventExecutionStep.ResumeStepsWithAssert(System.Exception error) + 0x28 bytes 
  System.Web.dll!System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(System.IAsyncResult ar) + 0x84 bytes 
  System.Web.dll!System.Web.HttpAsyncResult.Complete(bool synchronous, object result, System.Exception error, System.Web.RequestNotificationStatus status) + 0x3e bytes 
  System.Web.dll!System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(object state) + 0x1af bytes 
  mscorlib.dll!System.Threading._TimerCallback.TimerCallback_Context(object state) + 0x2f bytes 
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes 
  [Native to Managed Transition] 
  [Managed to Native Transition] 
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes 
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes 
  mscorlib.dll!System.Threading._TimerCallback.PerformTimerCallback(object state) + 0x6b bytes 
  [Appdomain Transition] 

I have discovered what it is though. It is unrelated to Telerik. I am running against ASP.NET development server and we have forms authentication.  Often we receive the exception...

Type 'Signmanager.Security.Security' in assembly 'Signmanager.Security.Bec, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

[SerializationException: Type 'Signmanager.Security.Security' in assembly 'Signmanager.Security.Bec, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.]
   Microsoft.VisualStudio.WebHost.Server.GetProcessToken() +0
   Microsoft.VisualStudio.WebHost.Host.GetProcessToken() +87
   Microsoft.VisualStudio.WebHost.Request.GetUserToken() +35
   Microsoft.VisualStudio.WebHost.Request.GetServerVariable(String name) +202
   System.Web.HttpRequest.AddServerVariableToCollection(String name) +25
   System.Web.HttpRequest.FillInServerVariablesCollection() +188
   System.Web.HttpServerVarsCollection.Populate() +34
   System.Web.HttpServerVarsCollection.Get(String name) +8637927
   System.Collections.Specialized.NameValueCollection.get_Item(String name) +7
   System.Web.HttpRequest.get_Item(String key) +105
   System.Web.UI.Page.get_LastFocusedControl() +59
   System.Web.UI.Page.BeginFormRender(HtmlTextWriter writer, String formUniqueID) +8704633
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +54
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   Signmanager.Web.UI2.PageBase.Render(HtmlTextWriter writer) in C:\Fast Data\SMWeb20\Signmanager.Web.UI2\PageBase.cs:1507
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +699
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   Signmanager.Web.UI2.PageBase.Render(HtmlTextWriter writer) in C:\Fast Data\SMWeb20\Signmanager.Web.UI2\PageBase.cs:1542
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

 
This is a well known short coming of ASP.NET development server running against forms authentication.


It appears that this same problem is responsible for the problems with RadFileExplorer.


When I turned off forms authentication RadFileExplorer started working perfectly.

Fiko
Telerik team
 answered on 20 Oct 2010
0 answers
93 views
Hello All,

I am using Rad Grid version "2008.2.826.20". I have two radio buttons on which click, page is postback

But when i run my application on Google Chrome/ Safari browser on first time grid is coming fine.
When i click on radio button then Grid Skin just disappear.

Application work fine on IE(All version) and Mozilla Firefox.

Please tell me why this is happening?
 

nitin
Top achievements
Rank 1
 asked on 20 Oct 2010
4 answers
140 views
I have got a grid
It collapse it height when I set it's height to 100% and only if I set it height in pixels =( but I want it's heidht to be auto.
In other grids everything is ok, height=100% works. But in this grid 100% height makes grid collapse =(
You can see the collapsed grid on the attached image.

Here is the code of page with grid.

Dic.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Dic.aspx.cs" Inherits="CAP.Site.Administrators.Dic" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/Controls/DicBase.ascx" TagName="DicBase" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server" >
    <uc1:DicBase runat="server" ID="db" />
</asp:Content>


DicBase.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DicBase.ascx.cs" Inherits="CAP.Site.Controls.DicBase" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btDelete">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="grid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridMenu" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="gridMenu">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="gridMenu" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"/>

<telerik:RadGrid  ID="grid" runat="server" GridLines="None" AllowFilteringByColumn="true" BorderWidth="0" BorderColor="White"
            AllowPaging="True" Culture="ru-RU" AllowAutomaticInserts="True" AllowAutomaticDeletes="false" AllowAutomaticUpdates="True" AllowMultiRowSelection="true"
            AllowSorting="True" ShowGroupPanel="true" Skin="Office2007"  AutoGenerateColumns="False" PageSize="100"
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="false"     
            Width="100%" Height="100%" GroupPanel-Width="100%"
            OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand">      
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView EditMode="PopUp" DataKeyNames="Id"  TableLayout="Auto" ClientDataKeyNames="Id">
             <EditFormSettings  InsertCaption="Добавление"
                 CaptionFormatString="Редактирование" EditColumn-CancelText="Отмена"
                 EditColumn-EditText="Изменить" EditColumn-InsertText="Сохранить"
                 EditColumn-UpdateText="Изменить" >               
                 <FormTableItemStyle Width="200px"/>
                 <EditColumn CancelText="Отмена" EditText="Изменить" UpdateText="Изменить" InsertText="Сохранить"></EditColumn>
            </EditFormSettings>
               <Columns>
                <telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn">
                    <HeaderStyle Width="30px" />
                </telerik:GridClientSelectColumn>
                <telerik:GridBoundColumn DataField="Id" HeaderText="Имя" SortExpression="Id" Visible="false" ReadOnly="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="95%"/>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Имя" SortExpression="Name" CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="95%"/>
               </Columns>
        </MasterTableView>       
         <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                            <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
                            <Selecting AllowRowSelect="true"/>
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <PagerStyle Mode="NextPrevAndNumeric" />
    </telerik:RadGrid>
    <asp:Label runat="server" ID="laMessage" Visible="false"/>
    <asp:ObjectDataSource ID="dsObject" runat="server" DeleteMethod="DeleteById"
            InsertMethod="Save" SelectMethod="GetAllSoftVariant" UpdateMethod="Upate" />
    <asp:ObjectDataSource ID="dsRegion" runat="server" DeleteMethod="DeleteById"
            InsertMethod="Save" SelectMethod="GetAllSoftVariant" UpdateMethod="Upate"
            DataObjectTypeName="Clients.Core.Domains.Region"
            TypeName="Base.Core.Repositories.Repository`1[[Clients.Core.Domains.Region, Clients.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Base.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <asp:ObjectDataSource ID="dsBranch" runat="server" DeleteMethod="DeleteById"
            InsertMethod="Save" SelectMethod="GetAllSoftVariant" UpdateMethod="Upate"
            DataObjectTypeName="Clients.Core.Domains.Branch"
            TypeName="Base.Core.Repositories.Repository`1[[Clients.Core.Domains.Branch, Clients.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Base.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <telerik:RadContextMenu ID="gridMenu" runat="server"  EnableRoundedCorners="true" EnableShadows="true" OnItemClick="RadMenu1_ItemClick" OnClientItemClicked="OnClientItemClick" Skin="Office2007" >
      <Items>
                    <telerik:RadMenuItem Text="Добавить" />
                    <telerik:RadMenuItem Text="Изменить" />
                    <telerik:RadMenuItem Text="Удалить" />
                    <telerik:RadMenuItem Text="Обновить" />
       </Items>
    </telerik:RadContextMenu>
    <input type="hidden" id="radGridClickedRowIndex" name="radGridClickedRowIndex" />
    <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
    <script type="text/javascript">
        window.onload = function () {
            document.getElementById("div_footer").style.display = "none";
        }

        function RowContextMenu(sender, eventArgs) {
            var menu = $find("<%=gridMenu.ClientID %>");
            var evt = eventArgs.get_domEvent();

            if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
                return;
            }
            var index = eventArgs.get_itemIndexHierarchical();
            document.getElementById("radGridClickedRowIndex").value = index;
            sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
            menu.show(evt);
            evt.cancelBubble = true;
            evt.returnValue = false;
            if (evt.stopPropagation) {
                evt.stopPropagation();
                evt.preventDefault();
            }
        }

        function OnClientItemClick(sender, args) {
            var item = args.get_item();
            if (item.get_text() == "Удалить") {
                return confirm('Вы уверены, что Вы хотите удалить запись?');
            }
        }


     </script>
    </telerik:RadCodeBlock>


DicBase.ascx.cs

using System;
using System.Reflection;
using System.Security.Authentication;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Base.Core.Repositories;
using CAP.Site.Code;
using Clients.Core.Domains;
using Telerik.Web.UI;

namespace CAP.Site.Controls
{
    public partial class DicBase : UserControl
    {
        private readonly Type[] complexType = new[] { typeof(City), typeof(ActivityCategory), typeof(ProductGroup) };
        private Type type;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Roles.IsUserInRole(HttpContext.Current.User.Identity.Name, Constants.RoleAdministrators))
                throw new InvalidCredentialException();
        }
        protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            var radGridClickedRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]);
            switch (e.Item.Text)
            {
                case "Добавить":
                    grid.MasterTableView.IsItemInserted = true;
                    grid.Rebind();
                    break;
                case "Изменить":
                    grid.Items[radGridClickedRowIndex].Edit = true;
                    grid.Rebind();
                    break;
                case "Удалить":
                    InitDeleteAction();
                    break;
                case "Обновить":
                    ;
                    break;
            }
        }
        public void InitSaveAction()
        {
            grid.MasterTableView.IsItemInserted = true;
            grid.Rebind();
        }
        public void InitEditAction()
        {
            if (grid.SelectedItems.Count == 0)
                return;
            grid.SelectedItems[0].Edit = true;
            grid.Rebind();
        }
        public void InitDeleteAction()
        {
            if (grid.SelectedItems.Count == 0)
                return;
            var generic = typeof(Repository<>);
            Type[] typeArgs = { type };
            Type constructed = generic.MakeGenericType(typeArgs);
            object repository = Activator.CreateInstance(constructed);
            MethodInfo method = constructed.GetMethod("DeleteById");
            foreach (GridDataItem dicItem in grid.SelectedItems)
            {
                object item = Activator.CreateInstance(type);
                var prop = type.GetProperty("Id");
                prop.SetValue(item, Int32.Parse(dicItem.GetDataKeyValue("Id").ToString()), null);
                try
                {
                    method.Invoke(repository, new[] { item });
                }
                catch (Exception)
                {
                    laMessage.Text = @"Удалить нельзя";
                    laMessage.Visible = true;
                }

            }
        }


        public void InitDic(Type type)
        {
            this.type = type;
            dsObject.DataObjectTypeName = type.FullName;
            var generic = typeof(Repository<>);
            Type[] typeArgs = { type };
            Type constructed = generic.MakeGenericType(typeArgs);
            dsObject.TypeName = constructed.FullName;
            grid.DataSourceID = dsObject.ID;

            if (!IsPostBack)
            {
                if (type == typeof(City))
                    AddCityColumns();
                else if (type == typeof(ActivityCategory) || type == typeof(ProductGroup))
                    AddBranchColumns();
            }

            if (Array.Exists(complexType, t => t == type))
            {
                grid.AllowAutomaticInserts = false;
                grid.AllowAutomaticUpdates = false;
            }
        }
        private void AddCityColumns()
        {
            var regionColumn = new GridDropDownColumn();
            grid.MasterTableView.Columns.Add(regionColumn);
            regionColumn.UniqueName = "Region.Id";
            regionColumn.DataField = "Region.Id";
            regionColumn.HeaderText = @"Регион";
            regionColumn.DataSourceID = dsRegion.ID;
            regionColumn.ListTextField = "Name";
            regionColumn.ListValueField = "Id";
            regionColumn.AllowFiltering = false;
            regionColumn.AllowSorting = false;
            regionColumn.DropDownControlType = GridDropDownColumnControlType.RadComboBox;
        }


        private void AddBranchColumns()
        {
            var regionColumn = new GridDropDownColumn();
            grid.MasterTableView.Columns.Add(regionColumn);
            regionColumn.UniqueName = "Branch.Id";
            regionColumn.DataField = "Branch.Id";
            regionColumn.HeaderText = @"Отрасль";
            regionColumn.DataSourceID = dsBranch.ID;
            regionColumn.ListTextField = "Name";
            regionColumn.ListValueField = "Id";
            regionColumn.AllowFiltering = false;
            regionColumn.AllowSorting = false;
            regionColumn.DropDownControlType = GridDropDownColumnControlType.RadComboBox;
        }


        protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
        {
            if (Array.Exists(complexType, t => t == type))
            {
                var insertedItem = (GridEditFormInsertItem)e.Item;
                string name = ((TextBox)insertedItem["Name"].Controls[0]).Text;
                if (type == typeof(City))
                {
                    int regionId = Int32.Parse(((RadComboBox)insertedItem["Region.Id"].Controls[0]).SelectedValue);
                    var city = new City { Name = name, Region = new Region { Id = regionId } };
                    using (var repo = new Repository<City>())
                        repo.Save(city);
                    //grid.MasterTableView.EditFormSettings.FormTableStyle.
                }
                else if (type == typeof(ActivityCategory))
                {
                    int relId = Int32.Parse(((RadComboBox)insertedItem["Branch.Id"].Controls[0]).SelectedValue);
                    var obj = new ActivityCategory { Name = name, Branch = new Branch { Id = relId } };
                    using (var repo = new Repository<ActivityCategory>())
                        repo.Save(obj);
                }
                else if (type == typeof(ProductGroup))
                {
                    int relId = Int32.Parse(((RadComboBox)insertedItem["Branch.Id"].Controls[0]).SelectedValue);
                    var obj = new ProductGroup { Name = name, Branch = new Branch { Id = relId } };
                    using (var repo = new Repository<ProductGroup>())
                        repo.Save(obj);
                }
                e.Canceled = true;
                e.Item.OwnerTableView.IsItemInserted = false;
            }
            else
            {
                e.Canceled = false;
            }

        }
        protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
        {
            if (Array.Exists(complexType, t => t == type))
            {
                var editedItem = (GridEditableItem)e.Item;
                int id = Int32.Parse(((TextBox)editedItem["Id"].Controls[0]).Text);
                string name = ((TextBox)editedItem["Name"].Controls[0]).Text;
                if (type == typeof(City))
                {
                    int regionId = Int32.Parse(((RadComboBox)editedItem["Region.Id"].Controls[0]).SelectedValue);
                    using (var repo = new Repository<City>())
                    {
                        City city = repo.GetById(id);
                        city.Name = name;
                        city.Region = new Region { Id = regionId };
                        repo.Upate(city);
                    }
                }
                else if (type == typeof(ActivityCategory))
                {
                    int relId = Int32.Parse(((RadComboBox)editedItem["Branch.Id"].Controls[0]).SelectedValue);
                    using (var repo = new Repository<ActivityCategory>())
                    {
                        ActivityCategory obj = repo.GetById(id);
                        obj.Name = name;
                        obj.Branch = new Branch { Id = relId };
                        repo.Upate(obj);
                    }
                }
                else if (type == typeof(ProductGroup))
                {
                    int relId = Int32.Parse(((RadComboBox)editedItem["Branch.Id"].Controls[0]).SelectedValue);
                    using (var repo = new Repository<ProductGroup>())
                    {
                        ProductGroup obj = repo.GetById(id);
                        obj.Name = name;
                        obj.Branch = new Branch { Id = relId };
                        repo.Upate(obj);
                    }
                }
            }
        }
        protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
        {
            ;
        }
    }
}



I have no more ideas what to do to set the grid height to auto =( can you help me please?
lina fetisova
Top achievements
Rank 1
 answered on 20 Oct 2010
2 answers
150 views

Hi there,

It's been  over 3 hours since I am getting this error -

"Build (web): Could not load file or assembly 'Telerik.Web.UI, Version=2010.1.519.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified."

What I did was I tried to run the Telerik.WEb.UI dll from the GAC, so dragged it in from my bin folder to the GAC. Then I undid that and tried running it from the bin folder. Since then it just refuses to build and keeps giving me the above error.

Moreover no other project is building on my machine. I have about 8-odd projects using the telerik dll. I tried restarting the Visual studio also restarted my machine, but keep getting the above error. I deleted and added by the reference and clear all temporary internet files, but to no use. I can confirm that all my applciations use .net 2.0 runtime.

Any suggestions will be of great help.

Thanks & Regards


Pavlina
Telerik team
 answered on 20 Oct 2010
1 answer
268 views
Hi,

i want to set Value of RadNumaricTextbox in javascript.

I dont want to use Setvalue() function,How can i set without this function.

Regards
Kumar
Princy
Top achievements
Rank 2
 answered on 20 Oct 2010
1 answer
45 views
Hello,

I have a pretty unique case, that I've only been able to reproduce in Firefox 3.6:

  • create a sample project with a rad Editor
  • load the page with the radEditor, you must start from a freshly loaded page, with no content in the editor.
  • before doing anything else insert a link by using the link manager, or a photo using the photo manager, or paste from word using the dialog.. basically anything that allows you to enter content into the editor without actually typing it there yourself.
  • once inserted, try to hit the backspace to erase it, or select it with the mouse to delete it.

As soon as you type another letter you can then erase everything.  I've been able to reproduce it using a button to insert content into the editor via javascript and the editor.pasteHTML() and/or editor.set_html().  I've tried to set the focus, or add something else after, it doesn't seem to make a difference.

Any ideas?

thanks,
Dobromir
Telerik team
 answered on 20 Oct 2010
1 answer
67 views

Hi,

When I click a folder in the tree, it is loaded (the folder gets populated with children). 

When this happens, I want to output extra meta information about these children to the page.

 

(The children that are loaded when a folder is selected are lazy loaded (or loaded on demand, if you will) from a database (I use a custom content provider)).

 

I've tried using the server side FileExplorer.Load event, since I've noticed that that is called every time a folder is clicked in the tree. However, the text for "testLabel" isn't updated:

 

Page_Load()

{

    fileExplorer.Load += fileExplorer_Load;

}

void fileExplorer_Load(object sender, EventArgs e)

{

        testLabel.Text = "my new metadata  for the newly loaded children"

}

Is it possible to accomplish what I'm trying to do?

Regards,

Andreas

Fiko
Telerik team
 answered on 20 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?