Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
81 views
I've been testing the RibbonBar component as I'm planning to replace the one I use now with Telerik's. I followed the examples published but in none of them the items are added programmatically, as I do in my project. These items that were added via code are rendered incorrectly, making their visual bad.

I also tested with an older version of RibbonBar, one that doesn't have the new Application Menu yet, and the results were as expected. I'll attach screenshots from both versions, the ones named as "old" are correct and the "new" are incorrect.

Thanks in advance,
Rodrigo
Rod
Top achievements
Rank 2
 asked on 09 Aug 2013
3 answers
226 views
Hi Team,

Can we add New Column in the grid view of RadEditor -> Image Manager -> Grid View , please see attached image.
We want to do customization in RadEditor of DNN.and the requirment is to add column of upload date in Image Manager(Grid).


Thanks in Advance,
John Shah

Vessy
Telerik team
 answered on 09 Aug 2013
1 answer
283 views
Hi!

I am unfortunately trying to load my user database into a radcombobox with autocomplete, I want to use the combobox only as a autocomplete textbox, not really as a Combobox with all its features.

Whenever it loads the data, it loads the entire table into the dataset and that is not something i want due to the lag, ive tried setting onLoadDemand and MinLength, to avoid the autocomplete, to load the entire dataset, without sucess. Ive also tried setting ItemsRequested="10" to make it load only 10 items at the time. Doesn't really seem to work that way.

Any idea? My control is currently looking like this:
                      <telerik:RadComboBox ID="UsersFromAD" runat="server" Width="256px"<br>
                             Height="100px" ShowDropDownOnTextboxClick="false"
                             MarkFirstMatch="True"
                             OnItemsRequested="ComboUsersFromAD_ItemsRequested"
                             EnableVirtualScrolling="True" ItemsPerRequest="10"
                             ShowMoreResultsBox="true" EnableLoadOnDemand="True"
                             Skin="Windows7">
                      </telerik:RadComboBox>
Nicklas
Top achievements
Rank 1
 answered on 09 Aug 2013
1 answer
320 views
for the new admin. function of my application, there is a gridview to show records in database.

there is a textbox to let user input staff name and then click "search" button. I want to show the search result in Listbox (show similar staff name). when user click on the name, it will automatically insert into db and then refresh the gridview.

How can I databind the listbox based on the textbox ? and how can i insert the value when user click listbox ? Thanks.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ITAlert.aspx.vb" Inherits="DepartmentManager_ITAlert" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 500px; margin-left: auto; margin-right: auto;">
   
   
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
 
                    <asp:Label ID="Label1" runat="server" Text="Staffs to get the email alert:" Font-Bold="true"></asp:Label>
                    <br /><br /> 
                     
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" allowpaging="true"
                    AutoGenerateColumns="False" DataSourceID="LDS" GridLines="None"  pagesize="20"       
                    AllowAutomaticDeletes="True" Style="border: 0; outline: none;"
                    OnDeleteCommand="RadGrid1_DeleteCommand"
                     
                    >
                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <MasterTableView DataSourceID="LDS" DataKeyNames="ID">
                        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="DisplayName" FilterControlAltText="Filter Name column"
                                HeaderText="Staff Name" ReadOnly="True" SortExpression="DisplayName" UniqueName="DisplayName">
                            </telerik:GridBoundColumn>               
                        <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                          ConfirmTitle="Delete" ButtonType="ImageButton" Text="Delete" CommandName="Delete" />
 
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>
                </telerik:RadGrid>
 
                <asp:LinqDataSource ID="LDS" runat="server" ContextTypeName="DataContext"
                    OrderBy="DisplayName" Select="new (ID, DisplayName)" TableName="v_EmailAlerts"
                    Where="Type == 4">
                                        <WhereParameters>
                                    <asp:QueryStringParameter Name="CID" QueryStringField="CID"
                                        Type="Int32" />
                                </WhereParameters>      
                </asp:LinqDataSource>
 
                <br />
                <br />
         
 
                <asp:TextBox runat="server" ID="tb_staffname">
                </asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_click"/>
 
 
           <telerik:RadListBox runat="server" ID="RadListBox_staff" Height="300px" Width="230px"
            AllowTransfer="false"
             AutoPostBack="false"
            style="top: 0px; left: 0px" DataSourceID="LDS_staff"
            DataTextField="displayname" DataValueField="sid" >
            </telerik:RadListBox>
                              <asp:LinqDataSource ID="LDS_staff" runat="server" ContextTypeName="dcHRISDataContext"
                    OrderBy="DisplayName" Select="new (SID, DisplayName)" TableName="vHRIS_StaffDBs"
                    Where="Lefe == False and SID is nothing">  
                </asp:LinqDataSource>               
     
    </div>
    </form>
</body>
</html>

Code Behind (with proposed listbox databind function) :

Imports Telerik.Web.UI
 
