Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
219 views
I have this line of code in a radGrid template:
<asp:TextBox ID="TextBox12" runat="server" Text='<%# Bind( "valuePCS" ) %>'></asp:TextBox>
and it is working fine.

My problem is that I would like to show the format "€" but if I add the formatting like this:
<asp:TextBox ID="TextBox12" runat="server" Text='<%# Bind( "valuePCS", "{0:C0}" ) %>'></asp:TextBox>

on the first insert of the new record the formatting is not shown yet then the record is saved without problems;
if I open again the record, this time the formatting is visible and if I update the record it gives an error on the input string formatting.

Error:
[FormatException: Formato della stringa di input non corretto.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10896279
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145
   System.String.System.IConvertible.ToInt32(IFormatProvider provider) +46
   System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +297
   System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +126
   System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63
   System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +535
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +324
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +87
   Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +430
   Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +2063
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +205
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +372
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +252
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

How do I solve this problem?
Thanks,
Felice
Felice
Top achievements
Rank 1
 answered on 28 Mar 2014
4 answers
143 views
Hello,

I am trying to use the asyncupload control within a DNN (Dotnetnuke) module.

The control basically works but the control causes all the other controls on the page to refresh when the postback fires.

I've wrapped the asyncupload control in an ajaxpanel. It uploads the file fine and calls the 'onfileupload'  event with a parameter successfully. I use this event to copy the uploaded to a destination based on the parameter.

I can supply code snippets to give more detail, but am unable to paste into this thread.

But how can I stop it from loading all the other controls on the page?

I'd be very grateful for any helpful suggestions.

Best Regards,

Steve
Stephen
Top achievements
Rank 1
 answered on 28 Mar 2014
3 answers
174 views
According to the given screen shot i have added a Skill as a Resource Type for rad scheduler. but i need to display some additional columns such as employee name who has the skills and i know it is possible to display multiple content within a single resource. the requirement is to display multiple content in multiple columns. below code explain how i have achieved the result in screen shot.

                RadScheduler1.GroupBy = "EmployeeInfo";
                RadScheduler1.GroupingDirection = GroupingDirection.Vertical;
                RadScheduler1.SelectedDate =new DateTime( DateTime.Now.Year,DateTime.Now.Month,1);
                RadScheduler1.TimelineView.NumberOfSlots = DateTime.DaysInMonth(RadScheduler1.SelectedDate.Year, RadScheduler1.SelectedDate.Month); 


                RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
                ResourceType rt = new ResourceType("EmployeeInfo");
                rt.DataSource = Employees;
                rt.KeyField = "EmployeeNo";
                rt.ForeignKeyField = "EmployeeNo";
                rt.TextField = "Skill";
                rt.Name = "EmployeeInfo";
                
                RadScheduler1.ResourceTypes.Add(rt);                                                                                                                                                                                                        is there any  possibility  to display multiple columns or group by multiple resource types?                                                                                                                                      my second resource type is given below                                                                                                                                                                                                                                       ResourceType rt1 = new ResourceType("FirstName");
                rt1.DataSource = Employees;
                rt1.KeyField = "EmployeeNo";
                rt1.ForeignKeyField = "EmployeeNo";
                rt1.TextField = "FirstName";
                rt1.Name = "FirstName";
                
                RadScheduler1.ResourceTypes.Add(rt1);                                                                                                                                                                                                      if i set                                                                                                                                                                                                                                                                                                    RadScheduler1.GroupBy = "EmployeeInfo,FirstName";  it only display the first resource type in the resource type





Boyan Dimitrov
Telerik team
 answered on 28 Mar 2014
6 answers
254 views
i want columns of my radgrid should resize, and for this i have used AllowColumnResize property, but im getting error on rezise, and the error is  'this.HeaderRow.Cells[...].scrollWidth' is null or not an object.
The code is gien below:-

<

telerik:RadGrid ID="rdgCustomers" AllowMultiRowSelection="false" runat="server"

 

 

Skin="Outlook" Width="100%" PageSize="10" BorderStyle="None" AllowPaging="True"

 

 

AutoGenerateColumns="true" ItemStyle-Wrap="false" GridLines="None" OnItemCreated="rdgCustomers_ItemCreated"

 

 

OnItemCommand="rdgCustomers_ItemCommand">

 

 

<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="true">

 

 

<ClientEvents OnRowDblClick="OpenCustomer"/>

 

 

<Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="true"

 

 

AllowColumnResize="True"></Resizing>

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="True" />

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<MasterTableView CommandItemDisplay="None" TableLayout="Fixed" ClientDataKeyNames="ID"

 

 

ItemStyle-Wrap="false" AutoGenerateColumns="true" DataKeyNames="ID" Width="100%">

 

 

<PagerStyle Wrap="false" Mode="NextPrevAndNumeric" PrevPageImageUrl="Images/arrowLeft.gif"

 

 

NextPageImageUrl="Images/arrowRight.gif" NextPageText="Next" PrevPageText="Prev"

 

 

AlwaysVisible="true" />

 

 

<Columns>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 


Pavlina
Telerik team
 answered on 28 Mar 2014
1 answer
78 views
We are having a tough time when the menu is used with IFRAME. The menu is in the parent and the screens to show the data are in the IFRAME. The menu does not auto close. Without the IFRAME it works well. Has anyone come across this and resolved ?? We could use some direction on this issue.
Dimitar
Telerik team
 answered on 28 Mar 2014
1 answer
104 views
Hi,

I have an issue when exporting the scheduler to PDF where on the resulting PDF the scheduler is 'squashed' to the left hand side and does not fill the page (please see attached image to see what I mean).

This only seems to occur if the width of the scheduler is set to '100%', i.e.
                            <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Windows7" Height="530px"
                                Width="100%"  ShowAllDayRow="True" EnableDescriptionField="True"
                                EnableEmbeddedSkins="True" DataEndField="EndTime" DataKeyField="AppointmentID"
                                DataStartField="StartTime" DataSubjectField="AppTitle">
                            </telerik:RadScheduler>

If I change the width to a fixed size the resulting PDF from the export looks fine.  I am using Telerik UI for ASP.NET AJAX Q1 2014.

Any help would be appreciated.
Aneliya Petkova
Telerik team
 answered on 28 Mar 2014
1 answer
248 views
Hi,
I was checking Telerik UI for ASP.NET AJAX Q1 2014 trial version for feasibility.

I was testing RadGrid with my existing code but its behavior is strange compared to MS GridView with Simple-Databinding.

In my existing code, i am not assigning datasource and not binding grid on particular condition.
MS GridWorks keeps data as it is but RadGrid clears data.
I checked that with e.Canceled = True it preserves state.

the issue occurs when  if at the time of data fetching any error occurs. it clears previous data. in MS grid it keeps data from viewstate.

Grid should clear data only when .DataBind() or Rebind() called.
 
Is there any property or method to make its behavior equivalent.?

Please find sample code at https://mega.co.nz/#!YYtFCK5Q!PV5XczgbAeyLApV8UtO72O9BBbY6jKl2TJ984703eEo
Viktor Tachev
Telerik team
 answered on 28 Mar 2014
9 answers
90 views
Hi,

The PivotGrid is a great component but I'm confused how I gain a little more control over the display.

We'd like to be able to have specific rows (and maybe columns) collapsed when the component first loads.
I've found ways to collapse everything but not by ID.

Is this possible?

Cheers

Gordon


Maria Ilieva
Telerik team
 answered on 28 Mar 2014
2 answers
260 views
I have an application that will exist on one iis server but I want it to display files from a shared drive on a separate server.  The other issue is I only want to display subfolder based on the user and what the users has selected to view. They will be read only for the directory

​string jobId = Request.QueryString["jobId"];
string path = @"\\servernamel\FileManager\" + jobId + @"\subfolder\";
string[] folder = { path };
RadFileExplorer1.Configuration.ViewPaths = folder;
RadFileExplorer1.Configuration.SearchPatterns = new[] { "*.*" };
RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;

I have followed the link
http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/details/use-radfileexplorer-with-physical-and-shared-folder-s-paths

but I have had no success in displaying the files in the shared folder.

I am assuming I have to change the MappingFile.mapping to
<?xml version="1.0" encoding="utf-8" ?>
<CustomFileBrowserProvider>
<Paths>
<genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
</Paths>
<Mappings>
<Mapping>
<PhysicalPath>
<![CDATA[\\servername\FileManager\"]]>
</PhysicalPath>
<VirtualPath><![CDATA[MyCusomRootDir/]]></VirtualPath>
</Mapping>
</Mappings>
</CustomFileBrowserProvider>


Vessy
Telerik team
 answered on 28 Mar 2014
4 answers
48 views
Hello,

I am using a grid which includes two radDatePicker in the row. The grid displays 25 items per page. I am using a shared calendar but it seems that the script is taking too long in IE8.

Could you tell me what would be the best way to improve the performance of my grid?

Here it is:

<telerik:RadGrid ID="radGrid" runat="server"
    OnNeedDataSource="NeedDataSource" 
    OnItemDataBound="ItemDataBound" 
    OnUpdateCommand="UpdateCommand" 
    OnItemCreated="ItemCreated"
    OnItemCommand="ItemCommand" 
    AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" AllowMultiRowSelection="false" 
    PagerStyle-Mode="NumericPages" PagerStyle-AlwaysVisible="true" ShowFooter="true" PageSize="10"
    MasterTableView-NoMasterRecordsText="No Records found.">
    
    <ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="false">
        <Selecting AllowRowSelect="true" />
        <Resizing AllowColumnResize="false" EnableRealTimeResize="false" />
    </ClientSettings>
    
    <MasterTableView ShowHeadersWhenNoRecords="true" TableLayout="fixed" 
        EditMode="EditForms" Width="100%" CommandItemDisplay="Top">
        
        <EditFormSettings EditFormType="WebUserControl" UserControlName="/UserControl/Grid/Edit.ascx">
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
        </EditFormSettings>
        
        <CommandItemTemplate>
            <table style="width:100%">
                <tr>
                    <td style="width:100%; text-align:right;">
                        <asp:LinkButton ID="lbRefresh" runat="server" CommandName="Refresh">
                            <img style="border:0px; padding-right:5px;" alt="" src="/RadControls/Skin/Grid/Refresh.gif" />Refresh
                        </asp:LinkButton>
                    </td>
                </tr>
            </table>
        </CommandItemTemplate>

        <Columns>
            <telerik:GridBoundColumn UniqueName="Col1" DataField="Col1" HeaderTooltip="Col1"
                ItemStyle-HorizontalAlign="Left" SortExpression="Col1" 
                HeaderText="Col1" HeaderStyle-Width="6%">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Col2" DataField="Col2" AllowSorting="false" HeaderTooltip="Col2"
                HeaderText="Col2" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn UniqueName="Col3" HeaderTooltip="Col3"
                HeaderText="Col3" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn UniqueName="Col4" DataField="Col4" HeaderTooltip="Col4"
                ItemStyle-HorizontalAlign="Left" SortExpression="Col4" 
                HeaderText="Col4" HeaderStyle-Width="10%">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="Col5" DataField="Col5" HeaderTooltip="Col5"
                ItemStyle-HorizontalAlign="Left" SortExpression="Col5" 
                HeaderText="Col5" HeaderStyle-Width="4%">
                <ItemTemplate>
                     <a target="_blank" href='<%# myFunction(Eval("Col5").ToString())%>'></a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="Col6" DataField="Col6" HeaderTooltip="Col6" 
                ItemStyle-HorizontalAlign="Left" SortExpression="Col6" 
                HeaderText="Col6" HeaderStyle-Width="15%">
            </telerik:GridBoundColumn>

            <telerik:GridTemplateColumn UniqueName="Col7" HeaderTooltip="Col7" DataField="Col7"
                ItemStyle-HorizontalAlign="Left" SortExpression="Col7" 
                HeaderText="Col7" HeaderStyle-Width="13%">
                <ItemTemplate>
                    <telerik:RadDatePicker id="rpd1" Runat="server"  OnSelectedDateChanged="dateChanged" ShowPopupOnFocus="false" SharedCalendarID="sharedCalendar"
                        Width="98px" AutoPostBack="true" ZIndex="0" Calendar-EnableMonthYearFastNavigation="false">
                        <DateInput ReadOnly="true" ToolTip="Click on the calendar to set up a new date" ></DateInput>
                    </telerik:RadDatePicker>
                    <asp:Label id="lb1" runat="server"></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

            <telerik:GridTemplateColumn UniqueName="Col8" HeaderTooltip="Col8" DataField="Col8"
                ItemStyle-HorizontalAlign="Left" SortExpression="Col8" 
                HeaderText="Maturity Col8" HeaderStyle-Width="13%">
                <ItemTemplate>
                    <telerik:RadDatePicker id="rdp2" Runat="server"  OnSelectedDateChanged="dateChanged" ShowPopupOnFocus="false" SharedCalendarID="sharedCalendar"
                        Width="98px" AutoPostBack="true" ZIndex="0" Calendar-EnableMonthYearFastNavigation="false">
                        <DateInput ReadOnly="true" ToolTip="Click on the calendar to set up a new date" ></DateInput>
                    </telerik:RadDatePicker>
                    <asp:Label id="lb2" runat="server"></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
         
        </Columns>
        
       <PagerTemplate>
        </PagerTemplate>

    </MasterTableView>
    
</telerik:RadGrid>












Greg
Top achievements
Rank 1
 answered on 28 Mar 2014
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?