Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
83 views
Hello All, 

I'm new to telerik grids, 

on Grouping, we need to present data in 2 rows for example say we are presenting student scores in each subject 

Science Math IT
National Average     99 99 100
County Average 99 92 99
Student 1 50 50 50
Student 2 1 1 1
National Average     98 50 55
County Average 20 10 50
Student 3 1 1 1
Student 4 1 1 1

So my grouped row should display, 2 rows of data i.e. National and County Average

Any suggestions or link to a sample would be of great help!

Many Thanks
Vijay


Vijay
Top achievements
Rank 1
 asked on 25 May 2012
1 answer
116 views
Hello

As I can use elements from my server for example js, css and gif and not use an externalurl for example http://aspnet-skins.telerikstatic.com/ajaxz/2012.1.215/FormDecorator.css

thank you very much beforehand 
Marin Bratanov
Telerik team
 answered on 25 May 2012
1 answer
104 views
Hi, we upgraded our web site from .NET 2.0 to 4.0, then some controls of RadControls for Asp.Net Q2 2007 can't work properly.

Test Enviroment :

 

IE Version : IE8

IIS Version : 5.0

RadControls Version : RadControls for Asp.Net Q2 2007(ASP.Net 2.X)

 

Issue one :

If a page used controls in assembly named RadAjax.Net2, there will be some Javascript errors caused when loading these pages. Please see picture "err1.jpg";

 

If I remove these ajax controls from this page , there will be no Javascript error.

 

Issue two:

I can’t select a Item from RadComBox. And RadComBox will always only display the last item if I click the left mouse button. Please see picture "err1.2pg";

My question is :
Can "RadControls for Asp.Net Q2 2007" work on .NET 4.0? If yes, what I should do to fix above two issues? If not, what I shall do if I have to use .NET 4.0?
I tried Telerik.Web.UI_2012_1_411_Dev.msi on .NET 4.0. There are big differences between RadControls for Asp.Net Q2 2007 in coding. If I use  

Telerik.Web.UI_2012_1_411_Dev.msi , I have to change huge amount of code. I can't afford it.

Would you give me some solutions to solve this problem? thanks in advance.

George

Richard
Top achievements
Rank 1
 answered on 25 May 2012
1 answer
128 views
Hi

Here's my issue: I ve a button in my content page, on click I want to upload a label in my master page with ajax.

I've read that: http://www.telerik.com/help/aspnet/ajax/ajxmasterpageupdateeverywhere.html 
and tried something like that:

In my content page: 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load      
           Dim AjaxManager As RadAjaxManager = CType(Me.Master.FindControl("radAjaxManMaster"), RadAjaxManager)
           Dim lbl  As Label = CType(Master.FindControl("myLabel"), Label) 
           AjaxManager.AjaxSettings.AddAjaxSetting(btnAdd, lblCartItemCount, Nothing)   
    End Sub

Protected Sub btnAjouter_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    Dim lbl As Label = CType(Me.Master.FindControl("myLabel"), Label)
            lbl.Text = "New value"
End Sub

On the masterpage I ve that: 
 <telerik:RadAjaxManager ID="radAjaxManMaster" runat="server"  DefaultLoadingPanelID="RadAjaxLoadingPanel1">
 </telerik:RadAjaxManager>

<asp:Label id="myLabel"  runat="server"></asp:Label>


The loadingpanel is displayed on my label but it keeps the old value...

