Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
79 views

As you can see in the attached image, the edges of the list of records are not border radius format. The examples in the online demo instead and there are no particular settings to make the object. How can I fix?

How can I fix? here is the html code

 

<telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="400px"
    ShowSearchButton="false"
    RenderMode="Lightweight">
    <DropDownSettings Height="300" Width="400" />
    <WebServiceSettings Path="Index.aspx" Method="GetResults"/>
</telerik:RadSearchBox>

Also how can I enter the search button in the search button?

 

Fabio Cirillo
Top achievements
Rank 1
 asked on 20 Mar 2016
12 answers
1.3K+ views
I was getting performance issues, and I finally managed to trace it back to the code in ItemDataBound(). For some reason, every record was being databound four times. So I grew curious.

I created a new project, threw a radgrid on it along with a SQLDataSource that ran a simple 53-record SELECT stored proc. In ItemDataBound() I set:

Debug.WriteLine("ItemDataBound");

Then I did the same with a basic GridView. In RowDataBound(), I set:

Debug.WriteLine("RowDataBound");


When ItemDataBound ran, it came up with 108 lines (106 for the records 1 for the header, and one for the footer). When I ran RowDataBound(), it came up with 55 lines (not sure where the extra one is coming from. Possibly a footer that's not visible?)

So why is it running twice? (Or in my case, four times?)

ETA: Results from those debug lines with e.Item.ItemIndex/e.Row.RowIndex added:

-1 ItemDataBound
0 ItemDataBound
0 ItemDataBound
1 ItemDataBound
1 ItemDataBound
2 ItemDataBound
2 ItemDataBound
3 ItemDataBound
3 ItemDataBound
4 ItemDataBound
4 ItemDataBound
5 ItemDataBound
5 ItemDataBound
6 ItemDataBound
6 ItemDataBound
7 ItemDataBound
7 ItemDataBound
8 ItemDataBound
8 ItemDataBound
9 ItemDataBound
9 ItemDataBound
10 ItemDataBound
10 ItemDataBound
11 ItemDataBound
11 ItemDataBound
12 ItemDataBound
12 ItemDataBound
13 ItemDataBound
13 ItemDataBound
14 ItemDataBound
14 ItemDataBound
15 ItemDataBound
15 ItemDataBound
16 ItemDataBound
16 ItemDataBound
17 ItemDataBound
17 ItemDataBound
18 ItemDataBound
18 ItemDataBound
19 ItemDataBound
19 ItemDataBound
20 ItemDataBound
20 ItemDataBound
21 ItemDataBound
21 ItemDataBound
22 ItemDataBound
22 ItemDataBound
23 ItemDataBound
23 ItemDataBound
24 ItemDataBound
24 ItemDataBound
25 ItemDataBound
25 ItemDataBound
26 ItemDataBound
26 ItemDataBound
27 ItemDataBound
27 ItemDataBound
28 ItemDataBound
28 ItemDataBound
29 ItemDataBound
29 ItemDataBound
30 ItemDataBound
30 ItemDataBound
31 ItemDataBound
31 ItemDataBound
32 ItemDataBound
32 ItemDataBound
33 ItemDataBound
33 ItemDataBound
34 ItemDataBound
34 ItemDataBound
35 ItemDataBound
35 ItemDataBound
36 ItemDataBound
36 ItemDataBound
37 ItemDataBound
37 ItemDataBound
38 ItemDataBound
38 ItemDataBound
39 ItemDataBound
39 ItemDataBound
40 ItemDataBound
40 ItemDataBound
41 ItemDataBound
41 ItemDataBound
42 ItemDataBound
42 ItemDataBound
43 ItemDataBound
43 ItemDataBound
44 ItemDataBound
44 ItemDataBound
45 ItemDataBound
45 ItemDataBound
46 ItemDataBound
46 ItemDataBound
47 ItemDataBound
47 ItemDataBound
48 ItemDataBound
48 ItemDataBound
49 ItemDataBound
49 ItemDataBound
50 ItemDataBound
50 ItemDataBound
51 ItemDataBound
51 ItemDataBound
52 ItemDataBound
52 ItemDataBound
-1 ItemDataBound



-1 RowDataBound
0 RowDataBound
1 RowDataBound
2 RowDataBound
3 RowDataBound
4 RowDataBound
5 RowDataBound
6 RowDataBound
7 RowDataBound
8 RowDataBound
9 RowDataBound
10 RowDataBound
11 RowDataBound
12 RowDataBound
13 RowDataBound
14 RowDataBound
15 RowDataBound
16 RowDataBound
17 RowDataBound
18 RowDataBound
19 RowDataBound
20 RowDataBound
21 RowDataBound
22 RowDataBound
23 RowDataBound
24 RowDataBound
25 RowDataBound
26 RowDataBound
27 RowDataBound
28 RowDataBound
29 RowDataBound
30 RowDataBound
31 RowDataBound
32 RowDataBound
33 RowDataBound
34 RowDataBound
35 RowDataBound
36 RowDataBound
37 RowDataBound
38 RowDataBound
39 RowDataBound
40 RowDataBound
41 RowDataBound
42 RowDataBound
43 RowDataBound
44 RowDataBound
45 RowDataBound
46 RowDataBound
47 RowDataBound
48 RowDataBound
49 RowDataBound
50 RowDataBound
51 RowDataBound
52 RowDataBound
-1 RowDataBound

Loki
Top achievements
Rank 1
 answered on 19 Mar 2016
12 answers
453 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
631 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
830 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
92 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
390 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
999 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
405 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
137 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
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?