Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
146 views
How to update datasource of dropdownlist(without losing data which is present inside rag grid from) in rag grid based on index change of dropdown list which is present outside the radgrid?
rajat
Top achievements
Rank 1
 asked on 19 Sep 2017
2 answers
703 views
Hi,

In my Radgrid, i have a dropdownlist inside EditItemTemplate.

On change of ddlAxis, depending on its value i want to enable/disable cbIsSameAxis using javascript. Below is the code.

Pls suggest how to do this.
 
<telerik:GridTemplateColumn UniqueName="tcAxis" HeaderText="Axis">
                                                           <ItemTemplate>
                                                               <asp:Label ID="lblAxis" runat="server"></asp:Label>
                                                           </ItemTemplate>
                                                           <EditItemTemplate>
                                                               <asp:DropDownList ID="ddlAxis" runat="server">
                                                                   <asp:ListItem Text="--Select--" Value="--Select--"></asp:ListItem>
                                                                   <asp:ListItem Text="PrimaryB" Value="PrimaryB"></asp:ListItem>
                                                                   <asp:ListItem Text="PrimaryT" Value="PrimaryT"></asp:ListItem>
                                                                   <asp:ListItem Text="SecondaryT" Value="SecondaryT"></asp:ListItem>
                                                                   <asp:ListItem Text="SecondaryB" Value="SecondaryB"></asp:ListItem>
                                                               </asp:DropDownList>
                                                               <asp:RequiredFieldValidator ID="rfvAxis" runat="server" ErrorMessage="*" ControlToValidate="ddlAxis"
                                                                   InitialValue="--Select--"></asp:RequiredFieldValidator>
                                                           </EditItemTemplate>
                                                       </telerik:GridTemplateColumn>
                                                       <telerik:GridTemplateColumn UniqueName="tcIsSameAxis" HeaderText="Is Same Axis">
                                                           <ItemTemplate>
                                                               <asp:CheckBox ID="cbIsSameAxisDisplay" runat="server" Enabled="false" />
                                                           </ItemTemplate>
                                                           <EditItemTemplate>
                                                               <asp:CheckBox ID="cbIsSameAxis" runat="server" />
                                                           </EditItemTemplate>
                                                       </telerik:GridTemplateColumn>
rajat
Top achievements
Rank 1
 answered on 19 Sep 2017
0 answers
154 views

Aspx :

<telerik:GridDateTimeColumn DataField="StartDateTime" HeaderText="Start" DataType="System.DateTime" PickerType="DateTimePicker" />

 

VB :

Dim dteFrom As RadDateTimePicker = CType(item("StartDateTime").Controls(0), RadDateTimePicker)
 
dteFrom.SharedTimeView.TimeFormat = GetShortTimeFormat()
dteFrom.TimeView.TimeFormat = GetShortTimeFormat()
dteFrom.DateInput.DateFormat = GetShortDateFormat() + " " + GetShortTimeFormat()
dteFrom.DateInput.DisplayDateFormat = GetShortDateFormat() + " " + GetShortTimeFormat()
 
dteFrom.SharedTimeView.Interval = New TimeSpan(0, 15, 0)
dteFrom.SharedTimeView.Columns = 8

 

The Time Picker appears as a huge list of 8 x 12 times for selection.

Is there an option to have a Hour selector, and a Minute selector?

Seems there is a workaround for a RadDateTimePicker :

    http://www.telerik.com/forums/raddatetimepicker-select-seperate-hours-and-time

How can I hook this into the GridDateTimeColumn?

 

Ben
Top achievements
Rank 1
 asked on 19 Sep 2017
0 answers
54 views
I have a fairly standard grid, nothing fancy. My company made our own custom control derived from the RadGrid. So the example I'm providing will reflect that. 

