Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
240 views
Hello,

I'm having problems to add Aggregate to a GridCalculatedColumn.

This is my code (due to space I'm only copying a part of it):

<telerik:GridTableView runat="server" AllowSorting="true" DataKeyNames="QuotationLineId"
    Caption="Quotation Lines" Name="QuotationLines" PageSize="10"
    CommandItemDisplay="Top" AllowPaging="true" AutoGenerateColumns="False"
    GridLines="None" AllowFilteringByColumn="false" ShowFooter="True">
 
    <Columns>
        <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
            Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
            UniqueName="EditButton" ImageUrl="~/Images/Edit.png" CommandName="Edit">
            <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="QuotationLineId" HeaderText="Id"
            UniqueName="QuotationLineId" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Units" DataField="Units" UniqueName="Units" ItemStyle-Width="25px"
            ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:0.00}">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Description" DataField="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Cost" DataField="Cost" UniqueName="Cost" ItemStyle-HorizontalAlign="Right"
            HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-Width="65px">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Price" DataField="Price" UniqueName="Price" ItemStyle-HorizontalAlign="Right"
            HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-Width="65px">
        </telerik:GridBoundColumn>
        <telerik:GridCalculatedColumn UniqueName="TotalCost" HeaderText="Total Cost"
            DataFields="Units, Cost" Expression='{0}*{1}' ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right"
            DataFormatString="{0:c}" ItemStyle-Width="65px" Aggregate="Sum" FooterStyle-HorizontalAlign="Right"
            FooterAggregateFormatString="{0:c}">
        </telerik:GridCalculatedColumn>
        <telerik:GridCalculatedColumn UniqueName="TotalPrice" HeaderText="Total Price"
            DataFields="Units, Price" Expression='{0}*{1}' ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right"
            DataFormatString="{0:c}" ItemStyle-Width="65px">
        </telerik:GridCalculatedColumn>
        <telerik:GridCalculatedColumn UniqueName="Margin" HeaderText="Margin"
            DataFields="Cost, Price" Expression='1-({0}/{1})' ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right"
            DataFormatString="{0:0.00%}" ItemStyle-Width="25px">
        </telerik:GridCalculatedColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
            Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
            UniqueName="DeleteButton" ImageUrl="~/Images/Delete.png" CommandName="Delete"
            ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="Delete record..."
            ConfirmDialogHeight="130px">
            <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
        </telerik:GridButtonColumn>
    </Columns>
 
</telerik:GridTableView>


The error is:

Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: Exception has been thrown by the target of an invocation.

If I write the same code in a bind column all works fine.

Regards
Jose
Mira
Telerik team
 answered on 06 Jul 2011
8 answers
82 views
Hi, I have a scheduler and 2 listbox on a project and it is working fine all along.

But out of a sudden, all telerik controls cannot be display properly. Attached below shows how it is displayed.

It is a urgent matter, hope to receive good news and reply as soon as possible.

Cheers!
Georgi Tunev
Telerik team
 answered on 06 Jul 2011
1 answer
647 views
I have a datatable that has the following values

Item   Value
C1      12
C2      14
C12    25
C24    30
Dist     90
site     24

I want to create two pie charts. In the First pie chart, i want tos how the C1, C2 and c12 on the pie chart and along with the series. in the series, I want tos how C1, c2 and C12
In the second pie chart, i want to show C24, dist and site. how can I acheive this.

any help will be appreciated.

Thanks

Evgenia
Telerik team
 answered on 06 Jul 2011
11 answers
295 views
I have a radgrid on my page and I have it set up so that I allow multiple selections via a checkbox.

I want to be able to get the selected rows checked and update their field(status) to a certain value.

I want to use a command button for this. the user will select the records and click the button which will update "status" to "confirmed".

Is this possible to be done through a stored procedure? If not, just through vb.net

Thanks

Andrew
Top achievements
Rank 1
 answered on 06 Jul 2011
2 answers
96 views
You mentioned that this problem will be fixed in next release.
What is the status of it?



