Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
62 views
Hi

I have a problem with method deleteSelectedItems()

I have a method in javascript

function RemoveItems() {
        var masterTable = $find("<%= gvArticlesEdit.ClientID %>");
        var selectedItems = masterTable.get_selectedItems();
        masterTable.deleteSelectedItems();
         
    }

var selectedItems is for testing to see how radGrid get selectedItems and it is working fine. But, this line:
masterTable.deleteSelectedItems(); 
delete all objects in radGrid...

If something help's , this is part of code for binding object in that grid, and that's work fine
var item = new Object();
  
        item.Name = name;
        item.Measure = unitMeasure;
        item.Items = items;
  
        allItems.push(item);
        var tableView = $find(gArticlesEditID).get_masterTableView();
        tableView.set_dataSource(allItems);
        tableView.dataBind();


Nikola
Top achievements
Rank 1
 asked on 16 Jan 2013
4 answers
147 views
I have a radlistview bound to a data source.

When the user edits or inserts an item, I make modifications dynamically to the edit/insertitemtemplate (hiding some options, making others read only) based upon other values contained on the web page.

I have been doing this in the ItemDataBound event, and it works great.

Unless the datasource contains no records.

In this case, the EmptyItemTemplate is displayed, and when I click Insert button I have placed on the template, the ItemDataBound event is never fired.

The InsertItemTemplate is displayed with default styles, etc.

What event and RadListViewItem object can I use to dynamically configure the insertitemtemplate dynamically when there are no records associated in the underlying data source?
Maria Ilieva
Telerik team
 answered on 16 Jan 2013
3 answers
150 views
I'm setting RadScheduler.TimeZoneID in Page_Load event and there's some strange behavior in scheduler when comes to date of DayLight Saving Time changing.(28.10.2012)  Any ideas what I'm doing wrong?
RadScheduler1.TimeZoneID = TimeZoneInfo.Local.Id;
Screenshot:

Plamen
Telerik team
 answered on 16 Jan 2013
10 answers
1.5K+ views
I have a grid that I need to have several custom aggregate columns for the footer as it need to calculate the Average Daily Rate by calculating the sum(revenue in each row) / sum(rooms in each row)  this calculation needs to be done on different columns in the same grid and shown in the footer.   As there is very little documentation on Footer custom aggregates any help or samples would be appreciated.
Marin
Telerik team
 answered on 16 Jan 2013
5 answers
1.0K+ views

am using RadAsyncUpload to upload flles to the server and want to check if file name exist on client side then javascript popup to confirm overwrite or change file name by adding +1 to the filename.

I tried to use these script on server side and also didn't goes well for me .


Protected Sub RadAsyncUpload1_FileUploaded(ByVal sender As Object, ByVal e As FileUploadedEventArgs)
       Dim targetFolder As String = "~/Files"
 
       Dim targetFileName As String = Path.Combine(Server.MapPath(targetFolder), e.File.GetName())
       If Not File.Exists(targetFileName) Then
           e.File.SaveAs(targetFileName)
           txtpath.Text = targetFileName
           ' Implement logic
       Else
 
 
           lbresult.Text = "failed to upload"
 
 
       End If
   End Sub




and also this code :

 
Private Sub RadAsyncUpload1_FileUploaded(ByVal sender As Object, ByVal e As FileUploadedEventArgs)
            Dim fullPath As String = Server.MapPath(Path.Combine(RadAsyncUpload1.TargetFolder, e.File.GetName()))
 
            If File.Exists(fullPath) Then
                e.IsValid = False
                e.File.SaveAs(Server.MapPath(Path.Combine(RadAsyncUpload1.TargetFolder, e.File.GetNameWithoutExtension() & "1" & e.File.GetExtension())))
 
            txtpath.Text = "http://www.xxxxx.org/Files/" & e.File.FileName
 
        End If
        End Sub

Peter Filipov
Telerik team
 answered on 16 Jan 2013
3 answers
171 views
Hello, Telerik
I have an RadComboBox:
<telerik:RadComboBox runat="server" IsEditable="True" Width="167px" style="margin-left: 23px;" ID="cbMails" EmptyMessage="Choose a mail text"  OnSelectedIndexChanged="cbMails_SelectedIndexChanged" CssClass="ComboTop" AutoPostBack="True" meta:resourcekey="cbMailsResource1"></telerik:RadComboBox>

And I have a button
 <asp:Button runat="server" ID="AddButton" Text="Add" CssClass="GreenContentButton"<br>                                    Width="60px" OnClick="AddButton_OnClick" meta:resourcekey="AddButtonResource1" />

