Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
224 views
I have ran into a problem that I cannot figure out.

I have 2 controls in a template column of a RadGrid.
An ASP textbox (tried also RadTextBox) and a RadNumericTextbox.

I am getting a Javascript error for NumberFormat.
Error : 'NumberFormat.AllowRounding' is null or not an object

I have tried declaring ALL properties but that does not seem to change the behavior. And I get the get the error sometimes on AllowRounding, DecimalSeperator and DecimalSeperator. I added the declaration to the NumberFormat for each exception that has occurred but that did not the issue.

I am using SelfReferencingHierachy based on the example of Self Referencing Hierarchy in the Demo's Section.

Here is my MasterTableView declaration
        <MasterTableView    
          HierarchyDefaultExpanded="True" HierarchyLoadMode="Client"   
          Width="100%" 
          EditMode="inline" DataKeyNames="Id,ParentId,Name" > 
          
          <SelfHierarchySettings ParentKeyName="ParentId" KeyName="Id"  /> 
          <Columns> 
              
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" ReadOnly="true">  
              <HeaderStyle Width="150px" /> 
            </telerik:GridBoundColumn> 
              
            <telerik:GridTemplateColumn UniqueName="Value" HeaderText="Value" DataField="Value">  
              <HeaderStyle Width="100px" /> 
              <ItemTemplate> 
                  
                  <asp:TextBox ID="stringValue" runat="Server" Visible="false" /> 
                  <telerik:RadNumericTextBox ID="intValue" runat="Server" Skin="RxLink" EnableEmbeddedSkins="false" Visible="false" SelectionOnFocus="SelectAll">  

                      <NumberFormat DecimalDigits="0" AllowRounding="false" KeepNotRoundedValue="true" DecimalSeparator="." />

 

  

 

                  </telerik:RadNumericTextBox> 
              </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            
          </Columns> 
        </MasterTableView> 
 

