Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
235 views
Hi All,

From a client-side javascript I calc some values and update 

RadDateInput controls from javascript: Like the example:

 

var _oSpeed = Sys.Application.findComponent('FormView1_RNTBSpeedAverage');  
var _KMTotal = parseFloat(_oKMTotal.get_value());  
var _Speed = parseFloat("0");  
 
if (_KMTotal != 0 && _Hour != 0) {  
    _Speed = (_KMTotal / _Hour);  
}  
 
_oSpeed.set_value(_Speed);   
 
 
 

 

On the website the new value is set correctly to the control (during the cliet-site javascript) but if I update/insert the record to the database (I use objectdatasources) the autmatic seted values from the controls aren't save to the database.

Any Idea why? Is there a function to update the controls after I set the set_value() function or somethign else?

Thanks a lot
Regards
Christian

Georgi Krustev
Telerik team
 answered on 29 May 2009
2 answers
121 views
I'm struggling how to implement this with the latest version of the RadEditor.

I tried this KB article but I believe this might be for the old version of the controls as when it gets to AttachEventHandler it says that method is not implemented
http://www.telerik.com/help/aspnet/editor/includingsymbolcounterandlimitthetextlength.html

I've also tried just implementing a asp:customvalidator and using javascript to get the innerText.trim().count - but it appears that is always inflated do to the inclusion of  "DesignHTMLPreview   " and some other charecters at the end.

What's the best way to do this with the lastest version and why isn't this functionality baked in?




Jeremy Coenen
Top achievements
Rank 1
 answered on 29 May 2009
2 answers
159 views
Although my thread's current culture and current UI culture is set to "cs-CZ", the built-in sorting is not sorting "H" before "C" as expected.  I have not been able to locate an example that shows how to make the grid honor the current culture's sorting like a DataView would.

Has someone accomplished this with the Q3 2008 Ajax release?

Thanks,
Chris
Chris
Top achievements
Rank 1
 answered on 29 May 2009
1 answer
116 views
I recently upgraded my controls to the current version, and I'm now seeing a very strange behavior - a missing vertical scroll bar on the page that contains the webpart. The ascx control for the web part is pretty straight forward - a tabstrip with two pageviews, the first containing a treeview and the Editor for Sharepoint, and the second containing a RadGrid. Going through some process of elmination, I've determined that it's the Grid causing the problem - if I comment it out or attempt to load on demand, the scroll bar appears fine. However, in all instances where the Grid loads on Page Load, the scroll bar is missing. Any suggested fixes to get this back to normal functionality? Thank you.
Georgi Krustev
Telerik team
 answered on 29 May 2009
3 answers
182 views
Hi all,

I'm using custom resources to represent the venues for each appointment. I'm using a custom SchedulerProvider class inherited from DbSchedulerProviderBase. It's all working fine: when a user creates an appointment they are offered a choice of venue resources, and when I set the RadScheduler's GroupBy property to "Venue", the appointments are being grouped correctly by venue. My question is as follows:

Is it possible to show only a subset of a resource when grouping, but continue to offer the user the full resource set when creating an appointment? For example, I may have 20 venue resources, but I don't want to show them all in the main RadScheduler view: I want to use my own UI controls to allow the user to select which venue resources they want to group by. However, when the same user is creating an appointment, they will need access to the full range of venues. As far as I can see, in both situations the RadScheduler will be calling the same GetResourcesByType("Venue") function, so I'm not sure how to return a different set of resources in each case.

One idea I've had would be to create an additional, dummy resource type (e.g. "GroupingVenue") just for the purposes of grouping, then I could modify my code in GetResourcesByType("GroupingVenue") such that it return only those venues selected by the user in my UI.

If anyone can think of a more elegant way of achieving this functionality, I'd be pleased to hear from you.

Kind regards,
Adrian
Adrian Stovold
Top achievements
Rank 1
 answered on 29 May 2009
1 answer
418 views
Hi all,

when we're binding a Collection of a Business Object into the Grid, the grid.DataItem should be that type, right?

I'm getting null :(

Code:

List<DocumentRow> rows = new List<DocumentRow>(); 
...  
while (reader.Read()) 
{ 
   DocumentRow row = DocumentRow.GetFromIdxDocumentId(int.Parse(reader[0].ToString())); 
   rows.Add(row);    
} 
... 
gvDocs.DataSource = rows; 
gvDocs.DataBind(); 

when trying to get the selected items...

foreach (GridItem gvr in gvDocs.SelectedItems) 
{ 
   DocumentRow row = (DocumentRow)gvr.DataItem; 
   list.Add(row.DocumentId); 
} 

