Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
66 views
While dragging one list item from one list box to another, one tooltip is shown just below the mouse pointer till it's dropper. I need to remove this tooltip. Any help would be appreciated.
sanjay
Top achievements
Rank 1
 asked on 22 Feb 2018
1 answer
218 views

I am trying to update a RadLabel control that is inside of a RadlistView which is inside of a RadAjaxPanel.  I have a user control on my aspx page that calls a public event handler when a modal on the user control closes.  I can access the RadLabel, but it doesn't update.

Here is my HTML:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" BackColor="White">
                <div class="form-group">
                        <asp:RadioButtonList ID="radioChoice" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" CssClass="inline-rb" OnSelectedIndexChanged="radioChoice_SelectedIndexChanged">
                            <asp:ListItem Value="Multiple" Text="Multiple Record Report" Selected="True" />
                            <asp:ListItem Value="Single" Text="Single Record Report" />
                        </asp:RadioButtonList>
                    </div>
                <asp:HiddenField runat="server" ID="panelCollapse" ClientIDMode="Static" />
                <asp:HiddenField runat="server" ID="SelectedItem" />
                <hr />
                <telerik:RadListView runat="server" ID="radlistview1" OnItemDataBound="radlistview1_ItemDataBound" EnableViewState="false">
                    <ItemTemplate>
                        <div class="panel panel-default">
                            <div class="panel-heading" style="border:none; padding:0px !important">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse" href="#pnl<%#Eval("ModuleDataKey") %>" rel="popover" data-placement="top" data-content="Click to expand/collapse report list" data-trigger="hover"><i class="s7-plus"></i></a>&nbsp;<%#Eval("ModuleDataKey") %>
                                </h4>
                            </div>
                            <div id='pnl<%#Eval("ModuleDataKey") %>' class="panel-collapse collapse">
                                <div class="panel-body" style="padding:0px !important 10px 0px 10px">
                                    <div runat="server" id="divNoResults" style="background-color:#ED4B4B;color:white" visible="false"><asp:PlaceHolder ID="noResults" runat="server"></asp:PlaceHolder> </div>
                                    <div class="panel panel-alt3 panel-transparent" style="padding: 0px !important">
                                        <div class="panel-heading panel-heading-cg" style="overflow:visible">
                                            <div class="input-group">
                                                <span runat="server" class="media" id="spFilter" visible='<%# DataBinder.Eval(Container.DataItem, "ModuleDataKey").ToString().ToLower() == "activity" ? false : true %>'>
                                                    <button type="button" data-toggle="dropdown" title="Filter List" class="btn btn-alt3"  id="btnFilter" runat="server"><i class="icon icon-left s7-filter"></i><span class="caret"></button>
                                                    <ul role="menu" class="dropdown-menu">
                                                        <li runat="server" id="btnCustomFilter"><asp:LinkButton runat="server" ID="lnkCustom" OnClick="customFilterLink_ServerClick" OnClientClick="javascript:OpenFilterModal();" >Custom</asp:LinkButton></li>
                                                        <li class="divider"></li>
                                                        <asp:PlaceHolder runat="server" ID="hldFilters"></asp:PlaceHolder>
                                                    </ul>
                                                </span>
                                                <span id="ddlLists" runat="server" visible="false" style="display:inline" >
                                                    <span runat="server"  id="spJobDropDown" visible='<%# DataBinder.Eval(Container.DataItem, "ModuleDataKey").ToString().ToLower() == "job" ? true : false %>'>
                                                        <telerik:RadComboBox DropDownAutoWidth="Enabled" RenderMode="Lightweight" ID="qfTicket_cmbJob" EmptyMessage="Type to Select..." runat="server" Width="500px" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnSelectedIndexChanged="qfTicket_cmbJob_SelectedIndexChanged" >
                                                            <WebServiceSettings Method="GetJobs" Path="~/Portal/Ajax/COGS.asmx" />
                                                        </telerik:RadComboBox>
                                                    </span>
                                                    <span runat="server" id="spTicketDropdown" visible='<%# DataBinder.Eval(Container.DataItem, "ModuleDataKey").ToString().ToLower() == "ticket" ? true : false %>'>
                                                        <telerik:RadComboBox DropDownAutoWidth="Enabled" RenderMode="Lightweight" ID="cmbTicket" EmptyMessage="Type to Select..." runat="server" Width="333px" ClientIDMode="Static" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnSelectedIndexChanged="cmbTicket_SelectedIndexChanged" AutoPostBack="true" >
                                                            <WebServiceSettings Method="GetTickets" Path="~/Portal/Ajax/COGS.asmx" />
                                                        </telerik:RadComboBox>
                                                    </span>
                                                </span>
                                                <span runat="server" id="spActivity" visible='<%# DataBinder.Eval(Container.DataItem, "ModuleDataKey").ToString().ToLower() == "activity" ? true : false %>'>
                                                    Asset&nbsp;&nbsp
                                        <asp:DropDownList runat="server" ID="ddlAssets" ForeColor="Black" Font-Size="Small"></asp:DropDownList>
                                           &nbsp;&nbsp; Date &nbsp;&nbsp;<i class="s7-date" style="font-size:x-large;display:inline"></i><asp:TextBox runat="server" ID="txtReportDate" ClientIDMode="Static" Font-Size="Small" ForeColor="Black" CssClass="datepicker" placeholder="m/d/yyyy" ></asp:TextBox>
                                                    </span>
                                            </div>
                                                <div runat="server" id="SelectedFilter" style="background-color:#fff2d7; color:black;padding-left:10px" ><telerik:RadLabel runat="server" ID="filterName" Font-Size="Small"></telerik:RadLabel></div>
                                        </div> 
                                        <div class="panel-body" style="padding-top:10px">
                                            <br />
                                            <asp:HiddenField ID="hfModule" Value='<%#Eval("ModuleDataKey") %>' runat="server" />
                                            <asp:PlaceHolder ID="phRow" runat="server"></asp:PlaceHolder>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ItemTemplate>
                </telerik:RadListView>
            </telerik:RadAjaxPanel>

 Here is my EventHandler:

        private void JobFilterControl_CustomJobFilterSaved(object sender, EventArgs e)
        {
            foreach (RadListViewItem item in radlistview1.Items)
            {
                string module = ((HiddenField)item.FindControl("hfModule")).Value;

                RadLabel filterName = item.FindControl("filterName") as RadLabel;

                switch (module)
                {
                    case "JOB":
                        filterName.Text = "Selected Filter: " + Session["SavedJobFilterName"].ToString();
                        break;
                    case "TICKET":
                        filterName.Text = "Selected Filter: All";
                        break;
                }
            }
        }