Here is the script that is getting the exception
NumberFormat.Round=function(_1,_2){  
if(!_2.NumberFormat.AllowRounding){  
return _1;  
}  
 

How can I fix or work-around this issue? Do you need more information?

Thanks,
Mark.
MarkInTexas
Top achievements
Rank 1
 answered on 01 Apr 2009
2 answers
138 views
Hi all,

The RadControls for ASPNET AJAX Q1 2008 Live Examples have suddenly stopped working on my laptop, running Vista and IIS 7.

I uninstalled them and then re-installed them, but that didn't seem to help.

When I run the Live Examples from the Visual Studio project (accessed off Start > All Programs > Telerik, I get the following error:

"Internet Explorer cannot display the webpage"

What gives? Do the Telerik products not work with Vista or IIS or Visual Studio 2008 ? I need to get to work, and instead here I am trying to get the Telerik controls to work.

Any ideas what's going on?

Thanks in advance,

Jason
Jason
Top achievements
Rank 1
 answered on 31 Mar 2009
5 answers
178 views
I have just installed the trial version of the RadControls for ASP.NET AJAX.  I have upgraded the sample solution (RadControlsExamples.sln) to VS 2008.  When I try to run it I get the following error:

Error 1 Could not load file or assembly 'System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos\Web.Config 71 

I see that there are several web.config files in the solution ... am I supposed to replace the web.config file that is there by default with the web.config.net35?

Any help that you can give would be appreciated.

Thanks.
Dan
François Martel
Top achievements
Rank 1
 answered on 31 Mar 2009
2 answers
530 views
Here's what I'm trying to do.

I am using a RadGrid to display some data and it is bound to a dataset so the columns are autogenerated but i want to set the column widths for each individual column.

I can set the width in headerStyle but it sets all the coumns to the same width but I have 2 columns that need to be very small (20 or 30 pixels) and a third column which contains some text which needs to take up about 70 or 80% of the table.

I have tried using the following code to access the columns, which should work as long as the columns exist

foreach (GridBoundColumn col in rGridNotes.MasterTableView.AutoGeneratedColumns)  
{  
    if (col.UniqueName == "Type")  
    {  
        col.HeaderStyle.Width = 20;  
    }  
} 

but I am using this in the NeedDataSource even which isn't suitable as the rebind isn't called until after this even exits.

I have looked through the events available for RadGrid and can't see one that is suitable for executing this code after the RadGrid is populated with the columns. I need something like OnMasterTableCreated.

Any suggestions would be greatly appreciated.
Paul Taylor
Top achievements
Rank 1
 answered on 31 Mar 2009
16 answers
382 views
Hi,

I am trying to add a DataFormatString to a GridCalculatedColumn in my Grid. I have a column Quantity
<telerik:GridNumericColumn SortExpression="Quantity" 
                    DataType="System.Decimal" HeaderText="Quantity" 
                    DataField="Quantity" UniqueName="Quantity" 
                    DataFormatString="{0:F3}" Visible="true">
             <ItemStyle HorizontalAlign="Right" />
</telerik:GridNumericColumn>

a column Unit_Price
<telerik:GridNumericColumn SortExpression="Unit_price" 
                     DataType="System.Decimal" HeaderText="Unit price"
                     DataField="Unit_price" UniqueName="Unit_price"
                     DataFormatString="{0:C}" Visible="true">
    <ItemStyle HorizontalAlign="Right" />
</telerik:GridNumericColumn>

and a column Total
<telerik:GridCalculatedColumn HeaderText="Total" UniqueName="Total" 
                     DataType="System.Double"
                     DataFields="Quantity, Unit_price" Expression="{0}*{1}"
                     DataFormatString="{0:C}">
    <ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
</telerik:GridCalculatedColumn>

When i run the project i have the following result::
Item    Quantity      Unit price                   total
1            7.000          17.95 $  125,65000000
2          11.000            5.00 $    55.00000000

Is it possible to have this instead:
Item     Quantity      Unit price            Total
1             7.000          17.95 $      125,65 $
2            11.000           5.00 $        55.00 $

Thanks
Myriam
Top achievements
Rank 1
 answered on 31 Mar 2009
3 answers
286 views
Hello,

I need to use a tooltip for a concrete part of a grid. Concretely, I have a GridClientSelectColumn and I want to show the tooltip when a mouse is over the header. I could use HeaderToolTip but I want to apply a skin. Let´s see it with this code sniplet:

<MasterTableView...>
      <Columns>
              <telerik:GridClientSelectColumn ...>
                    <HeaderStyle Width="25px" />
              </telerik:GridClientSelectColumn>

The header is a checkbox and when is checked all the rows are selected. The tooltip must be shown when a mouse is over this checkbox. How can I make a relation if I can´t use an ID  for gridclientselectcolumn and thus aTargetControlID? do I have to do it in code behind?

Thank you in advance.
Arif
Top achievements
Rank 1
 answered on 31 Mar 2009
7 answers
235 views

I'm trying to add RadUpload control into Usercontrol edit form in RadGrid. When I do that I dont' see Select button and text box. I only see Add & Delete buttons. Secondly, I'm trying to do FormDecoration in Usercontrol edit form for RadGrid and for some reason it is not working. Meaning, checkbox'es would not appear. But, If I remove Decoration then they would appear. Any help is greatly appreciated.

aung maw
Top achievements
Rank 1
 answered on 31 Mar 2009
2 answers
201 views
I am using the radupload and when the i click on the select button nothing happens, no dialog window pops open like in the examples.   i dont know what i am doing wrong

<telerik:RadUpload ID="RadUpload1" runat="server" MaxFileSize="4100"
                Skin="WebBlue" TargetFolder="~/Upload"
                onfileexists="RadUpload1_FileExists"
                onvalidatingfile="RadUpload1_ValidatingFile">
            </telerik:RadUpload>

everything else in the control works.



ivacacela
Top achievements
Rank 2
 answered on 31 Mar 2009
2 answers
1.4K+ views
I have a column in my grid which holds a tonnage amount.  I wanted to trim the trailing zero's and so I used the following syntax for the column:

<telerik:GridBoundColumn 
    DataField="Tonnage_Ordered" 
    UniqueName="Tonnage_Ordered" 
    DataType="System.Decimal" 
    DataFormatString="{0:G29}" 
    HeaderText="Tonnage" />

When the page is initially loaded the formating works.  I am setting the datasource server side.  When I try to refresh the grid by client side data binding I get the following error message:

Microsoft JScript runtime error: Sys.FormatException: Format specifier was invalid.

Should I be using a different DataStringFormat or will Telerik be fixing this?

Regards,
Cynthia
Cynthia
Top achievements
Rank 1
 answered on 31 Mar 2009
7 answers
186 views
Hi

I'm using the FormDecorator inside the grid.
Everything seems to work fine, Firefox renders the boxes as it should (maximum with) but unsing Internet Explorer the width of the textboxes are dynamically adjusted to the content. This means textboxes with no content (empty form for adding a new record) are only about a few pixels in width which makes it almost impossible to use the form.

I adjusted the width of the textboxes using:

style="width: 100%;" 

but that doesn't do the trick.

Best Regards,
Andreas
Bruce Hochstetler
Top achievements
Rank 2
 answered on 31 Mar 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?