Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
219 views
Hello !!

I have a problem with .LoadRtfContent of RadEditor with a rtf string. I lost my typographic quote(’ and ‘) and the double(“ and ”). But in a RichTextBox of Winform, I don't lost my quote.

Here is my string of rtf.

Dim rtfString As String = "{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl" & _
"{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}" &
"{\f2\froman\fprq2 Times New Roman;}}" & _
"{\colortbl\red0\green0\blue0;\red255\green0\blue0;}" & _
"\deflang1033\horzdoc{\*\fchars }{\*\lchars }" & _
"\pard\plain\f2\fs24 Test  LeftDoubleQuote=\ldblquote    RightDoubleQuote=\rdblquote    Test single quote LeftQuote=\lquote and RightQuote=\rquote \par }"

RadEditor1.LoadRtfContent(rtfString)

Thank's a lot for a response !!
Dobromir
Telerik team
 answered on 05 Oct 2011
4 answers
78 views
Hello,
I have a screen with the date picker. User will select a date.
Under button click another page will be shown in popup. This page will have calender. In its page load I am preselecting the date which the user has already selected in the main screen. User shouldn't be able to unselect that preselected date.
I used the following code disable the selection

// if you are using the skin bundled as a webresource("Default"), the Skin property returns empty string
                string calendarSkin = RadCalendar1.Skin != "" ? RadCalendar1.Skin : "Default";
                string otherMonthCssClass = String.Format("otherMonth_{0}", calendarSkin);
                // disable the selection for the specific day
                RadCalendarDay calendarDay = new RadCalendarDay();
                calendarDay.Date = transactionDate; //the date which has to be preselected
                calendarDay.IsSelectable = false;
                calendarDay.ItemStyle.CssClass = otherMonthCssClass;
                RadCalendar1.SpecialDays.Add(calendarDay);

                //Pre select the transaction date selected in the entry screen
                RadCalendar1.SelectedDates.Add(new RadDate(transactionDate));

The probelm here is
After page load, the transactionDate is preselected which is fine. If I change the month, select different dates and come back to the month having preselected date, then I see that it is not preselected. Its selection is still disabled but it is not highlighted.

If I put just this code   
                        RadCalendar1.SelectedDates.Add(new RadDate(transactionDate));
and remove the code where the date is disabled,  then everything works fine.

Any help would be appreciated,
Thanks,
AV

Pams
Top achievements
Rank 1
 answered on 05 Oct 2011
2 answers
83 views
I have searched these forums and haven't found a solution or mention of this yet, but if it's out there, feel free to point me in that direction.

Using Telerik.Web.UI, v.2011.2.915.40, .NET 4, and ASP.NET/C#, in Visual Studio 2010.

I have a RadDateInput and would like to use the MMM yyyy date format, and use mouse keys to change the date.  This is the way the RadDateInput is configured:
<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy">
    <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" />
</telerik:RadDateInput>

However, on dates such as Sept. 30, 2011 when the day number (30th) is greater than the days in another month (for example, February 2011 only goes up to 28 days) then you can't use the mouse keys to change to or past that month.  I have tried using the server side OnTextChanged for the RadDateInput to manually set the day to the 1st of the month at that time, but that didn't work.  Setting an initial value in the RadDateInput using the current date and changing the day to the 1st also did not work for me.  I've also tried using javascript on the client OnValueChanging event to re-enter the value with the day of 01, but that didn't work either.  The javascript solution I tried:
function changeDate(sender, args) {
    var tbVal = sender.get_textBoxValue();
    if (!(document.getElementById('<%= hdnDate.ClientID %>').value == tbVal)) {
        var month = tbVal.substr(0, 3);
        var year = tbVal.substr(4, 4);
        var newDate = new Date(Date.parse(month + " 01, " + year));
        document.getElementById('<%= hdnDate.ClientID %>').value = month + " " + year;
        window.setTimeout(function () { sender.set_selectedDate(newDate); }, 1);
    }
}
<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy">
     <ClientEvents OnValueChanging="changeDate" />
     <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" />
</telerik:RadDateInput>
<input runat="server" type="hidden" value="" id="hdnDate" />

Is there something I'm missing? or is this an issue with the RadDateInput control itself?
Chris
Top achievements
Rank 1
 answered on 05 Oct 2011
