Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
I have the following structure:
- Main page
-- user control
--- tabstrip
---- tab (pageview)
----- user control
------ grid

The user was concerned that as they moved around the app that the grid would maintain its data. I do build a datasource and save it to state, and then on postback refresh from state in order to respond to the current request.
But if the user clicks on the tabstrip, I clear all state data, then use Response.Redirect to go back to the Main page. This forces Page_Init and all other load and render events which regenerate the grid.

What's weird is that the structure of the grid resets but not the data. I'm clearing filters, resetting sorting, resetting grouping, and yes, the DataSource is null. I am not rebinding in this event, because the grid data source is already null. If I do rebind, the larger cycle is re-initiated, so I'd rather avoid that. I can set a flag that detects a reset and initate the rebind from Page_Init or Page_Load.

I'm just wondering why the grid structure is refreshed but not the data. Do I need to set the RadAjaxManager to trigger/update some component other than the grid?

And if a change to the AjaxManager is required, what would that be given the above structure? Aside from making the nested components aware of parent components through properties, I'm not aware of how I would set the AjaxManager to update based on an event outside of the local scope.

I understand the request could be vague with no further info, and will do what I can to provide relevant info on request.

Thanks!
Andrey
Telerik team
 answered on 15 Aug 2012
1 answer
100 views

I need some assistance as to how can I assign the DataValueField Value using the code below.
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 
    'Dim UserName As String = Request.QueryString("UserName")
    Dim UserName As String = "Test"
    lbl_UserName.Text = UserName
 
    If Not IsPostBack Then
 
        Dim results As New ArrayList()
 
 
        Dim context As New PrincipalContext(ContextType.Domain, "Fred_NT")
        Dim p As UserPrincipal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, UserName)
 
        Dim groups = p.GetAuthorizationGroups()
 
        For Each group In groups
            results.Add(group.Name)
        Next
 
        rlb_MemberGroups.DataValueField = ????????
        rlb_MemberGroups.DataSource = results
        rlb_MemberGroups.DataBind()
    End If
 
    Label1.Visible = False
 
End Sub

Thanks as always.
Ivana
Telerik team
 answered on 15 Aug 2012
1 answer
166 views
I am using RadAsyncUpload in a form which work fine under HTTP. As soon as I turn SSL on and access page through HTTPS, when I click select button
  •  it doesn't work (open dialog to choose file) on IE 7 and 9, but works fine on firefox.
  • on firefox dialog open and after selecing a file it start uploading file then in give red light with error in firebug (uncaught exception: Error while uploading, HTTP Error code is: 0)
  • if on IE I disabled silverlight Add-on,I can open popup to choose a file, but progress bar keep loading and never complete uploading file or gives error
 
I have tried all below but still same issue
  1.  Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function() { return false; };, 
  2. setting EnableFileInputSkinning = false
  3. checking .axd is correctly configured in webconfig.

Also, if i set DisablePlugins="true", the dialog appears but file fails to load correctly and give red light.

Peter Filipov
Telerik team
 answered on 15 Aug 2012
1 answer
161 views
What's the best way to notify the user that they've arrived at the maximum length supported by a particular field?  Will i have to use a key up function and test the length, or is there some alternate method i might use?  It doesn't appear that there is anything built in - is there something i missed?

-RP
Eyup
Telerik team
 answered on 15 Aug 2012
1 answer
88 views
Hi,
Is it possible to disable or hide sorting items of RadGrid header context menu for specific columns? In the other word, sorting config some of columns set to false, and I want to hide this items in header context menu.  
Pavlina
Telerik team
 answered on 15 Aug 2012
1 answer
40 views
I need to get the value of the selected index or row id and pass it to a base page.

Is there someone who has done this?
Eyup
Telerik team
 answered on 15 Aug 2012
3 answers
46 views
Is there a way to show the month view, but instead of having the first line be the first line of the month, set a different week to be the first week in tihe month view?

For example, if the user selected the date Sept 22nd (or if we auto set it by defaulting to the current date), then the week of Sept 19th would be the first week in the month view, and it would show the next 5 weeks in the month view (spanning into October).

