Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
250 views
Can you please provide a demo to show how to filter(using CheckListFilter) the grid with a filtered data set. I have searched through the forum but can't find
a suitable solution which can be fitted in my project. Suppose I have 2 columns in Rad Grid. Column A and B. If I filter the grid using 
column A, then  only those values will show in column B's filter list which are now showing in the grid. It would be very 
helpful if you can provide a demo for it.


Thanks in advance.
Iffat
Kostadin
Telerik team
 answered on 29 Mar 2016
1 answer
100 views

Doing the following in IE will result in both lines being set to 20px:

  • set the font size to a non-default size (in this case 20px)
  • type some text
  • hit enter for a new line
  • type some text

The same thing done in Chrome results in only the first line being 20px, with the second line being set back to the default font size.

Here is the resulting HTML in IE:
<span style="font-size: 20px;">first line<br> second line</span>

and in Chrome:
<span style="font-size: 20px;">first line<br></span>second line

Is there anything that can be done to have Chrome behave like IE in this situation, so that new lines will still be within the font setting span tag?  Using v 2014.1.225.45.

Ianko
Telerik team
 answered on 29 Mar 2016
2 answers
86 views

Hi All,

I wanted to drag a single row from one radgrid to another, but the radgrid row while being dragged is too awkwardly long or big (my radgrid's width is to screen width). Is there a functionality where I could replace a row's appearance while being dragged by the cursor?

 

Thanks,
Jes

 
Jes
Top achievements
Rank 1
 answered on 29 Mar 2016
2 answers
129 views

I have a very strange problem I am using a RadGrid with an .ascx user control form to do editing and adding of new records.  The form works fine when I am editing a record but crashes when I attempt to add a record.

This is the code used to setup the dropdown on the .ascx page

<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="EntityDataSource1"
                        DataTextField="StatusDescription" DataValueField="StatusDescription"
                        SelectedValue='<%# DataBinder.Eval(Container, "DataItem.Status") %>'>
                        <asp:ListItem Selected="True" Text="Select" Value="">
                            </asp:ListItem>
                    </asp:DropDownList>

This is the C# code behind for that page.

namespace CrimeTips
{
    public partial class InvestigationDetailsControl : System.Web.UI.UserControl
    {
        private object _dataItem = null;
 
 
        public object DataItem
        {
            get
            {
                return this._dataItem;
            }
            set
            {
                this._dataItem = value;
            }
 
        }
 
        protected void DropDownList1_SelectedIndexChanged(object sender, DropDownListEventArgs e)
        {
            string StatusValue = DropDownList1.DataValueField;
        }
         
    }
}

And here is the ASPX code for the EditFormSettings

<EditFormSettings UserControlName="InvestigationDetailsControl.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="EditCommandColumn1">
 
                    </EditColumn>
                    </EditFormSettings>

The problem is when I edit the data the form works without any issues.  However, when I attempt to add a records the application crashes with the yellow screen of death with an error message stating

'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value 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.          
Exception Details: System.ArgumentOutOfRangeException: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

I do not understand why the form works for editing purposes but will not render for the add record can someone offer an explanation and a fix for the problem?

 

Thanks

Perry
Top achievements
Rank 1
 answered on 28 Mar 2016
1 answer
172 views

hi

I would like to hide link when time has passed. How should i go about it? Thanks a lot

<telerik:GridBoundColumn DataField="Time"   FilterControlAltText="Filter Time column" HeaderText="Time" ReadOnly="True" SortExpression="Time" UniqueName="Time">
                    <ColumnValidationSettings>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>

   <telerik:GridButtonColumn CommandName="detailcolumn" FilterControlAltText="Filter column column" ItemStyle-ForeColor="#3498DB" ItemStyle-Font-Underline="true"  HeaderText="Detail" Text="Detail" 
                        UniqueName="detailcolumn" >                     
                    </telerik:GridButtonColumn>

 

Kostadin
Telerik team
 answered on 28 Mar 2016
10 answers
3.0K+ views
I've been getting the error below on my production server only ever since I upgraded to the RADControls for ASP.NET Q2 release, file version 2010,2,713,40.  By adding the try/catch below I was able to indetify what assembly was causing the error

 "Could not load file or assembly 'Telerik.Web.UI, Version=2010.1.519.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

The problem is this assembly version does not exist on either my dev or production environment.  This happens everytime I make an update to my prod box and I can usually resolve it by resetting the app pool or resetting IIS but it doesn't always work the first time.  All of my projects are set up under the 4.0 framework and I've cleaned the solution several times but the issue persists.  Also, this error only occurs on pages that use the Entity Framwork to databind.  Any help would be greatly appreciated,

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

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. 
  
Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  
Source Error: 
  
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
  
Stack Trace: 
  
  
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +78
   System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
   System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors) +166
   System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +316
   System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +53
   System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action`1 logLoadMessage) +93
   System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage) +130
   System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +585
   System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +76
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   System.Web.UI.WebControls.GridView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
   System.Web.UI.Control.EnsureChildControls() +102
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
  
  

try
       {       
           RadScheduler1.DataSource = TED.BLL.Appointment.Appointments(SafeValue.SafeInt(ddlView.SelectedValue),SafeValue.SafeInt(ddlCategory.SelectedValue),SafeValue.SafeInt(ddlClientName.SelectedValue),Users,RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd);
           RadScheduler1.DataKeyField = "ID";
           RadScheduler1.DataStartField = "Start";
           RadScheduler1.DataEndField = "End";
           RadScheduler1.DataSubjectField = "Subject";
           RadScheduler1.DataDescriptionField = "Description";
           RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
           RadScheduler1.DataRecurrenceField = "RecurrenceRule";
           RadScheduler1.DataBind();
       }
       catch (Exception ex)
       {
           ReflectionTypeLoadException exception = ex as ReflectionTypeLoadException;
           if (exception == null)
           {
               using (TextWriter tw = new StreamWriter(Server.MapPath("~/Scheduler/EDSLog.txt")))
               {
                   tw.WriteLine("Not a ReflectionTypeLoadException ex.");
               }
           }
           else
           {
               foreach (Exception loaderException in exception.LoaderExceptions)
               {
                   using (TextWriter tw = new StreamWriter(Server.MapPath("~/Scheduler/EDSLog.txt")))
                   {
                       tw.WriteLine(loaderException.Message);
                       tw.WriteLine(loaderException.StackTrace);
                   }
               }
           }
       }
Prasad
Top achievements
Rank 1
 answered on 28 Mar 2016
2 answers
181 views

Hi all

 

I will try to explain you my problem (I'm french with bad engl

I have a datepicker wich, when date is selected, update other items (like button text...) So, I use OnSelectedDateChanged="RadDatePicker1_SelectedDateChanged"

 

In the js code I need to do 2 things : 

1 - Check the css class for make an alert or not. Because, I have day-render function wich change css class of cell if the date is on a list like that : 

 protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        {
            for (int i = 0; i < ListeDate.Count; i++)
            {
                string DateACompare = String.Format("{0:dd/MM/yyyy}", ListeDate[i]);
                DateTime rdvDate = DateTime.ParseExact(DateACompare, "dd/MM/yyyy", null);
                if (e.Day.Date == rdvDate)
                {
                    //e.Cell.BackColor = Color.Red;
                    e.Cell.CssClass = "CasePrise";
                }
            }
        }

 

If css class is not "CasePrise" I want make and alert

 

2 - Refresh my page for update other control with the date selected

 

So I do that, in js :

function RadDatePicker1_OnDateSelected(sender,args)
{
   //Add JavaScript handler code here
   //alert(sender.get_selectedDate());
   __doPostBack('', '');
   if ($(sender).hasClass("CasePrise"))
            alert('Ok');
        else
            alert('Aucunes captures à la date selectionnée')

   
}
function __doPostBack(eventTarget, eventArgument) {
   if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
       theForm.__EVENTTARGET.value = eventTarget;
       theForm.__EVENTARGUMENT.value = eventArgument;
       theForm.submit();
   }
}

 

 

I have two problems : The first is that it don't check the cssclass

The second is that, when it do the postback, my day_render function don't work, so, the cell in my datepicker don't have different background color as it should

 

I hope my message will be understanding

 

Thanks for help

Eyup
Telerik team
 answered on 28 Mar 2016
1 answer
54 views

Hi

Does anyone one why this line is preventing the edit form from displaying when I click "add new record"? The edit form displays normally when I click edit on a row.

<asp:DropDownList ID="lst_ProjectCode" class="form-control" runat="server" Width="250" DataSourceID="SqlDataSource2" DataValueField="ProjectCode" SelectedValue='<%# Bind("ProjectCode")%>'></asp:DropDownList>

It is something to do with the SelectedValue='<%# Bind("ProjectCode")%>' as otherwise it the edit form comes up.

 

 

Kostadin
Telerik team
 answered on 28 Mar 2016
4 answers
132 views

Hi, everyone.

 

I want to use RadHtmlChart -> ' Scatter Chart ' to make "nine grid model" to show my record from DataSource and so... I have make it like '9grid_original.PNG' then I want to display background like '9grid_want.PNG'.

 

Have RadHtmlChart have any method or any styling features to display background like '9grid_want.PNG' (that pic edit with paint)

Or I shoud use Div and any CSS to make it than RadHtmlChart Function?

 

Thanks for every suggestion and Sorry about my weird English.

 

Marin Bratanov
Telerik team
 answered on 28 Mar 2016
1 answer
127 views
Hi,

I'm working with KendoUI on the front end, and following some of their "default" way of doing things (that means using their DataSource object), I request data from a MVC WebAPI controller with a GET.

The request looks like :

filter[logic]                    And
filter[filters][0][field]         Description    
filter[filters][0][operator]    StartWith
filter[filters][0][value]        $20
page                            1
pageSize                        10
skip                            0
take                            10



I had tried so many ways to read the filters but all in vain.

Can anyone help/advice me how to map these query-strings into an object?

Thanks a lot.
Alexander Valchev
Telerik team
 answered on 28 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?