Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
465 views
Hi,

How can I get the selected cell value from this event in JS? Seems like this should be documented in the manual, but I am not seeing it.

I tried this (after looking at other threads):

function Test_OnCellSelected(sender, args) {
    var gridDataItem = args.get_gridDataItem();
    var cell = gridDataItem.get_cell();
}

But i get "Microsoft JScript runtime error: 'undefined' is null or not an object" for the get_cell().

Thanks
kernelk
Top achievements
Rank 1
 answered on 09 Aug 2013
3 answers
154 views
I have 3 RadMaskedTextBox controls in a web user control. I want to use a client side java script function to clear any entered data on a button click. I use
var maskedTextBox = document.getElementById('<%=uxPhoneNumber.FindControl("uxAreaCode").ClientID %>');
if (maskedTextBox != null) {
    maskedTextBox.set_value("");
}
to find the controls (just showing the first control), and that is returning an HTMLelement object. When I try to use either the get_value(), or set_value() methods I get a JavaScript runtime error such as, "0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'set_value'". What am I doing wrong?
A2H
Top achievements
Rank 1
 answered on 09 Aug 2013
2 answers
78 views
Hello everyone,
I have enabled grouping in my radscheduler, so when I move appointment to another column I need to get it resource key. In RadScheduler1_AppointmentUpdate I have the same Resource key both for Appointment and ModifiedAppointment. I tried to add actual Resource key from get_targetSlot() as custom attribute for appointment, but it also unavailable on the server side. What is the correct way to pass actual resource key for moved  appointment?

Thanks
Vadim
Top achievements
Rank 1
 answered on 09 Aug 2013
1 answer
82 views
Hey, 

I have a RadGrid that I wanted to ajaxify, so I put a RadAjax panel around the radgrid.  This causes the RadGrid to be ajaxified.  Every row of this RadGrid has a radgrid itself, and some usercontrols in another cell.  When I update the model of the radgrid inside the radgrid, the grids aren't updated through ajax, but cause a full postback instead.  The same is for the user controls inside the radgrid.  Any easy way to make the inside radgrid's update through ajax as well as the parent radgrid?  

Let me know if some code would be better to look at.

Thanks
Konstantin Dikov
Telerik team
 answered on 09 Aug 2013
0 answers
89 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
255 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
314 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
337 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
277 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
191 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?