Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views
How to insert,edit and update Appointments in RadScheduler.
Iam using visual studio 2008.
sqlserver 2005.
Plamen
Telerik team
 answered on 12 Dec 2011
1 answer
81 views
Hello,
I used RadTelerik to show an grid in grid, here is my code in aspx file:

<telerik:RadGrid runat="server" ID="gridModulesList" BorderStyle="None" BackColor="Transparent"
            BorderColor="Transparent" AutoGenerateColumns="false" ShowHeader="false" Width="100%"
            AutoPostBack="true"  OnItemCommand="gridModulesList_ItemCommand">    
       
            <MasterTableView DataKeyNames="ID">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="PnModuleDetail">
                    <telerik:RadGrid ID="gridModuleDetail" runat="server" AutoGenerateColumns="false" ShowHeader="false"  BorderWidth="0" Width="100%"
                            BackColor="White" OnItemDataBound="gridModuleDetail_ItemDataBound" OnItemCommand="gridModuleDetail_ItemCommand"
                            OnSelectedIndexChanged="gridModuleDetail_SelectedIndexChanged" OnNeedDataSource="gridModuleDetail_NeedDataSource"> 

                          <ClientSettings EnablePostBackOnRowClick="True" EnableRowHoverStyle="true" EnableAlternatingItems="true">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <MasterTableView >
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <Columns>
                            <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false">
                                </telerik:GridBoundColumn>                                
                            <telerik:GridTemplateColumn UniqueName="Name">
                                <ItemTemplate>                                    
                                    <asp:Label runat="server" ID="lblName"></asp:Label>
                                </ItemTemplate>                                
                            </telerik:GridTemplateColumn>                                                                
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                    </asp:Panel>
                </NestedViewTemplate>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" UniqueName="Name" Visible="true">
                    </telerik:GridBoundColumn>                    
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>


The problem is:
When I click on a item=> this item is selected and it's bold (item1)
I continue click on the other item item2=> item2 is selected and it's bold and item1 is still bold
Expected:
When I click on item2=> item1 is not selected and it's not BOLD


Pavlina
Telerik team
 answered on 12 Dec 2011
1 answer
79 views
When I run the code and put the Grid into edit mode  the dropdown column is populated with
seven 'System.Data.DataRowView' rows (which is the number of rows in the Title database table)
I cannot see why the values are not being displayed - instead I am getting the object name.
can anyone help?

This my code on the ItemdataBound Event:

GridEditableItem lEditItem = e.Item
as GridDataItem;
 GridEditManager lEditManager = lEditItem.EditManager;
 GridDropDownColumnEditor lTitle = (GridDropDownListColumnEditor)(lEditManager.GetColumnEditor("ddlTitle"));
DataTable dtTitle = ToDataTable2.ToDataTable(title);  
 lTitle.DataSource=dtTitle;
 lTitle.DataValueField = dtTitle.Columns[0].ToString(); 
 lTitle.DataTextField = dtTitle.Columns[1].ToString(); 
 lTitle.DataBind();
Pavlina
Telerik team
 answered on 12 Dec 2011
2 answers
149 views
Below is the code i'm using and I'm have a few questions regarding whats happening.

1) The file never actually saves, i click submit and it appears to work but the file never saves to my target directory.  How do I resolve this.
2) When i try a second time to save a file i get directory access is denied, not sure what.
3) when I use a HTML5 browser and the drag and drop functionality is present, i'm able to save to a test directory C:\test with whatever file I choose, however, when I use RadUpload (non HTML5) i keep getting physical error paths messages.  How do I resolve this?  I need to be able to save to a specific folder.
var $ = $telerik.$;
     function pageLoad() {
         if (!Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable()) {
             $(".wrapper").replaceWith(
             $(""));
         }
     }
 
     function added(sender, args) {
         if (Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable()) {
 
             $(".ruDropZone").html("<br /><div align=\"center\"><img src=\"images/toolboxdragdrop.jpg\"></div>");
             $(".nonHTML5").replaceWith(
             $(""));
         }
     }
      
 </script>
 
     <div class="wrapper">
         <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"
             OnClientAdded="added" OnFileUploaded="RadAsyncUpload1_FileUploaded">
         </telerik:RadAsyncUpload>
         <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" />
     </div>
     <div class="nonHTML5" style="position:relative;">
         <table>
             <tr>
                 <td id="controlContainer">
                     <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="5"
                         OverwriteExistingFiles="true" OnFileUploaded="RadAsyncUpload1_FileUploaded" />
                     <telerik:RadProgressArea ID="progressArea1" runat="server" />
                 </td>
                 <td>
                     <div class="smallModule">
                         <div class="rc1">
                             <div class="rc2">
                                 <div class="rc3" style="width:240px">
                                     <asp:Label ID="labelNoResults" runat="server" Visible="True">No uploaded files yet</asp:Label>
                                     <asp:Repeater ID="repeaterResults" runat="server" Visible="False">
                                         <HeaderTemplate>
                                             <div class="title">
                                                 Uploaded files in the target folder:</div>
                                         </HeaderTemplate>
                                         <ItemTemplate>
                                     <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                                     <%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>
                                     <br />
                                         </ItemTemplate>
                                     </asp:Repeater>
                                 </div>
                             </div>
                         </div>
                     </div>
                 </td>
             </tr>
         </table>
     </div>
     <asp:Button ID="buttonSubmit" runat="server" CssClass="RadUploadSubmit"
         OnClick="buttonSubmit_Click" text="Submit" />
   </td>

