Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
43 views
Hi,

if i go to the demo http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/paging/basic-paging/defaultcs.aspx , and I choose the pager mode to NextPrevNumericAndAdvanced , i have a strange behaviour.

In the field "page xxx of xxx",
if I enter a number from the keypad ==> it works
If i try to enter a number from the normal keyboard ==> do not work

same behavior with "page size"

I have a french keyboard. On the keyboard, I have to press the shift key to enter a number.
IE 11

Thanks for your help

Konstantin Dikov
Telerik team
 answered on 29 Jan 2015
1 answer
141 views
Hello I have the below code:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ImageSlider2.ascx.cs" Inherits="UserControls_ImageSlider2" %>

<asp:Panel id="ImageGalleryPnl" Visible="false" runat="server">
<telerik:RadImageGallery ID="RadImageGallery1" Width="350px" DisplayAreaMode="Image" LoopItems="true" runat="server" >
<ImageAreaSettings Height="250px" ShowDescriptionBox="false" />
<ThumbnailsAreaSettings Mode="ImageSlider" />
<ClientSettings AllowKeyboardNavigation="true">
</ClientSettings>
</telerik:RadImageGallery>

</asp:Panel>
<asp:Panel ID="MsgPnl" Visible="true" runat="server">
<asp:Label ID="lblMessage" Text="No images avaliable at this time" runat="server"></asp:Label>
</asp:Panel>

The imageGallery is in a ajax ModalPopupExtender. It is populated dynamically just before showing the popup as below:

Method: Grid_OnRowCommand:
rowIndex = Integer.Parse(e.CommandArgument) Mod grdLocations.PageSize
oRow = grdLocations.Rows(rowIndex)
grdLocations.SelectedIndex = rowIndex

Dim lblAddress As Label = oRow.FindControl("lblAddress1")
Dim lblCityState As Label = oRow.FindControl("lblCity")

Dim lblLocDescription As Label = oRow.FindControl("lblLocDescription")
lblModalInfo.Text = lblLocDescription.Text
sFullAddress = lblAddress.Text & " " & lblCityState.Text
lblModalFooter.Text = sFullAddress

ImageSlider1.showSlider(True)

ImgContent.Visible = False
Dim lblLocation As Label = oRow.FindControl("lblLocation")

ImageSlider1.sMSClient = _sMSClient
ImageSlider1.sLocation = lblLocation.Text
ImageSlider1.populateGallery()
ModalPopupExt1.Show()

The imageGallery works ok, I can navigate through all the images, but the first one is always showing in black after displaying the popup. If I move to next image and then back to the first I can see it. So it is loaded. It looks like it were inactivated or something.

Please advice.

Carlos

Viktor Tachev
Telerik team
 answered on 29 Jan 2015
1 answer
100 views
Hi

How to Implemented RadComboBox AutoCompleteBox using WebService in C#
any one guide me for this Process.
then any one do and post helpful for me.
Ivan Danchev
Telerik team
 answered on 29 Jan 2015
3 answers
198 views
Hello, good day,

I've been using the RadHtmlChart and I think it works great, there is an option that I can't find I hope you can help me, I have a line chart with 30+ different series, I've already changed the markers (I hope you add more like star, cross, diamond like RadChart) but the legends keep displaying a square, I would like to change the marker in legend to look like the triangle, square or circle of the corresponding series, but don't know where.

Thanks in advance,

Gabriel
Danail Vasilev
Telerik team
 answered on 29 Jan 2015
1 answer
218 views
I downloaded the latest ASP.NET Ajax controls last night and I'm trying to run a web project (asp.net 4.0) I inherited with an unknown version. I'm getting a run time error on this line:
 <telerik:ColumnSeries  Name="Current" Stacked="false" DataField="CurrPropValue1"   >

The 'DataField' property cannot be set declaratively.

This is on the RadHtmlChart control.
Danail Vasilev
Telerik team
 answered on 29 Jan 2015
1 answer
134 views
Here's the demo I saw, "Edit Form Types":

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx?skin=Glow

First, click the radio for "pop up" mode. Then, click "edit" on any row. You'll see a modal form with a dropdown on it. So far so good...

But clicking the dropdown reveals the dropdown's "option" list is z-index'ed behind the modal form - in fact, it's going to be part of what is greyed out from the grid behind the popup. User cannot click on the options (and here, cannot even see them); has to navigate down this list.

I tried IE 10 and also Chrome. Also, this will work in "inline" mode - but then, it would. Z-order *matters* on a popup.

I ran into the problem when doing the same sort of thing as on this demo. Since the demo is broken here, the sample code is just the code on Telerik's own demo.

-- D.R.
Viktor Tachev
Telerik team
 answered on 29 Jan 2015
1 answer
100 views
I have a RadGrid and I want to use one of the column to dynamically add new RadDock but nothing happened. I created a single asp:Button to test my FederationDetailBtnClick method which add dock correctly but the button from grid failed. Help needed!!!

aspx file:
<telerik:RadGrid ID="FederationGrid" runat="server"
        OnNeedDataSource="FederationGrid_NeedDataSource"
        OnItemCreated="FederationGrid_ItemCreated"
        OnItemDataBound="FederationGrid_ItemDataBound">
        <MasterTableView EnableHierarchyExpandAll="true" AutoGenerateColumns="False" TableLayout="Fixed" DataKeyNames="Id">
            <Columns>
                <telerik:GridBoundColumn DataField="Id" HeaderText="Federation Name" UniqueName="FederationId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn HeaderText="Federation Detail" Text="Detail" UniqueName="FederationDetail" ButtonType="PushButton">
                </telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel">
        <telerik:RadDockLayout runat="server" ID="RadDockLayout_Federation"
            OnSaveDockLayout="RadDockLayout_SaveDockLayout"
            OnLoadDockLayout="RadDockLayout_LoadDockLayout">
            <telerik:RadDockZone ID="RadDockZone_Federation" runat="server" Orientation="Horizontal">
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </telerik:RadAjaxPanel>