Related to: http://www.telerik.com/community/forums/aspnet/general-discussions/radcolorpicker-doesn-t-display-palette-tabs.aspx
Roman
Top achievements
Rank 1
 answered on 06 Jul 2011
1 answer
96 views
Hi eveybody,
I'm tring to create schedule page. And I used this sample http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx . And my page has a menu which it can close and open. So I want to refresh my schedule/splitter size when i close or open my menu. Actually It works when I change main explorer window size. But I couldn't find which method is calling from schedule or splitter. So How Can I handle it?

Thanks
Gökhan
Plamen
Telerik team
 answered on 06 Jul 2011
1 answer
92 views
Hi ,
  In my add form template , I m using Resource type to display the combo box in form template , in combo box i have to use Text with Icons  or Color then Name in Text Field, i want be same like Outlook Category and i m using Default Template in Scheduler .. Can you suggest me how to do this Concept.. Is it possible to assign category of appointment via the drop down menu in the Add appointment dialog?

I need Same Function  From this link http://www.telerik.com/help/wpf/radscheduler-features-categories.html but its should in WPF. I need in ASP.NET Ajax
Plamen
Telerik team
 answered on 06 Jul 2011
0 answers
98 views
How to bind multiple record in one label box ,



Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 asked on 06 Jul 2011
2 answers
120 views
Hi,
I have a grid that among the columns has 2 template columns that have editors present.  One of them selects whether or not the row is relevant and the other allows the entry of some text.  

This all works fine on the client but once the form comes back to the server I only see the original values that the controls in the 2 columns were set to - not any changed values.

The columns are as below (they get setup with the correct values via the ItemDataBound event):

<telerik:GridTemplateColumn DataField="Selected" HeaderText="Use?" UniqueName="uxSelected">
   <ItemTemplate>
      <asp:CheckBox ID="uxSelectedCheckbox" runat="server" Enabled="true" />
   </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="SackColourRcGcBc" HeaderText="Custom Colour" UniqueName="uxSackColourRcGcBc">
   <ItemTemplate>
      <telerik:RadTextBox ID="uxSackColourRcGcBcTextbox" runat="server" Width="80px" AutoPostBack="False"/>
   </ItemTemplate>
</telerik:GridTemplateColumn>


The code behind is as below:

Dim idString As String = ""
Dim colourString As String = ""
Try
    For Each item As GridDataItem In DirectCast(uxFormView.FindControl("uxRadGrid"), RadGrid).Items
        Dim SackTypeID As String = item.GetDataKeyValue("SackTypeID").ToString()
 
        If CType(item("uxSelected").FindControl("uxSelectedCheckbox"), System.Web.UI.WebControls.CheckBox).Checked Then
            idString += SackTypeID + "!"
            If ConvertRGBToHTMLColour(CType(item("uxSackColourRcGcBc").FindControl("uxSackColourRcGcBcTextbox"), RadTextBox).Text) <> "" Then
                colourString += CType(item("uxSackColourRcGcBc").FindControl("uxSackColourRcGcBcTextbox"), RadTextBox).Text
            End If
            colourString += "!"
        End If
    Next
Catch ex As Exception
End Try


Any suggestions on what I'm doing wrong or if it can't be done like this.  If not I suppose that I can knock up some client side javascript to handle it but would prefer not to.  I've seen other examples and they seem to indicate that this should work..

Best Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 06 Jul 2011
2 answers
96 views

We have a old application where it uses Telerik 2009 version where it contains a dll for each control such as Radwindow.
In 2009 version if we need to use Radwindow we register something like this

 

<%

@ Register Assembly="RadWindow.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

 

and use the same like

 

 

<

 

rad:RadWindowManager ID="RadWindowManager1" runat="server">

 

 

 


Now we have 2010 version where we have a license.  How to upgrade these files. If we just replace them with our new version will it work?
But in the new version we have only one dll but in the older version we have a single dll for each control.
Please help.

Georgi Tunev
Telerik team
 answered on 06 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?