1 answer
143 views
Hello

I'm trying to place a RadMenu inside of a RadTab, and position the menu such that the menu would display below the tab and the top level menu item would be beside the tab text. However, I'm not having much luck doing so. I'm using following code snippet

<head runat="server">
    <title></title>
    <style type="text/css">
        div.RadMenu a.rmLink .rmLeftImage
        {
            position: relative;
        }
         
        div.RadMenu .rmItem .rmLink .rmLeftImage, div.RadMenu .rmItem .rmLink, div.RadMenu .rmLink .rmText
        {
            margin: 0;
            padding: 0;
        }
        .RadTabStrip .rtsLevel, .RadTabStrip .rtsUL, .RadTabStrip .rtsLI
        {
            float: left !important;
            overflow: visible !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadTabStrip ID="RadTabStrip" runat="server" Skin="WebBlue">
            <Tabs>
                <telerik:RadTab Text="Test 1" Selected="true" />
                <telerik:RadTab Text="Test 2" />
                <telerik:RadTab Text="Test 3" />
                <telerik:RadTab Text="Test 4">
                    <TabTemplate>
                        Test 4
                        <telerik:RadMenu ID="RadMenu" runat="server" Skin="" EnableImagePreloading="true"
                            DefaultGroupSettings-OffsetY="-1">
                            <Items>
                                <telerik:RadMenuItem ImageUrl="~/Images/downarrow.png">
                                    <Items>
                                        <telerik:RadMenuItem Text="Menu Item 1" />
                                        <telerik:RadMenuItem Text="Menu Item 2" />
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </TabTemplate>
                </telerik:RadTab>
                <telerik:RadTab Text="Test 5" />
                <telerik:RadTab Text="Test 6" />
                <telerik:RadTab Text="Test 7" />
                <telerik:RadTab Text="Test 8" />
            </Tabs>
        </telerik:RadTabStrip>
     
    </div>
    </form>
</body>
</html>

However, the menu is under the button text and not beside it. Is there any way to achieve this ?
Betty
Top achievements
Rank 1
 answered on 05 Oct 2011
3 answers
410 views
Dears,
We are developing an ASP.net application under VS 2008 using Telerik ASP.net AJAX Controls, of caurse we have added an refernace to Telerik dlls.
When we try to open the project on more than one PC, and try to build the project we got the following error:

Unable to copy file "C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q1 2010\Bin35\Telerik.Web.UI.dll" to "bin\Telerik.Web.UI.dll". The process cannot access the file 'bin\Telerik.Web.UI.dll' because it is being used by another process.

which is fired becuase one of us is debugging the project.

Best Regards
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Oct 2011
1 answer
89 views
Hello ,

   I have a template column in my grid in which i have a RadMaskedTextbox in it.

 <telerik:GridTemplateColumn HeaderText="Time" UniqueName="Time" Visible = "true">
                                                              <ItemTemplate>
                                                    
                                          
                         <telerik:RadMaskedTextBox ID="txtTime" runat="server" PromptChar="_" Width="80px" Mask="<0..2><0..9>:<0..5><0..9>">
                            </telerik:RadMaskedTextBox>
                                   
                                   </ItemTemplate>
                                <ItemStyle Wrap="False" />
                            </telerik:GridTemplateColumn>

I want to use that MaskedTextbox from the server side and i am doing like this.

  For Each item As GridDataItem In RadGrid1.Items
            Dim tripid As Integer = item("TripID").Text
            Dim tripstatus As String = item("TripStatus").Text.ToString
            Dim txttime As New TextBox
            Dim txtOdometer As New TextBox
            txtOdometer = TryCast(item.FindControl("txtOdom"), TextBox)
            txttime = TryCast(item.FindControl("txtTime"), TextBox)
' Some Update.....
Next

I am not getting anything in that textbox..  unable to access it(All i get is  Nothing)
I am able to access it when i use the normal textbox in place of RadMaskedTextbox

Am i missing something here?

Appreciate the help
Thanks


Jagat
Top achievements
Rank 1
 answered on 05 Oct 2011
2 answers
61 views
Hi Teleriks Team,

I have a critical issue here. I have to show 2 details table on clicking 2 linkButton's in 2 RadGrid Columns respectively...

I tried :
<telerik:GridTemplateColumn>
   <ItemTemplate>
       <asp:LinkButtonID="LinkButton1"runat="server"Text="LinkButton"OnClick="HideDetail1_ShowDetail_Click">
         </
asp:LinkButton>
   </ItemTemplate>
</telerik:GridTemplateColumn>
protectedvoidHideDetail1_ShowDetail_Click(objectsender, EventArgs e)
    {
        foreach(GridDataItem item inRadGrid1.MasterTableView.Items)
        {
            RadGrid1.MasterTableView.Items[item.ItemIndex].ChildItem.NestedTableViews[0].Visible = true;
            RadGrid1.MasterTableView.Items[item.ItemIndex].ChildItem.NestedTableViews[1].Visible = false;
        }
    }
But this is not working in my Scenario... The page Postbacks after linkbutton click event. And I have a GridBind and Rebind Events in ItemCommand EventHandler. So the above Code doesn't show up my detailsTable.

So is there any other way to get his working.. Please... do find my Code Snippets....
<telerik:RadGrid ID="RadGrid1" PagerStyle-Mode="NextPrevNumericAndAdvanced" Width="100%" AllowAutomaticInserts="false"
        AllowAutomaticUpdates="false" PageSize="10" runat="server" PagerStyle-AlwaysVisible="true" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
        AllowPaging="True" AllowSorting="True" Visible="false" GridLines="None" AllowFilteringByColumn="true" Skin="Office2007" AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand"
        OnItemDataBound="RadGrid1_ItemDataBound" ShowFooter="true">                      
       <MasterTableView ShowFooter="true"  AllowAutomaticUpdates="false" DataKeyNames="row_id, Agency_code, Agency" TableLayout="Fixed" CommandItemDisplay="TopAndBottom" HierarchyLoadMode="Client">
       <DetailTables>
           <telerik:GridTableView CssClass="DetailTable" Name="RevenueNested" NoDetailRecordsText="No Records to display" ShowFooter="false"
                                    Width="1550px" AutoGenerateColumns="false" AllowFilteringByColumn="false" AllowPaging="false"
                                    AllowSorting="false" ToolTip="Click to View MOU\Payments">                                                                       
                                    <Columns
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Money_Collected" HeaderStyle-Width="100px" HeaderText="Money Collected"
                                    UniqueName="MoneyCollected">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Notes" HeaderStyle-Width="850px" HeaderText="Notes"
                                    UniqueName="Notes">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Modified_Date" HeaderStyle-Width="150px" HeaderText="Modified Date"
                                    UniqueName="ModifiedDate">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Modified_By" HeaderStyle-Width="100px" HeaderText="Modified By"
                                    UniqueName="ModifiedBy">
                                    </telerik:GridBoundColumn>                                                                                                         
                                    </Columns>                                   
           </telerik:GridTableView>
       </DetailTables>
<Columns>
<telerik:GridEditCommandColumn   UniqueName="EditCommandColumn" HeaderStyle-Width="50px">
                    </telerik:GridEditCommandColumn>
                                <telerik:GridBoundColumn HeaderStyle-Width="130px" DataField="Agency_code" ItemStyle-HorizontalAlign="Left" HeaderText="Agency Code" UniqueName="Agency_code">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn EditFormColumnIndex="1" FooterText="Total:" FooterStyle-HorizontalAlign="Right" AllowFiltering="true" UniqueName="agency" HeaderStyle-Width="300px" DataField="Agency" HeaderText="Agency">
                                    <ItemTemplate>             
                                        <asp:LinkButton ID="lnkViewMOU" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Agency")%>' OnClick="HideDetail1_ShowDetail_Click"  ></asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>                    
                                <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-Width="180px" FooterStyle-HorizontalAlign="Right" DataField="Total_Billing_Amount"
                                    DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" HeaderText="Billed/Estimated/MOU/Yearly Budget" UniqueName="Total_Billing_Amount">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn Aggregate="Sum" HeaderStyle-Width="130px" FooterStyle-HorizontalAlign="Right" DataField="MOU_Collected"
                                    DataFormatString="{0:c}" HeaderText="Money Collected" UniqueName="MOU_Collected" ItemStyle-HorizontalAlign="Right">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn Aggregate="Sum" DataField="Budget_Authoruty" FooterStyle-HorizontalAlign="Right" HeaderStyle-Width="130px" HeaderText="Budget Authority"
                                    DataFormatString ="{0:c}" UniqueName="Budget_Authoruty" ItemStyle-HorizontalAlign="Right">
                                </telerik:GridBoundColumn>
</Columns>
    <EditFormSettings>
        """"""""""
        """"""""""
        """"""""""
        """"""""""
    </EditFormSettings
       </MasterTableView>
        </telerik:RadGrid>
---------------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
    {
         
        if (!IsPostBack)
        {
            RadGrid1.Rebind();           
        }       
    }
 
protected void BindGrid()
    {
       """"
       """"
       """"      
    }
 
protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
    {
        DataTable dtlist = new DataTable();
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
        if (e.DetailTableView.Name == "RevenueNested")
        {          
             int id= Convert.ToInt32(dataItem.GetDataKeyValue("id").ToString());            
 
                dtlist = obj.GetList(id);               
                {
                    e.DetailTableView.DataSource = dtlist;
                }              
        }
    }
 
 protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
    try
        {
            if (e.Item != null)
            {
        """""
        """""
            if (e.CommandName == "Update")
                            {
                    """""
                    """""
                }
            if (e.CommandName == "Insert")
                            {
                    """""
                    """""
                }
        }
         BindGrid();
         RadGrid1.Rebind();
        }
       Catch (Exception Ex)
    {
    }
    }
 
protected void HideDetail1_ShowDetail_Click(object sender, EventArgs e)
    {
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
            {
                RadGrid1.MasterTableView.Items[item.ItemIndex].ChildItem.NestedTableViews[0].Visible = true;               
            }
             
        }
    }

I request the team to help me in this issue.. Thanks in advance...

Raja..
Raja
Top achievements
Rank 1
 answered on 05 Oct 2011
5 answers
218 views
Hi,
I was working away yesterday and got a popup message in Visual Studio saying that there was an update for RadControls so I decided to download it. Everything downloaded correctly but now all of my radcontrols have an "Error Creating Control..." It was looking for a different version but the one that was updated was older than the one I had...so I went back to your site and downloaded the latest trial version and referenced that dll in my app...still nothing. I looked at some of the possible solutions and copied the dll's into the GAC. Now my entire website is down. I like using the controls but I keep having issues like this. How can I get this to work so I can make changes to my controls at design time? I'm using Visual Studio 2008 and Telerik version 2009.3.1314.35.

Thanks
Here is the error I'm getting
Parser Error   
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.   
 
Parser Error Message: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified.  
 
Source Error:   
 
 
[No relevant source lines]  
   
 
Source File: none    Line: 0   
 
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI' could not be loaded. 
 
 
=== Pre-bind state information ===  
LOG: User = IIS APPPOOL\DefaultAppPool  
LOG: DisplayName = Telerik.Web.UI  
 (Partial)  
LOG: Appbase = file:///C:/WebSites/Harmony/Harmony.Web/  
LOG: Initial PrivatePath = C:\WebSites\Harmony\Harmony.Web\bin  
Calling assembly : (Unknown). 
===  
LOG: This bind starts in default load context.  
LOG: Using application configuration file: C:\WebSites\Harmony\Harmony.Web\web.config  
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config  
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.  
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).  
LOG: The same bind was seen before, and was failed with hr = 0x80070002.  
 
   
 
Tad
Top achievements
Rank 1
 answered on 05 Oct 2011
1 answer
86 views
Hi all:

I've read a little on here and found out that I can't have multiple upload controls on the same page at one time.  For the web application I'm building, I'm required to allow the client to add a new record to the database, which includes 3 files.  I'm not saving the files themselves in the database, but the relative path.  The client also needs to physically upload these 3 files, which are all associated with 1 record in the database.  How would you suggest I should do this?  I'm not sure if it's because it's Friday and I'm mentally drained, or if I just can't grasp a solution today.  Time is ticking and any help/suggestions are greatly appreciated.

Thanks,
TL
Peter Filipov
Telerik team
 answered on 05 Oct 2011
1 answer
228 views

Hi this my first thread.

  1. I need know the status of RadAsynUploading control uploading files. So that I can ask confirmation while clicking the submit button in the page like file uploading inprogress.
  2. The cancelled file also uploading, how to solve this issue.
Peter Filipov
Telerik team
 answered on 05 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?