Telerik Forums
UI for ASP.NET Core Forum
2 answers
158 views
I have a RadDatePicker inside of a Form Template.  I can access the dbselected value from code behind, though I want to take the month and day of the dbselected value and populate an asp:textbox with the month, and a RadNumericTextBox with the day.

 

The structure is

1. RadGrid

2. MasterTableView

3. EditFormSettings

4. Form Template

5. Then tables/rows/cells containing labels, textboxes, etc.

 

From code behind I can access all the asp and telerik items in the tables and retrieve any data for further use in my application by using the following code:

 

If e.CommandName = RadGrid.UpdateCommandName Then
            If TypeOf e.Item Is GridEditFormItem Then
                Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
                Dim theClient As TextBox = DirectCast(item.FindControl("txtClient"), TextBox)
                Dim theOrder As TextBox = DirectCast(item.FindControl("txtOrder"), TextBox)
              
  Dim theRadDateOrder As RadDatePicker = DirectCast(item.FindControl("RadDatePickerOrderDate"), RadDatePicker)

                etc.


I now have the value from the dbSelectedDate:

                Dim theDateOrderDate As DateTime = theRadDateOrder.DbSelectedDate
                Dim theDateOrderMonth As String = theDateOrderDate.ToString("MMMM")
                Dim theDateOrderDay As String = theDateOrderDate.Day

And I now have a month and I have a day broke out.

Now within the form template is an asp:textbox that I want to update/insert/place the month value into.  I also have  a RadNumericTextBox that I want to update/insert/place the day value into.

What I want to do is update the month and day on the form when the date is selected with the RadDatePicker.

All the above was figured out by searching the internet and putting the pieces together. 

I have not been able to find even a starting point on my question, it may be in the above code, but I do not see it yet.

My question is how do I do this from code behind as I cannot access the controls directly as they are within the Form Template?

 

Thank you for your time.  Dale

 

 

Dale
Top achievements
Rank 1
 answered on 02 Dec 2016
1 answer
152 views

Previously the Telerik Control panel would update the asp core nuget package when I upgraded via the control panel (I originally purchased the MVC suite prior to ASP Core being a separate product).  As of the last update or so the core nuget package is not installed and I have to go to the download page at Telerik to get it via the independent installer.  Am I doing something wrong or is the MVC Core package not available through the control panel?

 

 

Nikolay Mishev
Telerik team
 answered on 30 Nov 2016
1 answer
216 views

I just upgraded my MVC ASP.NET Core project from Visual Studio 2015 to 2017...I have been using it for the past couple of days...and now this item shows in my Error List....Do you know what this means or how it can be resolved?

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorFailed to retrieve information from remote source 'https://nuget.telerik.com/nuget/FindPackagesById()?id='Microsoft.NET.Sdk.Web''.
Response status code does not indicate success: 401 (Please provide Authorization headers with your request.).0

 

Thanks,

Les

Nikolay Mishev
Telerik team
 answered on 23 Nov 2016
2 answers
138 views

Microsoft just released 1.1 for Core and EntityFrameworkCore.

 

Just wanted to check if UI for Core is compatiable ?

 

any known issues?

 

Rumen
Telerik team
 answered on 23 Nov 2016
5 answers
233 views

A couple of items:
1. Can a separate Thread/Topic for "MediaPlayer" be set up  in "aspnet-core-ui"?
2. I find that the Source does not appear to work...(ie. localhost under  wwwroot)

   I have tried the following variations in the code below (the source to youtube works) ... any recommendations?

                .Source( "assets/Videos/MyVideo.mp4")  

                .Source( "~/assets/Videos/MyVideo.mp4")  

                .Source( "~assets/Videos/MyVideo.mp4")  

    @(Html.Kendo().MediaPlayer()
            .Name("mediaPlayer")
            .AutoPlay(true)
            .Navigatable(true)
            .Media(m => m
                .Title("Recap of Progress Ringing The Bell at Nasdaq (2016)")
                .Source( "~/assets/Videos/MyVideo.mp4")            
            )
            .HtmlAttributes(new { style = "height:360px" })
            .Deferred()
    )

Eyup
Telerik team
 answered on 22 Nov 2016
1 answer
108 views

We are trying to add extra data to a grid via an onscroll listener.
This works when the data is filtered or sorted, but not when grouped.
Below is the code we currently have that is called when new data is needed.

 

