Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
130 views
Hi

I have a Grid with Calculated Columns
- when the user clicks edit button he enters the unit cost of an item.
- then the Item Cost is calculated automaticaly (Number of Pages * Unit Cost).
- Unit Cost is in Orders Table and Number of Pages is on Item Table.
- Everything is working fine except the user has to click two times on Edit to update the Item Cost, as for the first edit the user enters the Unit Cost and by clicking Update the Unit Cost columns updated correctly but the Item Cost column does not and the user needs to click edit again and click update again (without any change) to update the Item Cost Column.

Can the Item Cost update automaticaly when the user clicks update the first time.

here is my SqlDataSource:
-----------------------------------------------------
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:OrderSystemConn %>"
        DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @OrderID"
        InsertCommand="INSERT INTO Orders(DaysLeft, StatusID, ItemCost) VALUES (@DaysLeft, @StatusID,)"
        SelectCommand="SELECT Orders.OrderID, Orders.OrderDate, Orders.Quantity, Orders.ManageDate, Orders.OrderSpecs, Orders.ManageSubmit, Orders.ManageComment, Orders.DaysLeft, Orders.FinishDate, Orders.ItemID, Orders.StatusID, Status.StatusName, Orders.SupplierID, Division.DivisionName, Category.CategoryName, Type.TypeName, Item.FullCode, Version.VersionName, Orders.UnitCost, Orders.ItemCost, Orders.TotalCost, Item.PagesNumber FROM Orders INNER JOIN Status ON Orders.StatusID = Status.StatusID INNER JOIN Item ON Orders.ItemID = Item.ItemID INNER JOIN Category ON Item.CategoryID = Category.CategoryID INNER JOIN Division ON Item.DivisionID = Division.DivisionID INNER JOIN Type ON Item.TypeID = Type.TypeID INNER JOIN Version ON Item.VersionID = Version.VersionID WHERE (Orders.ManageSubmit = 1) AND (Orders.StatusID &lt;&gt; 3) AND (Orders.SupplierID = 2) ORDER BY Orders.FinishDate"         
        
        UpdateCommand="UPDATE Orders SET UnitCost = @UnitCost,  ItemCost = Orders.UnitCost * Item.PagesNumber FROM Orders INNER JOIN Item ON Orders.ItemID = Item.ItemID WHERE (Orders.OrderID = @OrderID)">
        <DeleteParameters>
            <asp:Parameter Name="OrderID" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="UnitCost" />
            <asp:Parameter Name="OrderID" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="DaysLeft" />
            <asp:Parameter Name="StatusID" />
        </InsertParameters>
    </asp:SqlDataSource>
-------------------------------------------------------
grand lorie
Top achievements
Rank 1
 answered on 12 Apr 2010
2 answers
82 views
Hi,

I was wondering why we are able to edit and delete only, but I don't see insert? maybe I'm new to this but can someone guide me if I can insert without coding because I'm running out of time to do coding.

Mike Arasteh
Top achievements
Rank 1
 answered on 12 Apr 2010
1 answer
134 views
hi

i want to ask how cn i change the default image of the hierarchy expand image button?

thanks

regards
webster
Shinu
Top achievements
Rank 2
 answered on 12 Apr 2010
1 answer
217 views
Hello,
Is it possible to do the following?

I am building my grid from code behind dynamically, i need to do 2 things:
1. After i draw the grid, i need to write specific data by (Client/Category)
2. When i click on a specific cell it should open a window that will pass the Client and Category of the clicked cell to the window.

I'm attaching the code i'm using

<

 

telerik:RadGrid ID="RadGrid1" Width="100%" runat="server" CellPadding="0" AutoGenerateColumns="false" GridLines="Both"  HorizontalAlign="NotSet" ClientSettings-AllowColumnsReorder="false" ClientSettings-ReorderColumnsOnClient="false"

 

 

 

AllowSorting="false" FilterItemStyle-HorizontalAlign="Center" FilterItemStyle-VerticalAlign="middle"> 

 

 

<clientsettings EnablePostBackOnRowClick="true">

 

<ClientEvents />

 

 

<Selecting AllowRowSelect="True" ></Selecting> 

 

<Scrolling EnableVirtualScrollPaging="true" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="1"/>

 

</clientsettings 

 

 

