Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
160 views
<telerik:RadTileList ID="ClientList" runat="server" AutoPostBack="True" 
             OnTileClick="ClientList_TileClick"
             SelectionMode="None" 
             TileRows="3">
            <Groups>
                 <telerik:TileGroup Name="ClientsTileGroup" ></telerik:TileGroup>
            </Groups>
    </telerik:RadTileList>

Sorry to post again but I am getting an error that I have no clue how to figure out. Here, I set OnTileClick="ClientList_TileClick" however when I click on the tile that method is never called. What it does do is refresh the page, which is really weird. The method "ClientList_TileClick" is supposed to redirect to another page. The tile group is empty but it's filled in C# code so the tiles actually exist. In Debug mode I see that the method doesn't get called. Why is that?
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2014
4 answers
274 views
Radgrid with hyperlink column and Add new record functionality:-can not add hyperlink while adding record as no textbox appears to enter.

when i click on Add new record on radgrid textboxes and checkboxes appears for all
fields except Gridhyperlink column,
Could not get text box to enter link.
need solution except item template column.
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2014
1 answer
448 views
Hi there,

The value of property MaxFileInputsCount set to 4 is not limiting the user to select less then 4 files for RadAsyncUpload. Is there any way to limit user to select upto 4 files in one time to upload? Any suggestion is much appreciated.

<telerik:RadAsyncUpload  ID="RadUpload1" ControlObjectsVisibility="None" MultipleFileSelection="Automatic" MaxFileInputsCount="4" TemporaryFileExpiration="01:00:00" runat="server"/>
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2014
2 answers
110 views
I have a radgrid with grouping enabled.
this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
 this._RadGrid1.AllowMultiRowSelection = true;
 this._RadGrid1.ClientSettings.AllowGroupExpandCollapse = true;
 this._RadGrid1.ClientSettings.AllowKeyboardNavigation = true;
 this._RadGrid1.EnableGroupsExpandAll = true;
 this._RadGrid1.EnableHeaderContextFilterMenu = true;
 this._RadGrid1.GroupingEnabled = true;
 this._RadGrid1.ShowGroupPanel = true;
 this._RadGrid1.AllowFilteringByColumn = false;
 
 this._RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
 this._RadGrid1.MasterTableView.EnableHeaderContextMenu = true;
 this._RadGrid1.MasterTableView.EnableHeaderContextFilterMenu = true;        
 this._RadGrid1.MasterTableView.NoMasterRecordsText = "No BAN Assignments found";
                      
 this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };
 this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName };                                
 this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
The grid also has a text box template as followS:
templateColumn = new GridTemplateColumn();
templateColumnName = this._PriceDealProductBanTable.BillingAccountNumberColumn.ColumnName;
this._RadGrid1.MasterTableView.Columns.Add(templateColumn);
templateColumn.ItemTemplate = new TextBoxTemplate(templateColumnName);
templateColumn.HeaderText = "BAN";
templateColumn.DataField = templateColumnName;      
templateColumn.Groupable = false;

When the records are grouped, and if i select a row and change the value of the textbox, on click of save button, I get the previous value and not the new value which needs to be saved! But if the records are not grouped, it works fine!
RB
Top achievements
Rank 1
 answered on 24 Jun 2014
13 answers
800 views
I have a grid with delete button for each row and also in the commanditemtemplate. for these buttons, a confirmation dialog will popup when the user clicks on it. for the delete button in each row i can set the ConfirmationType to "RadWindow" and it does the job perfectly. But for the button in the commanditemtemplate, when i use the sample from the knowlegebase, it results in the rows' delete button to not working. I found that the javascript which is used to block the execution of the delete button in the commanditemtemplate while displaying the radconfirm dialog causes the delete button in each rows to fail when clicked. If I removed this script block, the delete button in each row shows the radconfirm dialog just fine. But of course, removing the script will cause the delete button in CommandItemTemplate to not wait for the user confirmation when clicked.

Here is the ASPX file used to reproduce this behavior:-
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
        <%--Needed for JavaScript IntelliSense in VS2010--%>
        <%--For VS2008 replace RadScriptManager with ScriptManager--%>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