All of the code works as expected except that the Label Text does not update.  Is there anyting I can do to get this to work?  Any assistance is greatly appreciated.

Eyup
Telerik team
 answered on 22 Feb 2018
0 answers
44 views
I have a webdatagrid on the page. I have a BindingList full of custom objects. At runtime I set the datasource of the webdatagrid to the BindingList, and then I call DataBind().
When the page renders, there is nothing there, except when I look at View Source, I see all the items. They just don't show in the browser. What is going on?
Also, I don't know if it matters, but when I look at the View Source, I see a couple tables with style set to "visibility:hidden".
christinalevinee
Top achievements
Rank 1
 asked on 22 Feb 2018
0 answers
65 views

Hi,

I have written the following function to sort numbers in my Rad Grid. The output of this function shows up correctly when I push it in a array and view the result while debugging but when afte the dataBind event the data shows up in Grid, the data sort order is wrong.

For example: For Descending order sort of a:150,b:100,c:100 shows up in array while debug as b:100,c:100,a:150 but in grid it shows up as c:100,a:150,b:100.

Also, The data in dataItems of Radgrid while debug in rowDataBound event shows as a:150 b:100 a:150 and not b:100 c:100 a:150 after the sort.

Method:

//Ascending

var masterTable = sender.get_masterTableView();

var items = sender.get_masterTableView().get_dataItems()

var fieldName = args.get_commandArgument();

var sortOrder;
for (var i = 0; i < sortExpressions.get_count(); i++)
{
if (sortExpressions.getItem(i).get_fieldName() == fieldName)
{
sortOrder = sortExpressions.getItem(i).get_sortOrder();
}
}

if (sortOrder == 1) 

{
items.sort(function compareNumbers(a, b)
{
return Number(b._dataItem[fieldName]) - Number(a._dataItem[fieldName])

})
}

//Descending
else if (sortOrder == 2)
{
items.sort(function compareNumbers(a, b)
{
return Number(a._dataItem[fieldName]) - Number(b._dataItem[fieldName])

})
}

masterTable.dataBind()

}

Regards

Agasthya

agasthya
Top achievements
Rank 1
 asked on 22 Feb 2018
0 answers
78 views
Problem: The Select button in RadGridShapeInformation is clicked. The event SelectedIndexChanged fires.  In both my local system and the production set the textboxes in SelectedIndexChanged.
Local shows the correct values in the textbox on the web page.
Production show the original values.

Here is what I have:
Visual Studio 2017 Community Version
Telerik from 2015 – UI for ASP.NET AJAX

<asp:TextBox
    ID="TextBoxSelectedShape"
    runat="server"
    Width="30%"
    BorderStyle="None"
    Font-Size="Medium"
    ForeColor="White"
    Font-Bold="true"
    ReadOnly="True"
    BorderWidth="0px"
    BackColor="Blue"
    Text="--No Shape Selected--">