.aspx.cs
public void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        RadAsyncUpload1.TargetFolder = MechanicToolboxClass.ToolBoxSaveToFolder();
    }
 
    protected void buttonSubmit_Click(object sender, System.EventArgs e)
    {
         
        if (RadUpload1.UploadedFiles.Count > 0)
        {
            TargetFolderUpload = MechanicToolboxClass.ToolBoxSaveToFolder();
            RadUpload1.TargetFolder = TargetFolderUpload;
            repeaterResults.DataSource = RadUpload1.UploadedFiles;
            repeaterResults.DataBind();
            labelNoResults.Visible = false;
            repeaterResults.Visible = true;
        }
        else
        {
            labelNoResults.Visible = true;
            repeaterResults.Visible = false;
        }
         
    }

Bozhidar
Telerik team
 answered on 12 Dec 2011
1 answer
79 views

hello:
There are   Chinese characters in RadEditor control,  when  choose the export to pdf . the pdf  is generated but the Chinese characters are  shown abnormal .

    eg: 
So, instead of what I would expect:
"中文12"

I see this:
" ####12" 
is there a way to fix this?

Shinu
Top achievements
Rank 2
 answered on 12 Dec 2011
1 answer
312 views
I'm following the telerik demo Grid Heirachy with Templates. On the sub grids I want to give the user "Add new Record" ability. I have that partially working except that on each new row three of my columns need to be "related comboboxes", as demostrated in this telerik example. In my implementation, my three related combo boxes are a list of clients, sub list of projects and sub list of project requirements.

The problem I run into is that the webpage can't find the comboboxes in my javascript code when the page first loads, it throws an error.

"The name 'RadComboBox_Project' does not exist in the current context"