Is this possible?
Ivana
Telerik team
 answered on 15 Aug 2012
4 answers
112 views
Hi all,
I am getting JScript error as "Microsoft JScript runtime error: 'Telerik' is undefined" while running my project.
I have just tried configuring the project  from the menu bar 'Telerik->Rad controls for asp.net ajax->configure project' and it gives me this error.
Please find below my webconfig file.I could find some threads in forum about trouble shooting for the same.But that didn't solve my issue.
I am using .net 4.0 version.Please help me on this.
<?xml version="1.0"?>
<configuration>
    <connectionStrings>
        <add name="xxx" connectionString="Data Source=xxxx;Initial Catalog=xxx;Integrated Security=False; User ID=abc; Password=xxxx;" />     
    </connectionStrings>
    <appSettings>
    <add key="Telerik.Skin" value="Default" />
    <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />
         
         
         
    </appSettings>
    <system.web>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies></compilation>
        <pages>
            <controls>
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
            </controls>
        </pages>
        <httpHandlers>
            <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
<!--<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />-->
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2012.2.607.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
        </httpHandlers>
        <httpModules>
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
        </httpModules>
    </system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="RadUploadModule" />
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
            <remove name="RadCompression" />
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
        </modules>
        <handlers>
           <remove name="ChartImage_axd" />
<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_DialogHandler_aspx" />
<add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_RadUploadProgressHandler_ashx" />
<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_WebResource_axd" />
<!--<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />-->
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2012.2.607.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
      <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2012.2.607.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
        </handlers>
    </system.webServer>
   
</configuration>
Milena
Telerik team
 answered on 15 Aug 2012
6 answers
185 views
Greetings.

I have a 100% code generated RadGrid.  It's purpose in life is to interrogate and render UI to support a Code-First Entity Framework model.

During entity edits/inserts, I would like to display a RadComboBox with checkboxes (multiselect) for child entities.  For example:

Editing Company X
ComboBox shows 20 potential employees (entire universe of the Employee entity)
Employees can be selected, and the child relationship between Company -> Employee (1 to many) are updated during RadGrid save.

Getting the combobox to appear and populate itself with the list of potential choices is no problem. I'm running into trouble when saving.  I'm trying to use the same approach that I use for other custom templates associated with the grid....


public IOrderedDictionary ExtractValues(Control container)
        {
            OrderedDictionary od = new OrderedDictionary();
            foreach (RadComboBoxItem item in rcb.Items)
            {
                if (item.Checked)
                   {
                    od.Add(name.Singularize(), item.Value); // bind the selected value to the FK Id
                }
            }
            return od;
        }

This fails for a couple reasons.  1) If I select more than one checkbox, I run into an issue trying to add the same key twice.  2) More importantly, even if I only select one item, the RadGrid update process doesn't like what I'm trying to do here (complains that a property named Employee was not found in Company).  This makes sense since Employee is a related collection, and obviously I need to be doing things differently in ExtractValues (or somewhere else).... I'm just not sure what/where.

Thanks!
Mike
Pavlina
Telerik team
 answered on 15 Aug 2012
1 answer
89 views
I am changing the chart series programmatically and the data type is not numeric it is a datetime field. How do I change this value type? here is my code so far:

(it's a switch statement)

case "HOURS":
                                  sdsProjectVideos.SelectCommand = "asGetVideosByProjectIDSortHours";
                                  RadChart1.ChartTitle.TextBlock.Text = "HOURS WATCHED";
                                  sdsProjectChart.SelectCommand = "asGetVideosByProjectIDSortHoursChart";
                                  RadChart1.Series.Clear();
                                  ChartSeries chartSeries = new ChartSeries();
                                  chartSeries.Name = "Hours Watched";
                                  chartSeries.DataYColumn = "HoursWatched";
                                  RadChart1.Series.Add(chartSeries);
                                  lblHours.Font.Underline = true;
                                  break;
Ves
Telerik team
 answered on 15 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?