</asp:TextBox>

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyShapeAdmin" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGridShapeInformation">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="TextBoxSelectedShape" />
                <telerik:AjaxUpdatedControl ControlID="TextBoxErrorMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>


<telerik:radPageView ID="PageViewShapeInformation"
    runat="server"
    Width="100%">
    <br />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelShapeInformation" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanelShapeInformation"
        runat="server"
        LoadingPanelID="RadAjaxLoadingPanelShapeInformation">
        <telerik:RadGrid
           ID="RadGridShapeInformation" 
            runat="server"
            AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True"
            AllowFilteringByColumn="True"
            AllowPaging="True"
            AllowSorting="True"
            AutoGenerateColumns="False"
            AutoGenerateDeleteColumn="True"
            AutoGenerateEditColumn="True"
            DataSourceID="odsShapes"
            GroupPanelPosition="Top">
            <GroupingSettings CollapseAllTooltip="Collapse all groups" />
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <MasterTableView
                . . .
                <Columns>
                    <telerik:GridButtonColumn
                        CommandName="Select"
                        Text="Select"
                        UniqueName="Select">
                    </telerik:GridButtonColumn>
                . . .
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
</telerik:radPageView>




CODE
    Public Sub RadGridShapeInformation_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGridShapeInformation.SelectedIndexChanged
        myDebug.SetMessage("Entered Index Changed")
        Dim rg As RadGrid = CType(sender, RadGrid)
        Dim dataItem = TryCast(RadGridShapeInformation.SelectedItems(0), GridDataItem)
        If dataItem IsNot Nothing Then
            Patterns.DAL.MessageDAL.InsertMessage("Index Changed Shape Administration", "ENDING", SessionVariables.UserID)
            SetSelectedShapeID(dataItem("ShapeID").Text, dataItem("ShapeName").Text)
            Patterns.DAL.MessageDAL.InsertMessage(TextBoxShapeID.Text.ToString, "ENDING", SessionVariables.UserID)
            Patterns.DAL.MessageDAL.InsertMessage(TextBoxSelectedShape.Text, "ENDING", SessionVariables.UserID)
        Else
            ResetPage()
            Patterns.DAL.MessageDAL.InsertMessage("Index NOT Changed Shape Administration", "ENDING", SessionVariables.UserID)
        End If
    End



    Private Sub SetSelectedShapeID(pShapeID As String, pShapeName As String)
        If pShapeID.Length = 0 Then
            Me.TextBoxShapeID.Text = ""
            Me.TextBoxSelectedShape.Text = "--No Shape Selected--"
        Else
            Me.TextBoxShapeID.Text = pShapeID
            Me.TextBoxSelectedShape.Text = pShapeName
        End If
    End Sub
James
Top achievements
Rank 1
 asked on 21 Feb 2018
1 answer
208 views

The documentation says I can include more than the one column in the search of my DataTable by using the DataKeyNames property. Maybe I am not understanding but its not working. I have my DataTextField column set to "Name" and my DataKeyNames set to "Alias". I expected the search to go against the Name column and the Alias column but it seems to be only searching the Name column. 

Does not get any simpler scenario than this so I must not be understanding how DataKeyNames works.

DataTable columns: Id, Name, Alias

<telerik:RadSearchBox ID="requestSearchBox" runat="server" Width="400" CssClass="SearchBox" EnableAutoComplete="true"
                            DataValueField ="Id"
                            DataKeyNames= "Alias"
                            DataTextField="Name">
                        </telerik:RadSearchBox>

 

Brian

Vessy
Telerik team
 answered on 21 Feb 2018
0 answers
282 views

 

 
GRID : A
 
<telerik:RadGrid RenderMode="Lightweight" ID="ParkingLockSytemGrid" OnItemCommand="ParkingLockSytemGrid_ItemCommand" skin="Silk" runat="server" Width="800" PagerStyle-AlwaysVisible="true" OnNeedDataSource="ParkingLockSytemGrid_NeedDataSource" AllowSorting="true" AllowPaging="false" AllowFilteringByColumn="false">
 
       <MasterTableView AutoGenerateColumns="False" AllowAutomaticInserts="true"  DataKeyNames="ID"  CommandItemDisplay="Top" ShowHeader="true" EnableColumnsViewState="true"  PagerStyle-AlwaysVisible="true">
           <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="true" />
 
            
           <Columns>
 
               <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
               <ItemStyle Width="50px"></ItemStyle>
           </telerik:GridEditCommandColumn>
 
               <telerik:GridTemplateColumn UniqueName="ImageName" SortExpression="Name">
                   <ItemTemplate>
                     <img alt="" src="<%#Eval(" Icon ") %>" />
                   </ItemTemplate>
                   <EditItemTemplate>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
 
 
               <telerik:GridBoundColumn DataField="DeviceName" HeaderText="Device Name" SortExpression="DeviceName"
                   UniqueName="DeviceName">
               </telerik:GridBoundColumn>
 
               <telerik:GridBoundColumn DataField="ZoneName" HeaderText="Zone" SortExpression="Zone"
                   UniqueName="Zone">
               </telerik:GridBoundColumn>
 
                
 
               <telerik:GridBoundColumn DataField="GeneralState" HeaderText="State" SortExpression="State"
                   UniqueName="State">
               </telerik:GridBoundColumn>
 
               <telerik:GridButtonColumn Text="Delete" CommandName="Delete" />
 
 
           </Columns>
       </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true" AllowRowsDragDrop="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                   <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"></Selecting>
                   <ClientEvents OnRowDropping="demo.onRowDropping"></ClientEvents>
                   <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
               </ClientSettings>
       </telerik:RadGrid>