Partial Class DepartmentManager_ITAlert
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
 
    End Sub
 
 
    Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.DeleteCommand
        Dim AlertID = DirectCast((DirectCast(e.Item, GridDataItem)).GetDataKeyValue("ID"), Integer)
        'retrive entity form the Db
        Dim dc As New DataContext
        Dim rec = (From a In dc.EmailAlerts Where a.id = AlertID).firstordefault
        If rec IsNot Nothing Then
 
            dc.HRIS_EmailAlerts.DeleteOnSubmit(rec)
            dc.SubmitChanges()
 
        End If
    End Sub
 
    Protected Sub btnSearch_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
 
        Dim sname As String = ""
        sname = tb_staffname.text
 
        If sname <> "" Then
            Dim dc As New dcHRISDataContext
 
            Dim rec = (From a In dc.vHRIS_StaffDBs Where a.Lefe = False _
                       And (x >= x.DisplayName.Matches(sname)) Select a.SID, a.DisplayName Order By DisplayName).ToList
 
            RadListBox_staff.DataTextField = "DisplayName"
            RadListBox_staff.DataValueField = "SID"
            RadListBox_staff.DataSource = dt
            RadListBox_staff.DataBind()
 
        End If
 
    End Sub
 
 
End Class


moreover, it display error for the linq of searching function

Dim rec = (From a In dc.vHRIS_StaffDBs Where a.Lefe = False _
           And (x >= x.DisplayName.Matches(sname)) Select a.SID, a.DisplayName Order By DisplayName).ToList

the error msg as follows:

Compiler Error Message: BC36610: Name 'x' is either not declared or not in the current scope.





Kate
Telerik team
 answered on 09 Aug 2013
2 answers
257 views
Hi,
    I have the Rad grid, which has EditFormSettings .  I need to find the to find the Grideditformitem in the item command event. I am not
 able to find the controls in GridEditformitem. For me it is coming as null. Any Ides.


Please Help Me!!
Any help will be appreciated..

Thanks,
Chithu
<EditFormSettings EditFormType="Template" ColumnNumber="3" CaptionFormatString="Add Manufacturer and Model"
                                                                        <FormTemplate> 
                                                                            <table id="tbl1Select" border="0"
                                                                                <tr> 
                                                                                    <td style="border: 0px"
                                                                                        Manufacturer: 
                                                                                    </td> 
                                                                                    <td style="border: 0px"
                                                                                        <asp:DropDownList Width="150px" CssClass="cssField" ID="ddlManufacturer" runat="server"
                                                                                        </asp:DropDownList> 
                                                                                    </td> 
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td style="border: 0px"
                                                                                        Model: 
                                                                                    </td> 
                                                                                    <td style="border: 0px"
                                                                                        <asp:TextBox ID="txtModel" CssClass="cssfield" runat="server"></asp:TextBox> 
                                                                                    </td> 
                                                                                </tr> 
                                                                            </table> 
                                                                            <table> 
                                                                                <tr> 
                                                                                    <td> 
                                                                                        <asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                                                                            CommandName="Cancel"
                                                                                        </asp:LinkButton> 
                                                                                        <asp:LinkButton ID="btnAdd" Text="Add" runat="server" CausesValidation="False" CommandName="Add"></asp:LinkButton> 
                                                                                    </td> 
                                                                                </tr> 
                                                                            </table> 
                                                                        </FormTemplate> 
                                                                        <EditColumn UniqueName="EditCommandColumn1"
                                                                        </EditColumn> 
                                                                    </EditFormSettings> 

 protected void radAddproducts_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Cancel") 
        { 
            e.Canceled = true
            radAddproducts.MasterTableView.ClearEditItems();  
        } 
 
        if (e.CommandName == "Add") 
        { 
 
            HiddenField hdnManufacturer; 
            if (e.Item is GridDataItem) 
            { 
                hdnManufacturer = (HiddenField)e.Item.FindControl("hdnmanufacturer"); 
            } 
            if (e.Item is GridEditFormItem) 
            { 
                DropDownList dlManufacturer =     (DropDownList)e.Item.FindControl("ddlManufacturer"); 
             
            } 
          
            
           
        } 
    } 

Umer
Top achievements
Rank 1
 answered on 09 Aug 2013
2 answers
170 views
Is there a "supports drag and drop" property?  I only want to show drop zone if the browser supports it.

Thanks,  Marty
moegal
Top achievements
Rank 1
 answered on 09 Aug 2013
3 answers
94 views

Hi,

I have used RadRotator as given in this demo.

http://demos.telerik.com/aspnet-ajax/rotator/examples/multiplescroller/defaultvb.aspx?#qsf-demo-source

  But it scroll for one time only. i need to scroll repeatedly.

Please let me know the solution.



Thanks,
Prasanna


Marin Bratanov
Telerik team
 answered on 09 Aug 2013