</telerik:RadScriptManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Style="z-index: 7500" />
 
<script type="text/javascript">
    //RADCONFIRM BLOCK THREAD SCRIPT
    //MAKE SURE THAT THE FOLLOWING SCRIPT IS PLACED AFTER THE RADWINDOWMANAGER DECLARATION
 
    //Replace old radconfirm with a changed version.  
    var oldConfirm = radconfirm;
    //TELERIK
    //window.radconfirm = function(text, mozEvent)
    //We will change the radconfirm function so it takes all the original radconfirm attributes
    window.radconfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle) {
        var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually  
        //Cancel the event  
        ev.cancelBubble = true;
        ev.returnValue = false;
        if (ev.stopPropagation) ev.stopPropagation();
        if (ev.preventDefault) ev.preventDefault();
 
        //Determine who is the caller  
        callerObj = ev.srcElement ? ev.srcElement : ev.target;
 
        //Call the original radconfirm and pass it all necessary parameters  
        if (callerObj) {
            //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.  
            var callBackFn = function (arg) {
                if (arg) {
                    callerObj["onclick"] = "";
                    if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz  
                    else if (callerObj.tagName == "A") //We assume it is a link button!  
                    {
                        try {
                            eval(callerObj.href)
                        }
                        catch (e) { }
                    }
                }
            }
            //TELERIK
            //oldConfirm(text, callBackFn, 300, 100, null, null);      
            //We will need to modify the oldconfirm as well               
            oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle);
        }
        return false;
    
</script>
 
<div>
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowMultiRowSelection="true">
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
        </ClientSettings>
        <MasterTableView CommandItemDisplay="Top">
            <CommandItemTemplate>
                <div>
                    <asp:LinkButton ID="LinkButton2" OnClientClick="return radconfirm('The selected application(s) will be deleted.\n\nClick OK to confirm.', event, null, null, '', 'Delete')"
                        runat="server" CommandName="DeleteSelected" CausesValidation="false">Delete</asp:LinkButton>   
                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="RebindGrid">Reload</asp:LinkButton>   
                </div>
            </CommandItemTemplate>
            <Columns>
                <telerik:GridClientSelectColumn HeaderStyle-Width="26px" ItemStyle-Width="26px" />
                <telerik:GridBoundColumn DataField="intcol" HeaderText="intcol" />
                <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" ConfirmText="Delete?"
                    Text="Delete" ConfirmDialogType="RadWindow">
                </telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</div>

How do I make both set of delete buttons (in the CommandItemTemplate and in each row) to work as intended, ie. upon clicking, shows the radconfirn dialog for the user to confirm?

Thanks,
Sonny
Top achievements
Rank 1
 answered on 24 Jun 2014
0 answers
107 views
I need a urgent help trying to create multiple series on a chart. One series two is drawing on the chart and I don't know what I am missing. Below is my code and attached is an image of what I am getting now. I need something like what is in this link.
http://www.telerik.com/help/reporting/understandingelementsseriesseriesproperties.html
Any help will be appreciated.