Line 395:            function LoadProjects(sender, eventArgs) {
Line 396:                 var projectsCombo = $find("<%= RadComboBox_Project.ClientID %>");
Line 397:                var requirementsCombo = $find("<%= RadComboBox_Requirement.ClientID %>");

I think the reason this might be happening is because the RadGrid2 is located inside of a <telerik:RadPageView> control or within other nested controls. The aspx page when in Design mode doesn't show the RadGrid2 on the designer surface at all, it's somehow hidden. Probably because RadGrid2 is a subgrid of RadGrid1 and also that RadGrid2 is nested inside of a RadPageView, that being nested inside of a RadMultiPage and that being nested inside of an asp:Panel. (I'm using the exact code example from Grid Heirachy with Templates)

Another issue with the nested RadGrid2 is that it doesn't show up at all in the Properties window listbox in Visual Studio. None of the nested RadGrids on each RadPageView are visible. There are RadGrids on each of the Tabs of the RadTabStrip. All of these RadGrids are not visible.

In the c# code behind class, you also can't reference them. Code like this doesn't compile::

int x = RadGrid2.MasterTableView.Columns.Count;

RadComboBox_Project.DataTextField = "Name";
// this is a combobox within RadGrid2

Both of those two controls show the red squiggly lines, if you hover over them the VS tooltip tells me the same error: 
"The name 'RadGrid2' does not exist in the current context".
"The name 'RadComboBox_Project' does not exist in the current context".

It seems like there is one central error causing all of these nested controls to be hidden from the compiler. Any idea how to make them available for use so I can reference them in javascript and in c# code behind?

Thank you.

Dimitar Terziev
Telerik team
 answered on 12 Dec 2011
5 answers
328 views
Dear Telerik Support Team,

I am programmatically building a RagGrid and I want to insert a thumbnail whose filename is stored in the database (column "VignetteFilename"). (exemple of filename : "picture1.jpg")

Environment : Telerik AJAX RadControls, .Net Framework 3.5, VB.Net

The files are stored on the web server, in the directory : /Models/ImagesModels/

Here is the code I've used for creating the relating GridImageColumn (in VB.Net, using MS SQL Database) :

    Dim imageColumn As New GridImageColumn
               imageColumn.HeaderText = "Thumbnail 1"
                imageColumn.UniqueName = "VignetteFilename"
                imageColumn.DataImageUrlFields = {"VignetteFilename"}
                imageColumn.DataImageUrlFormatString = "~/Models/ImagesModels/{0}"
                imageColumn.AlternateText = "Photo Style 1"
                imageColumn.ImageAlign = "Middle"
                imageColumn.ImageHeight = "110px"
                imageColumn.ImageWidth = "90px"
                rgRadGrid.MasterTableView.Columns.Add(imageColumn)

In the relating Aspx.vb page, I have tried all the kinds of "Protected Sub RadGridSample_ItemDataBound ..." codes I've found on your Support web site, but nothing works.

Could you please help me ?

Many thanks in advance (and congratulations for your terrific product !!!)

Jacques.
Jacques
Top achievements
Rank 1
 answered on 12 Dec 2011
3 answers
116 views
hi, i'm beginner in telerik programming.
i used the editor in my project, when i upload a picture, for example this picture in 300*300 size, but it shown in very little size in my page!
i didnot any filtering on my project, but it dosent work! what should i do for this problem??

Thanks...
Dobromir
Telerik team
 answered on 12 Dec 2011
7 answers
115 views
Hi,

I am trying to implement a following scenario. I am porting an already existing menu solution to radMenu. The menu consists of a a couple of static elements (for example "Forums", "Clients", "Client Cards", "Reports", "Claims") and each of them consists of 2-3 nested static elements (usually registry of records and "add a new record"). The difficult part is the list of dynamically bound 10 recently opened records that is being loaded from a Stored Procedure via the SqlDataSource.

The original menu was done pretty crudely. A panel with a HoverMenuExtender and the 10 recent list was implemented with RadioButtonList that was hooked to the SqlDataSource. Below is some code for reference:   

<asp:HoverMenuExtender ID="HME" runat="server" PopupControlID="panelClientCardsDropDown" TargetControlID="lnkClientCardsDropDown"></asp:HoverMenuExtender>
 
    <asp:Panel ID="panelClientCardsDropDown" runat="server">
        <asp:Label ID="lblRecentCards" runat="server" Text="10 recent client cards :"/>
        <asp:SqlDataSource ID="SQLDS_RecentCards" runat="server" ConnectionString="<%$ ConnectionStrings:SQLusrConn %>" SelectCommand="spSelectRecent" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:Parameter DefaultValue='<%$ AppSettings:03 %>' Name="txtParametr03" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:RadioButtonList ID="radRecentCards" runat="server" DataSourceID="SQLDS_RecentCards" DataTextField="Value" DataValueField="ID">
        </asp:RadioButtonList>
    <asp:HyperLink ID="lnkNewCard" NavigateUrl="~/private/tcard.aspx?ID=new" Target="_blank" runat="server" Text="New Client Card"/>
    </asp:Panel>

I would like to know how to achieve this using the radMenu. I've read the documentation but it does not seem to provide a solution.
Kate
Telerik team
 answered on 12 Dec 2011
1 answer
35 views
Hi!  We've recently run into an issue with the radeditor which seems to correspond to around the time we upgraded our Telerik asp.net/ajax controls from 2011 Q2 to 2011 Q3. 

On our page we have a radeditor which utilizes the code below provided by Telerik to show the word 'Comments' in the radeditor until the user clicks in the radeditor, upon which the word 'Comments' disappears.

var defaultContent = "Comments";
 
            function OnEditorLoad(editor, args) {
                editor.set_html(defaultContent);
                var EditorElement = document.all ? editor.get_document().body : editor.get_document();
 
                $telerik.addExternalHandler(EditorElement, "click", function (e) {
                    if (editor.get_html(true).trim() == defaultContent) {
                        editor.set_html("");
                    }
                });
 
                $telerik.addExternalHandler(EditorElement, "blur", function (e) {
                    if (editor.get_html(true).trim() == "") {
                        editor.set_html(defaultContent);
                    }
                });
            }
 
---------------------------------------------------------------------------------------------------
 
<telerik:RadEditor ID="reComments" runat="server" Skin="Windows7" Width="94.7%" Height="150px"
 ToolsFile="~/Content/Tools_NoToolbar.xml" ToolTip="Enter Comments"
 ContentAreaCssFile="~/Content/cssRadEditorWhiteContent.css" OnClientLoad="OnEditorLoad"  ToolbarMode="Default"
 EditModes="Design" StripFormattingOptions="MSWordRemoveAll" ContentAreaMode="Div">
    <CssFiles>
        <telerik:EditorCssFile Value="~/Content/cssRadEditorWhiteContent.css" />
    </CssFiles>
</telerik:RadEditor>

This previously worked fine with no issues.  However since upgrading the controls, no matter what other field (e.g., textbox, radiobuttons, etc) a user clicks on once a page loads, the cursor always ends up inside the radeditor and requires the user to have to click again in order to set the focus back on the original field clicked.  This has become very frustrating for our users.

A secondary, much less important issue noticed is the word 'Comments' no longer reappears if a user clicks outside the radeditor without entering any text, etc,;  whereas previously if a user clicked in the radeditor, the word 'Comments' would disappear, and if the user left the radeditor blank then when they clicked elsewhere on the page the word 'Comments' would re-appear.

These issues are experienced on multiple different pages where we've utilized this functionality, suggesting whatever has caused the issue isn't the result of something on the individual pages themselves.  It also happens regardless of which browser is used to access our site (i.e., Firefox, Chrome, IE).

Any ideas or thoughts?

Thanks!
Dobromir
Telerik team
 answered on 12 Dec 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?