<mastertableview borderstyle="None" datakeynames="ClientID1">  

 

</mastertableview 

 

</telerik:RadGrid

 


 

Private Sub Test_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

 

Dim dt1 As DataTable = Dac.ExecuteDataTable("usp_rr_admin_pc_getClients", Nothing)

 

 

 

Dim objDT = dt1

 

 

 

 

 

If RadGrid1.Columns.Count > 0 Then

 

 

RadGrid1.Columns.Clear()

 

End If

 

 

objDT.Columns.Add(

"ClientNameAR1", GetType(String))

 

 

 

Dim ogridcolumn As GridBoundColumn

 

 

ogridcolumn =

New GridBoundColumn

 

 

 ogridcolumn.Visible =

True

 

 

 

ogridcolumn.HeaderText = "ClientNameAR"

 

 

 

ogridcolumn.DataField = "ClientNameAR"

 

 

 

ogridcolumn.HeaderStyle.Width = "70"

 

 

 

ogridcolumn.ItemStyle.Width = "70"

 

 

 

ogridcolumn.ItemStyle.BorderColor = Drawing.Color.Black

 

RadGrid1.Columns.Add(ogridcolumn)

 

objDT.Columns.Add(

"ClientID1", GetType(String))

 

 

ogridcolumn =

New GridBoundColumn

 

 

ogridcolumn.HeaderText =

"ClientID"

 

 

 

ogridcolumn.DataField = "ClientID"

 

 

 

ogridcolumn.Visible = True

 

 

 

ogridcolumn.ItemStyle.BorderColor = Drawing.Color.Black

 

RadGrid1.Columns.Add(ogridcolumn)

 

Dim dt3 As DataTable = Dac.ExecuteDataTable("usp_rr_admin_pc_getCategories", Nothing)

 

 

 

For Each drRow As DataRow In dt3.Rows

 

 

 

Dim val As String = drRow.Item("CategoryAR").ToString

 

objDT.Columns.Add(val)

ogridcolumn =

 

New GridBoundColumn

 

ogridcolumn.Visible =

 

True

 

 

ogridcolumn.DataField = val

ogridcolumn.HeaderText = val

ogridcolumn.UniqueName = val

ogridcolumn.HeaderStyle.Width =

"70"

 

 

ogridcolumn.ItemStyle.Width =

"70"

 

 

ogridcolumn.ItemStyle.BorderColor = Drawing.Color.Black

RadGrid1.Columns.Add(ogridcolumn)

 

Dim val1 As String = drRow.Item("CategoryID").ToString

 

objDT.Columns.Add(val1)

ogridcolumn =

 

New GridBoundColumn

 

ogridcolumn.Visible =

 

True

 

 

ogridcolumn.DataField = val1

ogridcolumn.HeaderText = val1

ogridcolumn.UniqueName = val1

ogridcolumn.ItemStyle.BorderColor = Drawing.Color.Black

RadGrid1.Columns.Add(ogridcolumn)

 

Next

 

 

ogridcolumn =

Nothing

 

 

 

Dim dt2 As DataTable = Dac.ExecuteDataTable("usp_rr_admin_pc_getClients", Nothing)

 

 

 

For Each dr As DataRow In dt2.Rows

 

objDR = objDT.NewRow

objDR(

 

"ClientID1") = dr("ClientID")

 

objDR(

 

"ClientNameAR1") = dr("ClientNameAR")

 

objDT.Rows.Add(objDR)

 

 

Next

 

 

dt2.Dispose()

dt2 =

Nothing

 

 

RadGrid1.DataSource = objDT

RadGrid1.DataBind()

objDT.Dispose()

objDT =

Nothing

 

 

RadGrid1.MasterTableView.Dir = GridTableTextDirection.RTL

 

End Sub

 

 


Shinu
Top achievements
Rank 2
 answered on 12 Apr 2010
1 answer
83 views
Hi, I've been using radwindow for a while and mostly happy with the product.
However, i got a compatibility issue now with silverlight in radwindow that IE loads fine and chrome doesn't.

Example url

click slideshow

in IE, it works everytime, firefox, works most of the time, and Chrome, it load blank page when I ctrl-F5 pressed, but works first time
Georgi Tunev
Telerik team
 answered on 12 Apr 2010
0 answers
50 views
At this moment I'm using the following configuration:

- vs2008
- ASP.NET 3.5
- Windows XP sp2
- IIS 5.1/6.0
- Deploying using   WebDeploymentProject
- Telerik

I'm deploying with no problem into :
- windows 2003 server
- IIS6.0

But I need to deploy the same app into this:
- Windows 2008 server standard
- IIS7

In the first attempt I use the same technique, but it doesnt work :(.  Saying I need to remove from each page the attribute autoeventwireup="true"

Can anybody help me to share the right technique for deploying a web site from an scenario like this?

Thanks everybody.




benitolopez_sistemas
Top achievements
Rank 1
 asked on 11 Apr 2010
3 answers
86 views
Hello
In an aspx project, I have two (very similar) pages that use a number of Telerik controls.
In both pages foreign chars like ó, é   (vowels with tilde) are directy types for example in labels, and some other places
However, in one of the pages these characters display ok, in the other page they display as square boxes.

I am not using resource files, and cannot find any significant differences in the encoding, neither in aspx or aspx.vb files. Both pages use the same master page.
I attach the screenshots (screenok, screenbad) and the respective code (codeok, codebad).

Of course if I use HTML encoding (&oacute; instead of ó) they show ok in every case, but it is a real pain...
What am I missing?

TIA
Oscar
Top achievements
Rank 1
 answered on 11 Apr 2010
6 answers
206 views

Grid simply messes up with Safari, nothing simular to what we see on IE8..

Have searched this site, but cannot find out if Teleriik support safari or not?
There ar enumerious posts on this forum, but does anyone have a definative reference to support for Safari, before submiting bugs..

Thanks
Ray..

Ray
Top achievements
Rank 1
 answered on 11 Apr 2010
1 answer
191 views
I have used Telerik products for years, including the combobox.  But I am having a problem I cannot figure out.

I have a combo box that is populated from an arraylist at page load...

===============================================================================
Page load event code to load combo box:

nopCommTopic.Items.Clear()

RCBI =

New RadComboBoxItem()

 

RCBI.Text =

"Select a topic..." & ",0"

 

RCBI.Value = 0

RCBI.Selected =

True

 

nopCommTopic.Items.Add(RCBI)

 

For Each Nop_Topic_Data In Nop_Topic_Arry

 

    RCBI =

New RadComboBoxItem()

 

    RCBI.Text = Nop_Topic_Data.Name &

", " & Nop_Topic_Data.TopicID.ToString

 

    RCBI.Value = Nop_Topic_Data.TopicID

    nopCommTopic.Items.Add(RCBI)

 

Next

 

 

 

 

 


===============================================================================



The page contains a button for execution after the user selects an item from the above combo box.  After the button is clicked, the code retrieves the selected value from the combo box and then continues processing.  The problem is that the selected value test (see code immediately below) always gets a 0 for the selectedvalue no matter which item in the combo box is selected.  It also does not matter how many different entries in the combo box that you select before pressing the processing button.

The .aspx page code for the combo is shown further below.  It's pretty simple.


===============================================================================
button click event code:

 

 

' Verify that the user did select a topic to translate and save it if they did

 

 

Dim iTopic As Integer = 0

 

 

If Me.nopCommTopic.SelectedValue = 0 Then

 

 

Me.PageErrors.Text = "You must select a topic to translate from the list!"

 

 

Exit Sub

 

 

End If

 

iTopic = nopCommTopic.SelectedValue
===============================================================================

===============================================================================
related code from .aspx page:

 

<

 

telerik:RadComboBox ID="nopCommTopic" Skin="NeoClassic" EnableEmbeddedSkins="false" runat="server"></telerik:RadComboBox>

 

 

<br />

 

 

<br />

 

 

<asp:Button ID="TranslateTopic" runat="server" Text="Translate Selected Topic" />

 

 

 

 

 

===============================================================================

Can you help me figure out what is wrong?

Thanks in advance!  I feel so stupid, but I cannot figure this out.  I must be missing something really basic!

Lynn

Lynn
Top achievements
Rank 2
 answered on 11 Apr 2010
0 answers
84 views
Here is what i want to say in better view
Input
http://i44.tinypic.com/35copol.jpg
output
http://i39.tinypic.com/15bl1l.jpg
anshul kumar
Top achievements
Rank 1
 asked on 11 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?