Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
502 views
Hi people,

I'm trying to put viewpaths, uploadPaths property on my codebehind like I do that with a radEditor and it doesn't seems to work.
Here is a little test I'm trying to do :

test.aspx :
<form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadEditor ID="RadEditor1" runat="server"
        </telerik:RadEditor> 
        <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"
        </telerik:RadFileExplorer> 
    </div> 
</form> 

test.aspx.vb :
Protected Sub Page_PreRender(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.PreRender 
    activeFileBrowser() 
End Sub 
 
Protected Sub activeFileBrowser() 
        RadEditor1.ImageManager.ViewPaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
        RadEditor1.ImageManager.UploadPaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
        RadEditor1.ImageManager.DeletePaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
 
        RadFileExplorer1.Configuration.ViewPaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
        RadFileExplorer1.Configuration.UploadPaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
        RadFileExplorer1.Configuration.DeletePaths = New String() {"/ImagesClients/" & chercheChemin() & "/Animation/"
End Sub 

When I launch the page :
  • I am able with the RadEditor to browse the image directory, upload, delete images, etc.
  • I can't browse the FileBrowser directory, not upload, not delete.

Is there a mistake?
Thank you,

Julien

Vessy
Telerik team
 answered on 18 Mar 2016
26 answers
716 views
My Column:
<telerik:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean" ItemStyle-Width="20px" 
                        HeaderText="IsActive" SortExpression="IsActive" UniqueName="IsActive">
 </telerik:GridCheckBoxColumn>  
My EditForm template:
<EditFormSettings EditFormType="Template">
                    <FormTemplate>
......
Active:
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind( "IsActive") %>' TabIndex="4">
</asp:CheckBox>         
                                         
I was able to update any records in the grid. However when I clicked on Add New Record, I received an error "specified cast is not valid" on the boolean field "IsActive". Please help, thanks in advance
HaBo
Top achievements
Rank 1
 answered on 18 Mar 2016
2 answers
862 views

Hi!

i am trying to populate and select all items of the following RadComboBox:

<telerik:RadDropDownList ID="RadDropDownParameterX" runat="server" 
                    DropDownHeight="120px" Width="120px" Skin="BlackMetroTouch" DropDownWidth="120px"
                    OnSelectedIndexChanged="RadDropDownParameterX_SelectedIndexChanged"
                    AutoPostBack="true" >
                    <Items>
                        <telerik:DropDownListItem Text="Countries" Value="Countries" Selected="true" />
                        <telerik:DropDownListItem Text="Sites" Value="Sites" />
                        <telerik:DropDownListItem Text="Rts" Value="Rts" />
                        <telerik:DropDownListItem Text="Machines" Value="Machines" />
                        <telerik:DropDownListItem Text="Protocols" Value="Protocols" />
                    </Items>
                </telerik:RadDropDownList>

With the following code/logic:

Protected Sub Page_Load(sender As Object, e As System.EventArgs)
 
        If Not Page.IsPostBack Then
 
            LoadCountries()
 
            Dim collectionAllCountries As IList(Of RadComboBoxItem)
                collectionAllCountries = RadComboBoxCountries.Items
                For Each item As RadComboBoxItem in collectionAllCountries
                    item.Selected = true
            Next
...
...
...
 
Public Sub LoadCountries()
 
        Dim ListaAllCountries As List(Of AffideaGeneralWeb.BLL.General.Countries)
        ListaAllCountries = AffideaGeneralWeb.BLL.General.Countries.GetCountries()
 
        Dim dataCountries As DataTable = New DataTable()
        dataCountries.Columns.Add("text")
        dataCountries.Columns.Add("value")
 
        For Each c As AffideaGeneralWeb.BLL.General.Countries In ListaAllCountries
 
            Dim currentRow As DataRow = dataCountries.NewRow()
            currentRow("text") = c.Title
            currentRow("value") = c.ID
            dataCountries.Rows.Add(currentRow)
 
        Next
 
        RadComboBoxCountries.DataSource = dataCountries
        RadComboBoxCountries.DataBind()
 
    End Sub

However even if items are populated (so LoadCountries() works and binds datasource to RadComboBox) the code that i am using to select items does not select them in fact (check screenshot)!

Am i missing something here?

Nikos
Top achievements
Rank 1
 answered on 18 Mar 2016
1 answer
112 views

I have this setup in witch i dynamically add controls. I have tried to put AjaxManagerProxy but it didn't work.

Sys.WebForms.PageRequestManagerServerErrorException: Script control 'PnlItems' is not a registered script control. 
Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

<%--Main page--%>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <asp:Repeater ID="RptItems" runat="server">
        <ItemTemplate>
            <cs:customitem id="CustomItem1" runat="server" />
        </ItemTemplate>
    </asp:Repeater>
    <asp:Button ID="BtnAddItem" runat="server" OnClick="BtnAddItem_OnClick" />
</telerik:RadAjaxPanel>

 <%--Custom control--%>
<telerik:RadAjaxPanel ID="PnlItems" runat="server">
    <asp:Repeater ID="RptItems" runat="server">
        <ItemTemplate>
            <asp:TextBox ID="TxtName" runat="server" />
        </ItemTemplate>
    </asp:Repeater>
    <asp:Button ID="BtnAddItem" runat="server" OnClick="BtnAddItem_OnClick" />
</telerik:RadAjaxPanel>

Maria Ilieva
Telerik team
 answered on 18 Mar 2016
4 answers
438 views

I have created a ModalPopUp Extender with a RadDatePicker on it. I've run into a problem, though, when you try to pick a date, the calendar comes up behind the modal window rather than on top and you cannot pick a date.

Any thoughts on how to correct this situation would be appreciated. Below is my markup.

   <div id="divConfirmIDES" runat="server">
    <div id="divP3ProfileDate" runat="server">
         <div class="PopupHeader">
            <asp:Label ID="Label1" runat="server" Text="P3 Update Profile Date"></asp:Label>
        </div>
        <div class="floatLeft">
            <label for="rdpPanelP3ProfileDate">P3 Profile Date:</label>
            <telerik:RadDatePicker ID="rdpPanelP3UpdateDate" runat="server">
                <Calendar runat="server" ShowRowHeaders="false">
                    <SpecialDays>
                        <telerik:RadCalendarDay Repeatable="Today" Date="" IsToday="true">
                            <ItemStyle CssClass="rcToday" />
                        </telerik:RadCalendarDay>
                    </SpecialDays>
                </Calendar>
                <DateInput runat="server" DateFormat="dd MMM yyyy" EmptyMessage="DD MMM YYYY"/>
            </telerik:RadDatePicker>
        </div>
        <div class="formRow">
            <asp:Label ID="Label2" runat="server" Style="font-weight: bold"
                Text='By clicking "Save", you are confirming that the P3 Profile Date is correct.'></asp:Label>
        </div>
        <div class="formRowNoBorder">
            <div class="floatRight">
                <asp:LinkButton ID="btnOkP3Date" runat="server" OnClick="btnOkP3Date_Click" CssClass="silverButton"><span>Ok</span></asp:LinkButton>
                <asp:LinkButton ID="btnCancelP3Date" runat="server" CausesValidation="false" CssClass="floatRightLink"><span>Cancel</span></asp:LinkButton>
            </div>
        </div>
    </div>
</asp:Panel>
<ajaxtoolkit:ModalPopupExtender ID="mpeConfirmIDES" runat="server" BackgroundCssClass="modalBackground"
    DropShadow="true" TargetControlID="btnFakeConfirmIDES" PopupControlID="pnlConfirmIDES" CancelControlID="btnCancelIDES">
</ajaxtoolkit:ModalPopupExtender>

Rodney
Top achievements
Rank 2
 answered on 18 Mar 2016
2 answers
1.0K+ views

I am trying to find the control and display set to "block" or "none" on onclientselectedindexchanged event of RadCombobox. It returns always null. The script and controls are in User Control of Content page. There is also Master page for this Content page. I  debugged the code with Debugger statement but the control has this tag. "ctl00_content2_ucControl1_imgTest". How can show and hide image? Please let me know. Thanks for your help. Also I tried to use document.getElementById("<%=imgTest.ClientID"); and $find(("<%=imgTest.ClientID") ; but none of these working.

<asp:Image ID="imgTest" ImageUrl="../../../images/test.gif" AlternateText="test"
                            runat="server" style="display:none"></asp:Image>

<telerik:RadComboBox ID="Combobox1" runat="server" DataTextField="test1"
                            DataValueField="test_id" NoWrap="true" Width="250" onclientselectedindexchanged="OnClientSelectedIndexChanged">                        </telerik:RadComboBox>

 
<script type="text/javascript">

  

function OnClientSelectedIndexChanged(sender, eventArgs) {

     {
      var
item = eventArgs.get_item();

          if(item.get_value() == "8")

             {
            var imageControl = document.getElementById('imgTest');
            imageControl.style.display = "block"; 
            }
        }
</script>

vaishali
Top achievements
Rank 1
 answered on 18 Mar 2016
13 answers
506 views
Hello,

I am using Rad Controls for ASP.NET Q2 2008 in MS Visual Studio 2008. Database is MS SQL 2005 Developer. I have a stored procedure that runs some subqueries and puts all of my results into a temporary table (#tmpEmpList).

I then have a SqlDataSource that has the stored procedure as my SELECT. I initially did not have a temp table, and everything worked as expected. I now have updated my sp to put the data in a temp table first, and then pull what I need out of the temp table as the last statement of the sp. The stored procedure runs properly in MS SQL Management studio.

When I went to refresh my schema for the RadGrid, I keep getting a message that says

" Unable to retrieve schema. Ensure that the ConnectionString and SelectCommand properties are valid.
Invalid object name 'tmpEmpList'."

Can a RadGrid accept data from a temp table of a stored procedure?

Thanks,
Joe

András
Top achievements
Rank 1
 answered on 18 Mar 2016
1 answer
174 views
Hi,
I have a radtreeview that has a context menu.  I would like to hide the entire context menu based upon the value of the node attribute.
I can kind of achieve this by hiding individual menu items, however a small animation is still shown even if no menu items are displayed.
I would like to do this client side if possible.
Thanks.
Dimitar
Telerik team
 answered on 18 Mar 2016
1 answer
231 views

hi 

How do i make the navigate url to link to a section of a page? I try using the code below but is not working. Here is what i want to accomplish using RadPanelBar instead of anchor tag http://www.echoecho.com/htmllinks08.htm. Thanks a lot

<telerik:RadPanelItem runat="server" Text="Customers">
            <Items>
                <telerik:RadPanelItem runat="server" NavigateUrl="#customer" Text="View Customers">
                </telerik:RadPanelItem>
            </Items>
</telerik:RadPanelItem>

 

 <div class="panel panel-primary" style="margin-right:5px;margin-top:2px">
         <div class="panel-heading" id="customer">
            <h3 class="panel-title">Customer</h3>
         </div>
          <div class="panel-body">
            <h4>How to use View Customers</h4>
              <hr />
              <p></p>
          </div>
</div>

Dimitar Terziev
Telerik team
 answered on 18 Mar 2016
0 answers
245 views

Hi support,

 

I have a long page behind and mid of the page click on a button for popup a kendo window. when my window popup, the behind page automatically scroll to up and loose the correct position. My code on below:

$(createHolidayDialog[0]).data("kendoWindow").center().open().pin();

Regards,

Ashkan

 

Ashkan
Top achievements
Rank 1
 asked on 17 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?