<Efficio:EfficioGridView runat="server" ID="grdIncrease" AllowSorting="True" RetainDataInViewState="True">
    <MasterTableView Width="100%">
        <Columns>
            <Efficio:EfficioGridTemplateColumn HeaderText="Account" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" SortExpression="AdvertiserName">
                <ItemTemplate>
                    <asp:HyperLink CssClass="ListLineCEL" ID="lnkAdvertizer" NavigateUrl='<%# "/Efficio/Account/AccountSummary.aspx?aid=" + DataBinder.Eval(Container.DataItem, "advertiserguid") %>' Text='<%# DataBinder.Eval(Container.DataItem, "advertisername") %>' runat="server" />
                </ItemTemplate>
            </Efficio:EfficioGridTemplateColumn>
            <Efficio:EfficioGridTemplateColumn HeaderText="This Year" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" SortExpression="ThisYearAmount" DataType="System.Int32">
                <ItemTemplate>
                    <%# Common.Utilities.FormatMoney(Convert.ToString(DataBinder.Eval(Container.DataItem, "ThisYearAmount")), true)%>
                </ItemTemplate>
            </Efficio:EfficioGridTemplateColumn>
            <Efficio:EfficioGridTemplateColumn HeaderText="Last Year" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" SortExpression="LastYearAmount" DataType="System.Int32">
                <ItemTemplate>
                    <%# Common.Utilities.FormatMoney(Convert.ToString(DataBinder.Eval(Container.DataItem, "LastYearAmount")), true)%>
                </ItemTemplate>
            </Efficio:EfficioGridTemplateColumn>
            <Efficio:EfficioBoundDifferenceColumn HeaderText="$ Diff" DataField="DiffAmount" SortExpression="DiffAmount" DifferenceType="Money" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataType="System.Int32">
            </Efficio:EfficioBoundDifferenceColumn>
            <Efficio:EfficioBoundDifferenceColumn HeaderText="% Diff" DataField="PercentAmount" SortExpression="PercentAmount" DifferenceType="Percentage" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataType="System.Int32">
            </Efficio:EfficioBoundDifferenceColumn>
        </Columns>
    </MasterTableView>
</Efficio:EfficioGridView>

In my code behind, I'm using mobile detection and enabling all the standard stuff for frozen columns:

if (State.IsMobileDevice(Page.Request.UserAgent))
{
    grdIncrease.ClientSettings.Scrolling.AllowScroll = true;
    grdIncrease.ClientSettings.Scrolling.UseStaticHeaders = true;
    grdIncrease.ClientSettings.Scrolling.FrozenColumnsCount = 1;
    grdIncrease.MasterTableView.TableLayout = GridTableLayout.Fixed;
    grdIncrease.HeaderStyle.Width = 200;
}

The end result is this. The scrollbar at the bottom scrolls through the locked columns as expected. But when I drag or swipe within the grid body, the static headers don't move at all and the frozen columns do not stay frozen. Its like the grid content is scrolling around in the direction I drag or swipe my finger and does not stay lined up with the headers at all. 

Thomas
Top achievements
Rank 1
 asked on 18 Sep 2017
0 answers
135 views

I am seeing this error message when I run my Visual Studio 2015 web application, plus several of my web controls are not recognized element when I drag and drop them on my page.  Error message is

There was a conflict between "Telerik.Web.UI, Version=2012.3.1308.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" and "Telerik.Web.UI, Version=2015.1.401.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

What is the proper way to correct this situation?

 

Perry
Top achievements
Rank 1
 asked on 18 Sep 2017
5 answers
189 views

I have a grid which use Header Context Menu. Filtering option is not working with DateTime Fields

 

<telerik:RadGrid RenderMode="Lightweight" ID="itinerariosGrid" runat="server" AutoGenerateColumns="False" EnableEmbeddedSkins="false" Skin="telerikbootstrap"
                    AllowFilteringByColumn="True" AllowSorting="True" AllowPaging="True" Culture="es-MX" FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true"
                    AllowMultiRowSelection="True" AllowAutomaticUpdates="False" AllowAutomaticInserts="False" OnItemDataBound="itinerariosGrid_ItemDataBound"
                    OnNeedDataSource="itinerariosGrid_NeedDataSource" AllowAutomaticDeletes="false" EnableLinqExpressions="false"            
                    OnInsertCommand="itinerariosGrid_InsertCommand" OnUpdateCommand="itinerariosGrid_UpdateCommand" OnDeleteCommand="itinerariosGrid_DeleteCommand">

Eyup
Telerik team
 answered on 18 Sep 2017