What I dont get its that it is rendering page cycle twice (two time page load on master page and contentpage)
...
(When I'm removing the three lines in page load of content page it works as it should (no page event called twice and label is updated but page is postback and no ajax...)) 


Could someone help me?
Iana Tsolova
Telerik team
 answered on 25 May 2012
2 answers
66 views
I am using RadSchedular with tooltips. I am updating RadSchedular with data on button click event. this is post back event.
Everything is working good. Only issue is when it postback events takes time there is no hour glass on RadSchedular.

So I added ajax support to button by adding it to AjaxManager and associating Radschedular to RadAjaxLoading panel.
This solved my issue but it broke my tooltip. ( does not work any more). Please help me to fix that.
I can send my project file. Let me know

If I remove following from RadAjaxmanager- tool tip starts working.
 <AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnViewUpdate">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="lblViewName" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
Ashok
Top achievements
Rank 1
 answered on 25 May 2012
14 answers
270 views
Hello,
Below is how I initialize grid and filter

1. Page containing grid:
protected override void Page_Init(object sender, EventArgs e)
        {
            base.Page_Init(sender, e);
            Grid = new RadGrid(); // actually this is not RadGrid but descendant class I created
            Grid.Initialize(ZSheet, ForceLoad, DataSourceProvider, this); // create columns runtime
            ZSheetContainer.Controls.Add(Grid); 
            GridFilter.Initialize(ZSheet, Grid.ZTable.TableNameUser); 
            if (IsPostBack)
                GridFilter.ApplyFilter(); // create and apply filter expressions obtained from different source, see below
        }

2. Create filter expressions and editors:

public void ApplyFilter()
        {
            if (string.IsNullOrWhiteSpace(_hf.Value)) return;
            List<GridFilterItem> filterItems =
                new JavaScriptSerializer().Deserialize<List<GridFilterItem>>(_hf.Value);
            foreach (GridFilterItem item in filterItems)
            {
                ZSheetItem zitem = _table.Structure.FirstOrDefault(t => t.f_name == item.Condition.ColumnID);
                Type columnType = GetColumnType(zitem);
                Type filterExpressionType;
                Type[] types = new[] { columnType };
 
                switch (item.Condition.Operator)
                {
                    case GridKnownFunction.Contains:
                        filterExpressionType = typeof(RadFilterContainsFilterExpression);
                        break;
                    case GridKnownFunction.DoesNotContain:
                        filterExpressionType = typeof(RadFilterDoesNotContainFilterExpression);
                        break;
                    case GridKnownFunction.StartsWith:
                        filterExpressionType = typeof(RadFilterStartsWithFilterExpression);
                        break;
                    case GridKnownFunction.EndsWith:
                        filterExpressionType = typeof(RadFilterEndsWithFilterExpression);
                        break;
                    case GridKnownFunction.EqualTo:
                        filterExpressionType = typeof(RadFilterEqualToFilterExpression<>);
                        break;
                    case GridKnownFunction.NotEqualTo:
                        filterExpressionType = typeof(RadFilterNotEqualToFilterExpression<>);
                        break;
                    case GridKnownFunction.GreaterThan:
                        filterExpressionType = typeof(RadFilterGreaterThanFilterExpression<>);
                        break;
                    case GridKnownFunction.LessThan:
                        filterExpressionType = typeof(RadFilterLessThanFilterExpression<>);
                        break;
                    case GridKnownFunction.GreaterThanOrEqualTo:
                        filterExpressionType = typeof(RadFilterGreaterThanOrEqualToFilterExpression<>);
                        break;
                    case GridKnownFunction.LessThanOrEqualTo:
                        filterExpressionType = typeof(RadFilterLessThanOrEqualToFilterExpression<>);
                        break;
                    case GridKnownFunction.Between:
                        filterExpressionType = typeof(RadFilterBetweenFilterExpression<>);
                        types = new[] { columnType, columnType };
                        break;
                    case GridKnownFunction.NotBetween:
                        filterExpressionType = typeof(RadFilterNotBetweenFilterExpression<>);
                        types = new[] { columnType, columnType };
                        break;
                    case GridKnownFunction.IsEmpty:
                        filterExpressionType = typeof(RadFilterIsEmptyFilterExpression);
                        break;
                    case GridKnownFunction.NotIsEmpty:
                        filterExpressionType = typeof(RadFilterNotIsEmptyFilterExpression);
                        break;
                    case GridKnownFunction.IsNull:
                        filterExpressionType = typeof(RadFilterIsNullFilterExpression);
                        break;
                    case GridKnownFunction.NotIsNull:
                        filterExpressionType = typeof(RadFilterNotIsNullFilterExpression);
                        break;
                    default:
                        filterExpressionType = typeof(RadFilterEqualToFilterExpression<>);
                        break;
                }
 
                Type genericType = filterExpressionType.MakeGenericType(types);
                RadFilterExpression expression = (RadFilterExpression)Activator.CreateInstance(genericType, item.Condition.ColumnID);
                _filter.RootGroup.AddExpression(expression);
             }            
            _filter.FireApplyCommand();
}
 Now about the problem. When I call ApplyFilter from Page_Load() method, it raises a NullReferenceException in RadFilterDataEditor.CreateEditorFrom() method. When I call it from Page_Init() right after grid is initialized, filter won't apply. What am I doing wrong?
Thank you.
Rick
Top achievements
Rank 1
 answered on 25 May 2012
3 answers
96 views
When i click on my insert record button it is giving me an error about Conversion from type 'DBNull' to type 'Boolean' is not valid.  I would think that i knows not to use these databinding since this is for updating and not inserting the data.  I have a custom form that I am using but the same for should be used for inserting as well.

<EditFormSettings EditFormType="Template">
                               <FormTemplate>
                                   <table width="100%">
                                       <tr>
                                           <td style="width:10%" align="right">Mac Type: </td>
                                           <td style="width:15%" align="left"><asp:DropDownList ID="ddlMacType" runat="server" AutoPostBack="false" Width="205px"></asp:DropDownList></td>
                                           <td style="width:10%" align="right">SSN: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtSSN" runat="server" Width="200px" Text='<%# Bind("strSSN") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">EDIPI: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtEDIPI" runat="server" Width="200px" Text='<%# Bind("strEDIPI") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">AKO Logon: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtAKO" runat="server" Width="200px" Text='<%# Bind("strAkoLogon") %>'></asp:TextBox></td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr>
                                           <td style="width:10%" align="right">LName: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtLName" runat="server" Width="200px" Text='<%# Bind("strLName") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">FName: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtFname" runat="server" Width="200px" Text='<%# Bind("strFname") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">MI: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtMI" runat="server" Width="200px" Text='<%# Bind("strMI") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">Gen Qual: </td>
                                           <td style="width:15%" align="left"><asp:DropDownList ID="ddlGenQual" runat="server" AutoPostBack="false" Width="205px"></asp:DropDownList></td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr>
                                           <td style="width:10%" align="right">Emp Type: </td>
                                           <td style="width:15%" align="left"><asp:DropDownList ID="ddlEmpType" runat="server" AutoPostBack="false" Width="205px"></asp:DropDownList></td>
                                           <td style="width:10%" align="right">Rank/Salutation: </td>
                                           <td style="width:15%" align="left"><asp:DropDownList ID="ddlSalutation" runat="server" AutoPostBack="false" Width="205px"></asp:DropDownList></td>
                                           <td style="width:10%" align="right">Job Title: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtJobTitle" runat="server" Width="200px" Text='<%# Bind("strJobTitle") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">Pick Unit: </td>
                                           <td style="width:15%" align="left"><asp:DropDownList ID="ddlunit" runat="server" AutoPostBack="false" Width="205px"></asp:DropDownList></td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr>
                                           <td style="width:10%" align="right">Requires Email: </td>
                                           <td style="width:15%" align="left"><asp:CheckBox ID="cbEmail" runat="server" Checked='<%# Bind("bitEmail") %>' /></td>
                                           <td style="width:10%" align="right">Military Phone: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtPhone" runat="server" Width="200px" Text='<%# Bind("strPhoneNumber") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">Requires LD: </td>
                                           <td style="width:15%" align="left"><asp:CheckBox ID="cbLD" runat="server" Checked='<%# Bind("bitLongDistance") %>' /></td>
                                           <td style="width:10%" align="right">Requires VM: </td>
                                           <td style="width:15%" align="left"><asp:CheckBox ID="cbVM" runat="server" Checked='<%# Bind("bitVoiceMail") %>' /></td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr>
                                           <td style="width:10%" align="right"></td>
                                           <td style="width:15%" align="left"></td>
                                           <td style="width:10%" align="right">Zero Out: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtZeroOut" runat="server" Width="200px" Text='<%# Bind("strVoiceExt") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right">Notes: </td>
                                           <td style="width:15%" align="left"><asp:TextBox ID="txtNotes" runat="server" Width="260px" TextMode="MultiLine" Height="60px" Text='<%# Bind("strNotes") %>'></asp:TextBox></td>
                                           <td style="width:10%" align="right"></td>
                                           <td style="width:15%" align="left"></td>
                                       </tr>
                                         <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                   </table>
                                   <table width="100%">
                                        <tr>
                                           <td style="width:25%"></td>
                                           <td style="width:50%" align="center">
                                               <asp:LinkButton ID="lnkSubmit" runat="server" text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' 
                                               CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:LinkButton>
                                                     
                                               <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                           </td>
                                           <td style="width:25%"></td>
                                       </tr>
                                   </table>
                               </FormTemplate>
                           </EditFormSettings>

I know the update protion is correct but is the insert portion correct for using the radgrid insert record button.

If (e.CommandName = RadGrid.PerformInsertCommandName) Then
       End If
       If (e.CommandName = RadGrid.UpdateCommandName AndAlso e.Item.IsInEditMode) Then
     End if


Error
Conversion from type 'DBNull' to type 'Boolean' is not valid. 
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.InvalidCastException: Conversion from type 'DBNull' to type 'Boolean' is not valid.
  
Source Error: 
  
  
Line 85:                                         <tr>
Line 86:                                             <td style="width:10%" align="right">Requires Email: </td>
Line 87:                                             <td style="width:15%" align="left"><asp:CheckBox ID="cbEmail" runat="server" Checked='<%# Bind("bitEmail") %>' /></td>
Line 88:                                             <td style="width:10%" align="right">Military Phone: </td>
Line 89:                                             <td style="width:15%" align="left"><asp:TextBox ID="txtPhone" runat="server" Width="200px" Text='<%# Bind("strPhoneNumber") %>'></asp:TextBox></td>
  

Kevin
Top achievements
Rank 1
 answered on 25 May 2012
3 answers
215 views

I am using Radgrid  and  have the following situation.
First GroupBy is  Product and with in product it is grouped by City 

PRODUCT Part A Part B
Produc AA
City:  New York
 Conractor 1 10 20
Cotnractor 2 12 8
Cotnractor 3 22 20
City Total 44 48
City:Chicago
Cotnractor3 22 12
contractor8 11 33
Contactor 10 24 10
City Total 57 55
Prodcut Total 101 103

Eveything works fin about the total and also I am inserting the labels accordingly in the group footer.

I need to make my group footer more readble i.e it should say  NewYork City Total and Chicago City Total  in the inner group
and  it should say Product AA Total for outr group  rather that standard label

How do I access the groupby value from its Groupfooter.

Thanks for you help



Daniel
Telerik team
 answered on 25 May 2012
1 answer
76 views
When I try

AddHandler editor_Text.OnExportContent, AddressOf dynamanual_ExportContent

I keep getting:

Compiler Error Message: BC30390: 'Telerik.Web.UI.RadEditor.Protected Overridable Sub OnExportContent(e As Telerik.Web.UI.EditorExportingArgs)' is not accessible in this context because it is 'Protected'.

Marc
Rumen
Telerik team
 answered on 25 May 2012
1 answer
163 views
Hi ,

I ahve an existing application wich was working fine with Telerik.web.ui dll (version 2007.3.1314.20), but to use some new features(i.e. Schedular control) we just added the latest version of the dll( 2010.3.1317.20), but after updating to this dll we are facing lots of issues
1. We have Page which have the Update pannel control and when we add the user control which has the telerik:RadAjaxManager control it show the following exception "telerik:RadAjaxManager :-A control with id not be found for the trigger in updatepannel"

Please suggest on this.

Below is the code snippet
in CtrlPlaceholder we are loading the user control

<

 

 

asp:UpdatePanel id="pnluCompanyData" EnableViewState="true" runat="server" UpdateMode="Conditional"

 

 

 

RenderMode="Inline">

 

 

 

<contenttemplate>

 

 

 

<asp:PlaceHolder id="CtrlPlaceholder" EnableViewState="true" runat="server" ></asp:PlaceHolder>

 

</asp:UpdatePanel>

User control code

<

 

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >

 

 

 

<AjaxSettings >

 

 

 

<telerik:AjaxSetting AjaxControlID="mvwDriver1" >

 

 

 

<UpdatedControls >

 

 

 

<telerik:AjaxUpdatedControl ControlID="divLoadingImageDriver" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

<ClientEvents OnResponseEnd="Driver_ResponseEnd" OnRequestStart="ApplyFormCssClass(dDisablescreen)" />

 

 

</

 

 

telerik:RadAjaxManager>

 

<

 

 

telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

 

 

 

Width="75px">

 

 

 

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

 

 

 

style="border: 0px;" />

 

</

 

 

telerik:RadAjaxLoadingPanel>

 



Regards
Anurag Sharma
Iana Tsolova
Telerik team
 answered on 25 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?