gvr.DataItem is always null! :-(

how do I get the data back?






Georgi Krustev
Telerik team
 answered on 29 May 2009
3 answers
191 views
Hi,

I just downloaded the 525 build and these are a couple of bugs which are not yet resolved. They have been existing in the 402 build as well.

(1) click on a rad editor field, the focus event fires, paste some content into it, the focus event fires again, there is no blur event fired in between these 2 focus events. this was discovered in the following scenario: store the value of the editor in the onfocus event handler, compare it to the value of the editor in the onblur event handler. If the value has changed, call a method that fires a postback. The method does not get called when one sets focus to the editor, pastes content and exits it without any further editing.

(2) Related to the first one, click on an editor field, paste some text, then key in a few characters, exit the field, in the onblur, compare the value, postback to the server using RadAjaxManager, wait for the radloading panel to clear off, do not click on any other field, click back again it throws up a "htmlfile: unspecified error", the javascript line is "var _2f=_2e.getClientRects();".

Would these be addressed in any fix soon?

Derick
Tervel
Telerik team
 answered on 29 May 2009
1 answer
172 views
I'm not sure whats going on cause i'm getting my rows displayed on the grid but with I can ExportToExcel nothing is showing up. I am currently not using paging. I know I got this to work a few years back (non ajax ver)

    public partial class JobSearchbyPart : System.Web.UI.UserControl  
    {  
        [DefaultValue("")]  
        public string PartNumber  
        {  
            get 
            {  
                object partNumber = ViewState["PartNumber"];  
                if (partNumber != null)  
                    return (string)partNumber;  
                else 
                    return String.Empty;  
            }  
            set 
            {  
                ViewState["PartNumber"] = value;  
            }  
        }  
          
        protected void Page_Load(object sender, EventArgs e)  
        {  
              
        }  
 
        protected void txtPartNumber_TextChanged(object sender, EventArgs e)  
        {  
            PartNumber = txtPartNumber.Text;  
            gvJob.DataBind();  
        }  
 
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)  
        {  
            gvJob.MasterTableView.ExportToExcel();  
        }  
           
    } 


HTML:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JobSearchbyPart.ascx.cs" 
    Inherits="VantageShowOff.UserControls.JobSearchbyPart" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<div id="JobsbyPart">  
    <fieldset> 
        <legend>Job Search by Part</legend> 
        <div id="JobsbyPartHeader">  
            <label for="txtPartNumber">  
                Part:</label> 
            <asp:TextBox ID="txtPartNumber" runat="server" OnTextChanged="txtPartNumber_TextChanged"></asp:TextBox> 
            <br /> 
            <asp:ImageButton ID="ImageButton1" runat="server" OnClick="ImageButton1_Click" /> 
            <br /> 
        </div> 
        <div id="JobsbyPartData">  
            <telerik:RadGrid ID="gvJob" runat="server" GridLines="None" DataSourceID="dsJobs">  
                <ExportSettings ExportOnlyData="True" OpenInNewWindow="True">  
                    <Excel Format="ExcelML" /> 
                </ExportSettings> 
                <MasterTableView AutoGenerateColumns="False" DataSourceID="dsJobs">  
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="PartNumber" HeaderText="PartNumber" SortExpression="PartNumber" 
                            UniqueName="PartNumber">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="JobNumber" HeaderText="JobNumber" SortExpression="JobNumber" 
                            UniqueName="JobNumber">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" 
                            UniqueName="Description">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="RevisionNumber" HeaderText="RevisionNumber" SortExpression="RevisionNumber" 
                            UniqueName="RevisionNumber">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="SequenceNumber" HeaderText="SequenceNumber" SortExpression="SequenceNumber" 
                            UniqueName="SequenceNumber">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="StartDate" DataType="System.DateTime" HeaderText="StartDate" 
                            SortExpression="StartDate" UniqueName="StartDate">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="DueDate" DataType="System.DateTime" HeaderText="DueDate" 
                            SortExpression="DueDate" UniqueName="DueDate">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridCheckBoxColumn DataField="Completed" DataType="System.Boolean" HeaderText="Completed" 
                            SortExpression="Completed" UniqueName="Completed">  
                        </telerik:GridCheckBoxColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 
            <asp:ObjectDataSource ID="dsJobs" runat="server" SelectMethod="getJobsbyPart" TypeName="DataServices.Models.jobasmbl">  
                <SelectParameters> 
                    <asp:ControlParameter ControlID="txtPartNumber" Name="partNumber" PropertyName="Text" 
                        Type="String" /> 
                </SelectParameters> 
            </asp:ObjectDataSource> 
        </div> 
    </fieldset> 
</div> 
Eddie
Top achievements
Rank 1
 answered on 29 May 2009
6 answers
204 views
How can I in a RadWindow read the content of a textflield from the parentwindow?

thanks

Christian
Caroline
Top achievements
Rank 1
 answered on 29 May 2009
7 answers
139 views
<PagerStyle Mode="NextPrevAndNumeric" NextPageImageUrl="../../Images/Icons/addSmall.png"   PagerTextFormat="Change page: {4} | Displaying page {0} of {1}, questions {2} to {3} of {5}" > 
                </PagerStyle> 



table.PagerStyle.NextPageImageUrl = "Images/Icons/arrow_left.png"; 

Theses are the two method i have tried to set the image of the next and previous button of the radgrid but it always shows up as a regular button. I read on this forum to set Theming to false  but that did not work either.

What am I doing wrong? I am using a costum skin.

akeem
Top achievements
Rank 1
 answered on 29 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?