B
<telerik:RadGrid RenderMode="Lightweight" ID="ApplianceLogsGrid" runat="server" Skin="Silk" OnNeedDataSource="ApplianceLogsGrid_NeedDataSource" AllowSorting="true" AllowPaging="false">
   <MasterTableView ShowHeader="true" ShowHeadersWhenNoRecords="true" CssClass="table table-striped table-hover" AutoGenerateColumns="False" AllowPaging="false" DataKeyNames="EntityID" PageSize="7">
      <Columns>
         <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
         </telerik:GridEditCommandColumn>
         <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" SortExpression="UserName"
            UniqueName="UserName">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn DataField="Timestamp" HeaderText="Date Time" SortExpression="Date"
            UniqueName="DateTime">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn DataField="UserID" HeaderText="User ID" SortExpression="UserID"
            UniqueName="UserID">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn DataField="OperationName" HeaderText="Operation" SortExpression="Operation"
            UniqueName="LogOperation">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn DataField="Parameters" HeaderText="Log Description" SortExpression="Description"
            UniqueName="LogDescription">
         </telerik:GridBoundColumn>
         <telerik:GridButtonColumn Text="Delete" CommandName="Delete" />
      </Columns>
   </MasterTableView>
</telerik:RadGrid>

 

 

Here is event Code !

protected void ParkingLockSytemGrid_ItemCommand(object sender, GridCommandEventArgs e)
      {
         
 
 
              switch (e.CommandName)
              {
                  case "RowClick":
                      GridDataItem dataItem = e.Item as GridDataItem;
                      Response.Redirect("~/ParkDeviceDetails.ascx?id=" + dataItem["UniqueName"].Text);
                      break;
                  default:
                      break;
              }
 
 
 
           
 
      }

 

This does not work i get error : Cannot find a cell bound to column name 'UniqueName'
 i tried changing to ID or entityid but nothing !!, what am I doing wrong here , can somebody help? thanks

Bonge
Top achievements
Rank 1
 asked on 21 Feb 2018
0 answers
83 views

I want to create a team scheduler in  which will show:

1. Days for One  from .

2. Each as per user.

3. Weekends marked in .

4. Leaves marked in blue .

Please guide for the same.

 

abhijeet
Top achievements
Rank 1
 asked on 21 Feb 2018
0 answers
113 views
I have implemented the drag and drop row feature of telerik RadGrid. Now i have to comfirm/prompt user for drag and drop row action with some message like 'Are you sure to drag the selected row?'

I have implemented below two events for the same 

1) Client Side: 

function onRowDropping(sender, args) {

// some code to do something

}

2) Code behind:

protected void grd_RowDrop(object sender, GridDragDropEventArgs e)
{

// some code to do something

}

So, Please suggest how can we achieve this functionality.

1) Once user attempt to drag and drop the row, a confirmation popup should come.

2) If user confirm the action row should be dropped and re-ordered.

3) Else action should be reverted from client side itself.

 

Any help would be highely appriciated.

 

Thnaks,

Manish
Manish
Top achievements
Rank 1
 asked on 21 Feb 2018
0 answers
74 views
I have implemented the drag and drop row feature of telerik radgrid. Now i have to comfirm/prompt user for drag and drop row action with some message like 'Are you sure to drag the selected row?'

I have implemented below two events for the same 

1) Client Side: 

function onRowDropping(sender, args) {

// some code to do something

}?

2) Code behind:

protected void grd_RowDrop(object sender, GridDragDropEventArgs e)
{

// some code to do something

}

So, Please suggest how can we achieve this functionality.

1) Once user attempt to drag and drop the row, a confirmation popup should come.

2) If user confirm the action row should be dropped and re-ordered.

3) Else action should be reverted from client side itself.

 

Any help would be highely appriciated.

 

Thnaks,

Manish
Manish
Top achievements
Rank 1
 asked on 21 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?