var grid = $("#grid").data("kendoGrid");
var parameterMap = grid.dataSource.transport.parameterMap;       
var requestObject = parameterMap({ aggregate:grid.dataSource.aggregate(),sort: grid.dataSource.sort(), filter: grid.dataSource.filter(), group: grid.dataSource.group(), page: pagina, pageSize:grid.dataSource.pageSize() });

$.post('@Url.Action("GetAllOffers_Post", "Offer")', requestObject, function (response) {
           try {
                grid.dataSource.pushCreate(response.Data); //Works for non-grouped data
            } catch (err) {
                console.log(err);
                try {

                    //Data is grouped when we end up here
                    //var data = grid.dataSource.schema.parse(response.Data);
                    //Array.prototype.push.apply(grid.dataSource.options.schema.groups, response.Data); //API said we could use the schema.parse but that doesn't work nor does the schema.groups since grid.dataSource.schema doesn't exist
                } catch (errortwee) {
                    console.log(errortwee);
                }
            }

Ianko
Telerik team
 answered on 17 Nov 2016
1 answer
1.5K+ views

I have basically copied the demo on your site...but I get the following error...any recommendations?

My grid populates, but when I press the Export To Excel button in the grid, nothing happens...

When I inspect my browser I get the following:
SCRIPT5022: JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.
kendo.all.js (11412,31)

-------------------------------

I have tried adding the following suggestion from the link, but that does not work

JSZip
To take full advantage of the Excel export feature, download the JSZip library and include the file before the Kendo UI JavaScript files, as shown below.
EXAMPLE
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script><script src="http://cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.js"></script><script src="http://kendo.cdn.telerik.com/2016.3.1028/js/kendo.all.min.js"></script>
JSZip is part of the Kendo UI distribution and is also available via the Kendo UI CDN:
<script src="http://kendo.cdn.telerik.com/2016.3.1028/js/jszip.min.js"></script>

 

 

------------------------------

@model IEnumerable<Areas.Name.Models.TransactionName>

<h2>Grid</h2>

@(Html.Kendo().Grid<Areas.Name.Models.TransactionName>()
        .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(c => c.LastName);
                    columns.Bound(c => c.FirstName);
                    columns.Bound(c => c.MiddleName1);
                })

        .BindTo(Model)
        .ToolBar(tools => tools.Excel())
        .Excel(excel => excel
            .FileName("Products.xlsx")
        )
        .Deferred()
        )

@* All initialization scripts are rendered to the bottom of the page, see Layout.cshtml *@
@section scripts {
    @Html.Kendo().DeferredScripts()
}

Kiril Nikolov
Telerik team
 answered on 14 Nov 2016
1 answer
213 views

Hi,

I'm trying to change the format  for the filter for a date  (datepicker in the filterRow  from  "MM/d/yyyy"   to "yyyy-MM-dd"

I attached  a screenshot of the result I'm getting

The filter format is "MM/d/yyyy"    and my column format is "yyyy-MM-dd" (set by .Format("{0:yyyy-MM-dd}") )

 

I want the format to be same for both filter  and column data  -  i.e "yyyy-MM-dd"

Column options:
 
 columns.Bound(c => c.DateInvitation)
             .Title("Date invitation/rappel")
             .Format("{0:yyyy-MM-dd}")
             .Width(150)
             .Filterable(f => f.Cell(c => c.ShowOperators(false).BindTo(Enumerable.Empty<string>())));
 
grid options:
 
 .Filterable(ftb => ftb.Mode(GridFilterMode.Row)).Filterable()

Marin
Telerik team
 answered on 11 Nov 2016
2 answers
160 views

The checked things in the Grid has to be shown in te CheckBoxList.

In one click on the button everything what has been checked in the grid has to be shown on the CHeckboxlist2.