6 answers
379 views
Hi there

I have a grid where I want to hide/show certain columns before printing via a radbutton outside of the grid. 

I have used code from the forums to hide these columns and it works well

Protected Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
    For Each item As GridItem In RadGrid1.MasterTableView.GetItems(New GridItemType() {GridItemType.Pager, GridItemType.FilteringItem})
        item.Display = False
    Next
    RadGrid1.MasterTableView.GetColumn("Column1").Visible = True
    RadGrid1.MasterTableView.GetColumn("Column2").Visible = False
    RadGrid1.MasterTableView.GetColumn("Column3").Visible = False
End Sub

I also have client side code from the forums to print the grid, which also works well

   <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
    <script type="text/javascript">
 
        function getOuterHTML(obj) {
            if (typeof (obj.outerHTML) == "undefined") {
                var divWrapper = document.createElement("div");
                var copyOb = obj.cloneNode(true);
                divWrapper.appendChild(copyOb);
                return divWrapper.innerHTML
            }
            else
                return obj.outerHTML;
        }
 
        function PrintRadGrid() {
            var previewWnd = window.open('about:blank', '', '', false);
            var sh = '<%= ClientScript.GetWebResourceUrl(RadGrid1.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",RadGrid1.Skin)) %>';
        var shBase = '<%= ClientScript.GetWebResourceUrl(RadGrid1.GetType(),"Telerik.Web.UI.Skins.Grid.css") %>';
        var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link>";
        styleStr += "<link href = '" + shBase + "' rel='stylesheet' type='text/css'></link></head>";
        var htmlcontent = styleStr + "<body>" + getOuterHTML($find('<%= RadGrid1.ClientID %>').get_element()) + "</body></html>";
        previewWnd.document.open();
        previewWnd.document.write(htmlcontent);
        previewWnd.document.close();
        previewWnd.print();
 
        if (!$telerik.isChrome) {
            previewWnd.close();
        }
    }
 
 
    </script>
</telerik:RadCodeBlock>

However, if I try to trigger them from my button like so:

<telerik:RadButton ID="RadButton1" runat="server" Text="Print"  AutoPostBack="True" OnClick="RadButton1_Click" OnClientClicking="PrintRadGrid">
    </telerik:RadButton>

the client side event always gets fired first and so the columns are still displayed in the preview window, and when I go back to my actual page, the columns remain hidden in the grid (I would like them to go back to the way they were on the actual page)

Please could someone tell me how to get all these things to work?
I know I have probably made a stupid mistake somewhere along the line but I am a bit of a newbie girl so please be gentle

Any help greatly appreciated :-)
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Aug 2013
1 answer
68 views
Trying to implement the RadRotator and use RadButtons to navigate through the slideshow however can't seem to get them to work.  When using the buttons the Rad control automatically puts in additional buttons along the side.  If I use the Links (<a href>) and click next it will navigate to the next page ok but doesn't get beyond that. 

I have 20 some pages that I would like to navigate through. 

Can someone point me in the right direction or tell me what I am doing wrong?

<telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="XmlDataSource1"
                   Width="610px" Height="800px" ScrollDuration="2000"
                   FrameDuration="2000" RotatorType="Buttons"
                   BorderColor="#bfd8e8" BorderWidth="1"
                   ScrollDirection="Left,Right" WrapFrames="false"
                   >
               <ItemTemplate>
                   <table width="610">
                       <tr><td><p><asp:Label ID="PersonName" runat="server"><%# XPath("ImageText")%></asp:Label></p></td></tr>
                       <tr><td>
                           <telerik:RadButton ID="_leftBtn" runat="server" Text="Previous">
                           </telerik:RadButton>
                           <telerik:RadButton ID="_rightBtn" runat="server" Text="Next">
                           </telerik:RadButton>     
                           <a href="#" id="leftBtn" title="Rotate Left" class="leftButton">Previous</a><a href="#" id="rightBtn" title="Rotate Right" class="rightButton">Next</a>                     
                       </td></tr>
                       <tr><td>
                           <asp:Image ID="CustomerImage" runat="server" AlternateText="Customer image" ImageUrl='<%# XPath("ImageUrl") %>' CssClass="personImage"></asp:Image>
                       </td></tr>
                   </table>
               </ItemTemplate>
               <ControlButtons LeftButtonID="leftBtn" RightButtonID="rightBtn"></ControlButtons>
           </telerik:RadRotator>
Marin Bratanov
Telerik team
 answered on 09 Aug 2013
1 answer
47 views
Hi,
  
We have developed a .Net application using Telerik controls like date picker,rad combo box,etc.
When we host this application in the local its working fine but when we host it in the windows 2008 server(both through package and Code),the aspx pages are loading properly but the Telerik controls are not getting loaded.
Please peovide me a solution to overcome it.
  
Thanks in advance
dinesh
Plamen
Telerik team
 answered on 09 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?