3 answers
185 views
I have a RadListView that is paged by a RadDataPager. The ListView is loaded correctly on the initial page load. After that the needdatasource method correctly retrieves the next set of results, but they are never displayed. From my investigation, it appears that it is related to the fact that the listview always has a page count of 1 while the datapager correctly calculates 2(13 items, with a page size of 10). The list view changes page index correctly, which retrieves the next page of results to set for the datasource. After setting the datasource the new items are never displayed. I am doing something very similar to the listview image gallery demo, so if it at least tried to add the new images and failed, I should get broken image links.  I think the listview is skipping binding the new results, since the list view thinks its out of its page range. Its worth noting we are using the 2013 Q2 controls, since this is new work for a customer with an existing site. We want to avoid updating versions to limit risk to the rest of the site.

<telerik:RadListView runat="server" ID="ImageGalleryDisplay" OnNeedDataSource="ImageGalleryDisplay_NeedDataSource" OnItemCreated="RadListView1_ItemCreated"
                AllowPaging="true" ItemPlaceholderID="ImagePlaceHolder" OnItemDataBound="RadListView_ItemDataBound">
                    <LayoutTemplate>
                       <asp:PlaceHolder ID="ImagePlaceHolder" runat="server">
                       </asp:PlaceHolder>
                       <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="ImageGalleryDisplay"
                        PageSize="10">
                        <Fields>
                            <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                        </Fields>
                        </telerik:RadDataPager>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("ImageURL")%>' />
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <asp:Image ID="Image2" runat="server" ImageUrl='<%#Eval("ImageURL")%>' />
                    </AlternatingItemTemplate>
                </telerik:RadListView>      


protected void ImageGalleryDisplay_NeedDataSource (object source, RadListViewNeedDataSourceEventArgs e)
            {           
            _photos = new List<Photo> ();
            LoadData ();
            ImageGalleryDisplay.DataSource = _photos;
            }

        protected void LoadData ()
            {         
            //dataSearch is our own special search type that returns a datatable and estimated hit count, they return the correct values

            DataTable fileIds = dataSearch.Retrieve<DataTable> (ImageGalleryDisplay.CurrentPageIndex * ImageGalleryDisplay.PageSize + 1, ImageGalleryDisplay.PageSize);
            ImageGalleryDisplay.VirtualItemCount = dataSearch.EstimateHitCount > 0 ? dataSearch.EstimateHitCount : 0;

            foreach (DataRow row in fileIds.Rows)
                {
                int id = Convert.ToInt32 (row["fileId"].ToString ());

                Photo photo = new Photo (id, String.Format("Handlers/ImageHandler.ashx?id={0}&height=100&width=100",id));
                _photos.Add (photo);
                }
            }

        protected void RadListView_ItemDataBound (object sender, RadListViewItemEventArgs e)
            {
            if (e.Item is RadListViewDataItem)
                {
                var dataItem = ((RadListViewDataItem)e.Item).DataItem;

                }
            }

        protected void RadListView1_ItemCreated (object sender, RadListViewItemEventArgs e)
            {
            if (e.Item is RadListViewDataItem)
                {
                Image img = e.Item.FindControl ("image1") as Image;
                }
            }

        protected void Comand2 (object sender, RadListViewPageChangedEventArgs e)
            {
            ImageGalleryDisplay.CurrentPageIndex = e.NewPageIndex;
            string i = ImageGalleryDisplay.PageCount.ToString();
            }


khadeer
Top achievements
Rank 1
 answered on 18 Sep 2017
1 answer
95 views

Hello,

i created a grid with multi-line footer according to this example:

http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/totals-in-grid-footers

and added an excel export according to this tutorial:

http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/exporting/overview

but opening the extracted xls file file i see footer data messed up with values concatenated in a single cell.

How to get a proper xls extraction?

Regards.

DrGiorgini
Top achievements
Rank 1
 answered on 18 Sep 2017
1 answer
70 views

I am using RadListView and trying to bind the ItemTapped to my MVVM.

I can't seem to get this to work.  I can't find any examples online either.  

 

Thanks in advance.

Will

wil
Top achievements
Rank 1
 answered on 18 Sep 2017
0 answers
42 views

Hi, we are consdiering purchasing your UI for ASP.net packages.

I reviewed your ASP.net AJAX demo and came across the image editor control which seems like a control we would like to use and customize.

I saw there is an option to draw circles/rectangles, is there an option to edit their coordinates after they are drawn? is there an option to draw programmatically?

Thanks,

 

Oren

Oren
Top achievements
Rank 1
 asked on 17 Sep 2017
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?