private void chart1_NeedDataSource(object sender, EventArgs e)
        {
            DataSet ds;
            Telerik.Reporting.Processing.Chart chart;
            DateTime stepDate;
            DateTime stepDateNew;
            string interval, AverageName, AverageNameNew, pointLabel, pointLabelnew, interval2;
            int average, Child1, Child2, step, statusId;

            if (_series == null || _seriesNew == null)
            {

                chart = sender as Telerik.Reporting.Processing.Chart;

                ds = CreateChartDataSet();

                DataView view = ds.Tables[0].DefaultView;

                Telerik.Reporting.Chart chartDef = (Telerik.Reporting.Chart)chart.ItemDefinition;
                _series = new Telerik.Reporting.Charting.ChartSeries();
                _seriesNew = new Telerik.Reporting.Charting.ChartSeries();

                AverageName = string.Empty;
                AverageNameNew = string.Empty;

                SetXAxisRange(view);

                foreach (DataRowView rowView in view)
                {
                    statusId = (int)rowView["ID"];
                    step = int.Parse(rowView["Step"].ToString());
                    average = (int)rowView["average"];
                    interval = rowView["Interval"].ToString();
                    interval2 = rowView["IntervalNew"].ToString();
                    handlingPlanName = rowView["AverageName"].ToString();
                    handlingPlanNameNew = rowView["AverageNameNew"].ToString();
                    likelihood = (int)rowView["Child1"];
                    consequence = (int)rowView["Child2"];                   
                    if (interval != interval2 )
                    {
                        DateTime.TryParse(interval, out stepDate);
                        string str = null;
                        str += stepDate.ToString("MM/dd/yy");
                        pointLabel = str;
                    }

                    else
                        pointLabel = string.Empty;
                     
                    if (interval != interval2)
                    {
                        DateTime.TryParse(interval2, out stepDateNew);
                        string strNew = null;
                        strNew += stepDateNew.ToString("MM/dd/yy");
                        pointLabelnew = strNew;
                    }
                    else
                        pointLabelnew = string.Empty;

/*******Below this  code is the only portion showing on the report ********************************************/
                    Telerik.Reporting.Charting.ChartSeriesItem seriesItem = CreateSeriesItem(pointLabel, average, statusId);

                    _series.AddItem(seriesItem);


                    Telerik.Reporting.Charting.ChartSeriesItem seriesItemNew = CreateSeriesItemNew(pointLabelnew, average, statusId);

                    _seriesNew.AddItem(seriesItemNew);
                    //}
                    foreach (DataRow dtrow in ds.Tables[0].Rows)
                    {

                        if (string.IsNullOrEmpty(handlingPlanName) && DateTime.TryParse(interval, out stepDate))
                            handlingPlanName = "New Report to Check Children's age";                                             

                    }
                    _series.Appearance.LineSeriesAppearance.Color = Color.Teal;
                    _series.Name = handlingPlanName;
                    _series.Type = ChartSeriesType.Line;
                    chart1.ChartTitle.TextBlock.Text = "New Report to Check Children's age";
                    chartDef.Series.Clear();
                    chartDef.Series.Add(_series);

                    foreach (DataRow dtrowNew in ds.Tables[0].Rows)
                    {
                        if (string.IsNullOrEmpty(AverageNameNew) && DateTime.TryParse(interval2, out stepDateNew))
                            handlingPlanNameNew = "New Report to Check Children's age";

                    }
                    _seriesNew.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Black;
                    _seriesNew.Appearance.LineSeriesAppearance.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
                    _seriesNew.Appearance.LineSeriesAppearance.PenStyle = System.Drawing.Drawing2D.DashStyle.Dash;
                    _seriesNew.Appearance.LineSeriesAppearance.Width = 5;
                    _seriesNew.Name = AverageNameNew;
                    _seriesNew.Type = ChartSeriesType.Line;
                    chart1.ChartTitle.TextBlock.Text = "New Report to Check Children's age";
                    chartDef.Series.Clear();
                    chartDef.Series.Add(_seriesNew);

                }

            }

        }
Ebenezer
Top achievements
Rank 1
 asked on 24 Jun 2014
6 answers
359 views
I have been trying to find the simplest method for creating a column in my PivotGrid that displays the difference between the only other two columns being displayed in the PivotGrid. I thought this would be a 5 minute exercise that has taken me all afternoon to get to *sort of* work. I am wondering if I am going about this all wrong... let me know before you mentally get into all the details below.

What I ended up with was using a PivotGridAggregateField field, "DifferenceInHoursFromCMS", with a TotalFunction of "DifferenceFrom". The problem I am having with this is that it leaves this empty column in the output (seen in attached screenshot). Is there any way to hide that empty column?

More importantly, all I really want to see is this table structure:

Row 1, Column 1: CMS
Row 1, Column 2: G2
Row 1, Column 3: Difference

So, a sample might look like this:

15     10     5
25     22     3

It doesn't seem like this should be that hard. What is the easiest way to get that output?