I made something but its not completed, what do I have to do next?

 

   <asp:Panel runat="server" ID="pnlSource">
                          
                    

                         
                          <telerik:RadGrid ID="ChangedList" runat="server" AutoGenerateColumns="false" OnPageIndexChanged="ChangedList_PageIndexChanged" OnNeedDataSource="ChangedList_NeedDataSource" GridLines="None" AllowPaging="true" RenderMode="Lightweight" PageSize="5" AllowSorting="True">
                <MasterTableView ClientDataKeyNames="Logging_ID" backcolor="PaleGreen"  ForeColor="black" BorderStyle="Solid" BorderColor="Green" AlternatingItemStyle-BackColor="MediumSeaGreen"   PagerStyle-BackColor ="LawnGreen"   HeaderStyle-ForeColor="green" HeaderStyle-BorderColor="Crimson">
                      
                    <Columns> 

                        
                         <telerik:GridCheckBoxColumn UniqueName="GridCheckBoxColumn" DataField="IsTrue">
            </telerik:GridCheckBoxColumn>   
                          
                      
                        
                        <telerik:GridBoundColumn DataField="ModuleName" HeaderText="Naam"  UniqueName="ModuleName" ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="AssemblyVersion" HeaderText="Versie" UniqueName="AssemblyVersion" ReadOnly="true">
                        </telerik:GridBoundColumn>

                        
                     
                    </Columns>
                </MasterTableView>
               <ClientSettings EnableRowHoverStyle="true" >
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
            </telerik:RadGrid>
                         <br />       
                <div class="col-md-1" >
                    <asp:Button ID="ButtonALL" runat="server"  Text="Update"  OnClick="ButtonALL_OnClick"   />
                </div>




     

                 
                        
                        
                   
           
                      
                     <asp:Panel runat="server" ID ="pnlSourceNoItems">
                   <%--  //   <asp:Label runat="server" Text="Er zijn geen wijzigingen geconstateerd"/>--%>
                    </asp:Panel>
                     </div>
                </div>
                       
                <div class="col-md-1">
                    <h3>==></h3><asp:Button ID="btnUpdate" runat="server" Text="Update"  OnClick="btnUpdate_OnClick"  meta:resourcekey="btnUpdateResource1" />
                </div>

                <div class="col-md-6">
                    <div class="row">
                        <div class="col-md-6">
                            <h3>Websites</h3>
                        </div>
                        <div class="col-md-6">
                            <asp:DropDownList runat="server" id="ddWebserver" AutoPostBack="True"  OnSelectedIndexChanged="ddWebserver_OnSelectedIndexChanged"/>
                        </div>
                    </div>
                    
                    
                    
                 
                    <div style="border: black; border-width: 1px; border-style: solid; overflow: scroll; height:300px">
                        <asp:Panel runat="server" ID="pnlTarget">
                        <asp:CheckBoxList ID="CheckBoxList2" runat="server" meta:resourcekey="CheckBoxList2Resource1">
                            </asp:CheckBoxList>

                        </asp:Panel>
                        <asp:Panel runat="server" ID="pnlNoItems">
                            <asp:Label runat="server" Text="Er zijn geen webs waar de update kan worden toegepast" />
                        </asp:Panel>
                    </div>

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

        protected void ButtonALL_OnClick(object sender, EventArgs e)
        {

            ButtonALL.BackColor = System.Drawing.Color.PaleGreen;
            ButtonALL.BorderColor = System.Drawing.Color.Green;
            ButtonALL.ForeColor = System.Drawing.Color.Black;
            if (ButtonALL.Text == "Update")
            {

                ButtonALL.Text = "Updated";
            }
            else
            {

                ButtonALL.Text = "Update";
            }

            {
                foreach (GridItem item in ChangedList.MasterTableView.Items)
                {
                    GridDataItem dataitem = (GridDataItem)item;
                    TableCell cell = dataitem["GridCheckBoxColumn"];
                    CheckBox checkBox = (CheckBox)cell.Controls[0];
                    if (checkBox.Checked)
                    {
                        string value = dataitem.GetDataKeyValue("Logging_ID").ToString(); //Access the checked row using DataKeyNames
                        

                    }
                }

            }
        }
    

 

 

Viktor Tachev
Telerik team
 answered on 09 Nov 2016
1 answer
334 views

Hello,

I am trying to list for asp.net core and I get the following null reference exception.

NullReferenceException: Object reference not set to an instance of an object. 

Please find the stack trace attached. I tried attaching sample project but it wouldn't allow me.

I have spent a lot of time trying to figure out but failed. I am not sure if I am missing anything.

Any ideas or suggestions on how I can resolve this issue is really appreciated.

 

Thanks,

 

Uday
Top achievements
Rank 1
 answered on 07 Nov 2016
Narrow your results
Selected tags
Tags
+? 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?