aspx.cs file:
private List<DockState> CurrentDockStates
        {
            get
            {
                // Store the info about the added docks in the session.
                List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStatesDeployment"];
                if (Object.Equals(_currentDockStates, null))
                {
                    _currentDockStates = new List<DockState>();
                    Session["CurrentDockStatesDeployment"] = _currentDockStates;
                }
                return _currentDockStates;
            }
            set
            {
                Session["CurrentDockStatesDeployment"] = value;
            }
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
             
        }
 
        protected void FederationGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            this.federationList = DataModelRequestHandler.GetFederationsAsync(this.environment);
            FederationGrid.DataSource = this.federationList;
        }
 
        protected void FederationGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataitem = (GridDataItem)e.Item;
                Button btn = (Button)dataitem["FederationDetail"].Controls[0];
                btn.Click += new EventHandler(FederationDetailBtnClick);
            }
        }
 
        protected void FederationGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataitem = (GridDataItem)e.Item;
                Button btn = (Button)dataitem["FederationDetail"].Controls[0];
                btn.CommandArgument = (e.Item as GridDataItem)["FederationId"].Text;
            }
        }
 
        protected void RadDockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e)
        {
            // Populate the event args with the state information. The RadDockLayout control
            // will automatically move the docks according that information.
            foreach (DockState state in CurrentDockStates)
            {
                e.Positions[state.UniqueName] = state.DockZoneID;
                e.Indices[state.UniqueName] = state.Index;
            }
        }
 
        protected void RadDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)
        {
            CurrentDockStates = RadDockLayout_Federation.GetRegisteredDocksState();
        }
 
        private void FederationDetailBtnClick(object sender, EventArgs e)
        {
            var btnView = (Button)sender;
            var FederationId = btnView.CommandArgument;
 
            // Create RadDock
            RadDock dock = this.CreateRadDock(FederationId);
            // Dock it on DockZone
            RadDockLayout_Federation.Controls.Add(dock);
            dock.Dock(RadDockZone_Federation);
        }
 
        private RadDock CreateRadDock(string dockTitle)
        {
            RadDock dock = new RadDock();
            dock.DockMode = DockMode.Docked;
            dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a");
            dock.ID = string.Format("RadDock{0}", dock.UniqueName);
            dock.Title = dockTitle;
 
            dock.Commands.Add(new DockCloseCommand());
            dock.Commands.Add(new DockExpandCollapseCommand());
 
            return dock;
        }

Slav
Telerik team
 answered on 29 Jan 2015
1 answer
143 views
As you can see from the attached screenshot, I have added a column to display the number of files in a folder.
Is it possible to add a field to the FileExplorer which will display the number of folders and files in the Current directory, rather than showing totals for all directories?

Vessy
Telerik team
 answered on 29 Jan 2015
9 answers
2.7K+ views

I am using RadBinaryImage control with SqlDataSource. If the VarBinary field contains a NULL value I am getting this error:  â€œUnable to cast object of type 'System.DBNull' to type 'System.Byte[]' â€œ.

My understanding is that a NULL field should be cast to  a null or empty byte[].

Can someone please show me how check if the supplied value is of type DBNull and how to change it to appropriate empty byte array or null in C#?


Thanks,
Thomas
syeada sanjida
Top achievements
Rank 1
 answered on 29 Jan 2015
4 answers
155 views
Hi, I'm having two issues and I suspect at least one of them is dead-simple and caused by me making a simple mistake with me AutoCompleteBox in the EditItemTemplate of a GridTemplateColumn.

First problem; When I enter edit mode for a grid row, the AutoCompleteBox is empty rather than displaying the value that showed in that column before it entered edit mode. (I can "<%#DataBinder.Eval(Container.DataItem, "PartNumber")%>" in the EditItemTemplate to get the text to show up under/over the but that's not a solution.

Second problem; The AutoCompleteBox (set to single selection mode and text input) was appending a semicolon to the selected value. So I tried setting Delimiter="" which got rid of the unwanted character, but then it messed up the auto-complete functionality. Once that change was made, the drop-down options would appear if I paste a string into the box all at once, but not ever if I just typed the same string in. So, either: what's the right way to eliminate the semicolon, or how do I make the autocomplete function work right with delimiter set to an empty string? (I could theoretically trim the semicolon when I'm setting the value of the parameter before updating the DB, but that's a terrible solution since I might theoretically want semicolons in the PartNumber at some future date.)

                        <telerik:GridTemplateColumn UniqueName="PartNumber" HeaderText="Part Number" ItemStyle-CssClass="editWidth" 
                                FilterControlAltText="Filter PartNumber column" FilterControlWidth="85%">
                            <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "PartNumber")%></ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadAutoCompleteBox runat="server" ID="racbPN" DataSourceID="ItemIdSource" DataTextField="IMA_ItemID" 
                                    HighlightFirstMatch="true" InputType="Text" TextSettings-SelectionMode="Single" MaxResultCount="200" MinFilterLength="4" 
                                     Delimiter="" DropDownHeight="300px" DropDownWidth="200px">
                                </telerik:RadAutoCompleteBox>
                            </EditItemTemplate>
                            <HeaderStyle Width="190px"></HeaderStyle>
                        </telerik:GridTemplateColumn>

Thanks for your time!
Nencho
Telerik team
 answered on 29 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?