Here is my grid:

    <telerik:RadPivotGrid ID="pvtCMStoG2" runat="server" DataSourceID="sqlCMStoG2TimesheetValidation" AllowPaging="True" PageSize="15" AggregatesLevel="1">
        <PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox" AlwaysVisible="True"></PagerStyle>
        <Fields>
            <telerik:PivotGridColumnField Caption="Source" DataField="Source" UniqueName="Source">
            </telerik:PivotGridColumnField>
            <telerik:PivotGridRowField Caption="Customer" DataField="CustomerIdentityString" UniqueName="CustomerIdentityString">
            </telerik:PivotGridRowField>
            <telerik:PivotGridAggregateField Aggregate="Sum" DataField="Hours" GrandTotalAggregateFormatString="" UniqueName="SumOfHours">
                <TotalFormat Axis="Rows" Level="0" SortOrder="Ascending" />
                <HeaderCellTemplate>
                    <asp:Label ID="lblHeader" runat="server" Text="Total Hours"></asp:Label>
                </HeaderCellTemplate>
            </telerik:PivotGridAggregateField>
            <telerik:PivotGridAggregateField Aggregate="Count" DataField="Hours" GrandTotalAggregateFormatString="" UniqueName="CountOfVisits">
                <TotalFormat Axis="Rows" Level="0" SortOrder="Ascending" />
                <HeaderCellTemplate>
                    <asp:Label ID="lblHeader" runat="server" Text="Service Count"></asp:Label>
                </HeaderCellTemplate>
            </telerik:PivotGridAggregateField>
            <telerik:PivotGridAggregateField Aggregate="Sum" DataField="Hours" GrandTotalAggregateFormatString="" UniqueName="DifferenceInHoursFromCMS">
                <HeaderCellTemplate>
                    <asp:Label ID="lblHeader" runat="server" Text="Difference in Hours"></asp:Label>
                </HeaderCellTemplate>
                <TotalFormat Axis="Columns" Level="0" SortOrder="Ascending" TotalFunction="DifferenceFrom" GroupName="CMS" />
            </telerik:PivotGridAggregateField>
        </Fields>
        <TotalsSettings RowGrandTotalsPosition="First" ColumnGrandTotalsPosition="None" />
        <ConfigurationPanelSettings EnableOlapTreeViewLoadOnDemand="True"></ConfigurationPanelSettings>
    </telerik:RadPivotGrid>
Tayonee
Top achievements
Rank 1
 answered on 24 Jun 2014
3 answers
92 views

I have following radwindow defined on master page.

I try to open a page with anchor tags but it’s not working. But when I open page in the browser Anchor tags work fine.

 

Rad window:

<telerik:RadWindow ID="radWINDialogPostLogin" runat="server" Behavior="Close" ReloadOnShow="false"

                        Left="" VisibleTitlebar="True" Style="display: none;" Top="" Modal="False" Behaviors="Close,Move,Resize">

                  </telerik:RadWindow>

Marin Bratanov
Telerik team
 answered on 24 Jun 2014
1 answer
83 views
Can the MS Word Spell provider be run as a service rather than a user process?
Marin Bratanov
Telerik team
 answered on 24 Jun 2014
1 answer
205 views
I have a combo box that is loading its data from a webservice. When the user types in some letters the webservice uses these as a filter and returns only rows that match (using a "contains" sql call). This all works well.

I have also set "filter=contains" on the combobox so that the matching part of the filter is highlighted in the dropdown list. This looks very nice.

However, if the webservice finds no items because the filter eliminates all data (maybe the user types in ZZZZZ) then the webservice returns a single radcombobox item with value="" and text="Sorry, no match found". I also mark this item with "IsSeparator = True" so that I can style it appropriately on the client.

The problem is that the "filter=contains" filters out the "Sorry, no match found" item because it doesn't match the text "ZZZZZ"! So the user never sees my friendly message, they just get an empty dropdownlist.

If I turn off the filter=contains then the friendly message shows, but obviously I lose the highlighting in the dropdown to show how the user's input is matching up with the items in the list.

Is there a way to make the client-side "filter=contains" filter out everything except a certain item, or everything except separators?
Helen
Telerik team
 answered on 24 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?