On button press I add new item in RadComboBox on server side.
I want to be able to edit ComboBot item in it.
I used IsEditable mode set to True but it does not work.
In matter of fact it's not shown in intellitrace in regular Asp.Net.
As far as I understood, it's available with silverlight and wpf versions of control. And by the logic in must be available in here, am I right?

Please say I am)
Nencho
Telerik team
 answered on 16 Jan 2013
5 answers
168 views
Hi All,
I'm using radchart in my application in my asp.net application.
Im binding the serieses with lists<int> from code behind.
If the all the values of list are zero then line horizental plain line showing at the zero postion of y axis.
But In Y axis its showing the negattive values also like 0 -10 -20 .....
I want to show the only positive values starting from 0 to....
And how to increase the height and width of plot area.
Please see the attached pic.
Please help me as early as possible.
<telerik:RadChart ID="trndChrt" runat="server"  SeriesOrientation="Vertical" ChartTitle-Visible="false"
                   SkinsOverrideStyles="true" CreateImageMap="false" width="770px" Height="278px">
           <Series>
           <telerik:ChartSeries Type="Line" Name="PTT">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#000099">
                   </FillStyle>
                    <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
                       <EmptyValue Mode="Zero" Line-Color="Transparent">
                       </EmptyValue>
               </Appearance>
           </telerik:ChartSeries>   
           <telerik:ChartSeries Type="Line" Name="VOX" Appearance-LegendDisplayMode="SeriesName">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="Black">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="State Change">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#f85007">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="Active Dispatchers">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#cc00ff">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="Calls">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#339933">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
       </Series>
       <PlotArea Appearance-FillStyle-MainColor="White" XAxis-LayoutMode="Normal" XAxis-Appearance-MajorTick-Visible="false" YAxis-Appearance-MajorTick-Visible="false" YAxis-Appearance-MinorTick-Visible="false" EmptySeriesMessage-Appearance-Visible="false" Appearance-Border-Color="Black"  Appearance-FillStyle-FillType="Solid" DataTable-Appearance-CellWidth="200" EmptySeriesMessage-Visible="false" XAxis-Appearance-MajorGridLines-Color="#d2d2d2" XAxis-Appearance-MajorGridLines-PenStyle="Solid" XAxis-Appearance-MajorGridLines-Width="1">
       </PlotArea>
       <Legend Visible="false">
       </Legend>       
      </telerik:RadChart>
Yavor
Telerik team
 answered on 16 Jan 2013
1 answer
78 views
I have a datatable bound to a radgrid. On Add click of a button. I want to open the radgrid row that I just appended to the table.

Thanks
Thomas
Princy
Top achievements
Rank 2
 answered on 16 Jan 2013
2 answers
315 views
Hi,
We are using RadnumericTextbox to hold numeric value. We have formatText method on Onblur event to format the entered value.
On Form load, we have set  the RadnumericTextbox as readonly (since we do not want enabled=false). Onblur event was not triggering when textbox is readonly and did not show formated text as 0.00 (since textbox is empty) till we upgrade to telerik version 2012.2.912.40
After upgrade, RadnumericTextbox is triggering onblur event even if it is readonly.
Is there any way to check whether RadnumericTextbox is readonly or not in Javascript?
Since we have many RadnumericTextbox in the form we have used generic javascript method to format a text as below

 

 

function FormatText(sender, args) {

 

 

 

var num  = sender.get_value();

 

 

 

if (num == "" || num == "undefined") {

 

num = 0.00

}

 

 

var result = num.toFixed(2);

 

sender.set_value( result);

sender._textBoxElement.value = num.toFixed(2);

}


In this method, is it possible to check whether "Sender" is readonly or not to avoid formating?
Thanks
Vasil
Telerik team
 answered on 16 Jan 2013
1 answer
61 views
HI,

I would like to know if the below scenario is possible with radgrid. ( Looking for code samples).

1) In the radgrid, i need to have a button as "Add new Item", which creates a new row.
2) In the radgrid, while doing the insert operation, i do not want the tick mark(which is used for insert). However, the items should be saved on the click of a button (for example: Submit), available outside the grid.
3) In the radgrid, while doing the edit operation, user should be able to click on "pen icon" (which is used to edit). However, after editing the items, i do not want the user to click on the tick mark. However, the edited items should be updated on the click of a button (for example: Submit), available outside the grid.
4) Have a delete button on each row?

I want to reduce the number of clicks the user does on the operations of the grid. My page layout is: few textboxes, radgrid, submit button.

Thanks.


Shinu
Top achievements
Rank 2
 answered on 16 Jan 2013
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?