Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
110 views
Hi, 

I'm looking at switching over to the HTML Charts now that they seem rich in features.  

First issue that I am facing is that I want to only show the top x records on the chart with any beyond x being shown collectively as others.

Beyond manipulating the data set to do that is there any way to do this with the out of the box charts?

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 04 Jun 2014
2 answers
164 views
What CSS do I need to apply to reduce the height / shrink spacing between the file names in the uploaded list?
Magdalena
Telerik team
 answered on 04 Jun 2014
3 answers
65 views
We are running Version 9.0.30729.1 SP.

When using a RadEditor in IE 9, the data that is entered is never sent back to the server.  I have tried adding the UseSubmitBehavior=false on all the saving buttons,  I also tried to add the meta tag to emulate IE 8. Is there a patch for this version that fixes this issue with IE 9?

Everything works fine in Chrome and Firefox and IE 8.
Ianko
Telerik team
 answered on 04 Jun 2014
4 answers
77 views
Hi..

Got a problem with Radcalendar. Works fine locally on IIS8 click a date and the date stays selected. When I publish to IIS8 I click on a date and the date bounces back to selected date bounces back to today's date. The calendar is on a masterpage is there anything obvious to look for?
Speedcrete
Top achievements
Rank 1
 answered on 04 Jun 2014
3 answers
64 views
Hi All

I am facing issue the order of the attributes get change when load the data in Rad editor, The same order also get change when switch between the design & html mode.
The Tag i insert in the db: &lt; <a style="color: #000000;" class="1" title="C-2, General Commercial" tagname="Primary Zone">C-2, General Commercial</a> &gt;
The tag i got in a html editor: &lt; <a tagname="Primary Zone" title="C-2, General Commercial" class="1" style="color: #000000;">C-2, General Commercial</a> &gt;

Here the order of the attribute is exactly reverse.
The same also get reverse when switch between  the design & Html Mode
Ianko
Telerik team
 answered on 04 Jun 2014
1 answer
117 views
RadNotification doesn't load/show notification messages when there is a RadMediaPlayer on the form with a Playlist populated. Can somebody look into this?

Thanks,

Venu Gadde.
Princy
Top achievements
Rank 2
 answered on 04 Jun 2014
1 answer
137 views
I have a RadGrid From that I have the AutoEdit Turned on - I am am trying to make a couple of the Fields in the "PopUp" Edit Form be multiline as they are of type Ntext and are large. Currently they are just smaller type default Text Cells and cannot see all of the text. Trying to get them to be Multiline and maybe Scrollable.. Below is my code that I have behind in my .aspx.vb code for the page - but it is not making anything happen.

For Edit item.

Protected Sub RadGrid2_ItemDataBound(sender As Object, e As 
GridItemEventArgs)<BR>If TypeOf e.Item Is GridEditFormItem AndAlso 
e.Item.IsInEditMode Then<BR>Dim editItem As GridEditFormItem = TryCast(e.Item, 
GridEditFormItem)<BR>Dim editTable As Table = 
TryCast(TryCast(editItem.EditFormCell, 
GridEditFormItem.EditFormTableCell).Controls(7).Controls(7), 
Table)<BR>editTable.Width = Unit.Percentage(100)<BR>Dim textBox As TextBox = 
DirectCast(editItem("Corrective Action").Controls(7), 
TextBox)<BR>textBox.TextMode = TextBoxMode.MultiLine<BR>TryCast(textBox.Parent, 
TableCell).Width = Unit.Percentage(100)<BR>textBox.Width = 
Unit.Percentage(100)<BR>End If<BR>End Sub

For Create Item

Protected Sub RadGrid2_ItemCreated(sender As Object, e As 
GridItemEventArgs)<BR>If TypeOf e.Item Is GridEditFormItem AndAlso 
e.Item.IsInEditMode Then<BR>Dim editItem As GridEditFormItem = TryCast(e.Item, 
GridEditFormItem)<BR>Dim editTable As Table = 
TryCast(TryCast(editItem.EditFormCell, 
GridEditFormItem.EditFormTableCell).Controls(7).Controls(7), 
Table)<BR>editTable.Width = Unit.Percentage(100)<BR>Dim textBox As TextBox = 
DirectCast(editItem("Corrective Action").Controls(7), 
TextBox)<BR>textBox.TextMode = TextBoxMode.MultiLine<BR>TryCast(textBox.Parent, 
TableCell).Width = Unit.Percentage(100)<BR>textBox.Width = 
Unit.Percentage(100)<BR>End If<BR>End Sub
Shinu
Top achievements
Rank 2
 answered on 04 Jun 2014
1 answer
142 views
In my radgrad I am showing/hiding filter options depending on which filter is clicked on by utilizing the FilterMenuShowing client side function. The problem is it always remembers the last selection. So if in filter A I hide "IsNull", then "IsNull" will also be hidden when I click on Filter B after clicking Filter A. However, if I click Filter B first, "IsNull" is shown. Curiously, if I click Flilter A, then Filter B TWICE, then it works as expected. Why is it remembering the last set of filter options, and how can I fix this?

The following is my code: 

function filterMenuShowing(sender, eventArgs) {
                var menu = eventArgs.get_menu();
                var items = menu._itemData;
                var i = 0;
                while (i < items.length) {
                    var arrMenuOptions = ['GreaterThan', 'LessThan', 'IsEmpty', 'IsNull', 'NotIsEmpty', 'NotIsNull', 'GreaterThanOrEqualTo', 'LessThanOrEqualTo', 'Between', 'NotBetween'];
                    var filterOption = items[i].value;
                    if (arrMenuOptions.contains(filterOption)) {
                        var item = menu._findItemByValue(filterOption);
                        if (item) {
                            var columnName = eventArgs.get_column()._element.UniqueName;
                            
                            if (columnName == "JobNumber" && (filterOption == "GreaterThan" || filterOption == "LessThan")) {
                                item._element.style.display = "";
                            } else if ((columnName == "InitialDate" || columnName == "FinalDate") && (filterOption == "Between" || filterOption == "NotBetween" || filterOption == "IsNull" || filterOption == "NotIsNull" || filterOption == "IsEmpty")) {
                                item._element.style.display = "";
                            } else if ((columnName == "JobDescription" || columnName == "JobCategory" || columnName == "JobType") && (filterOption == "IsEmpty" || filterOption == "NotIsEmpty")) {
                                item._element.style.display = "";
                            } else {
                                item._element.style.display = "none";
                            }
                        }
                    }
                    i++;
                }
            }
Princy
Top achievements
Rank 2
 answered on 04 Jun 2014
7 answers
713 views
Hi,

I'm pretty new to the Telerik controls and also have very little experience with javascript. Here is my problem:

I have a RadGrid that displays some information from a database and allows the user to modify this data by clicking an Edit link button and then using a form template.

I have a client side row double click function that puts the row into edit mode that I found on one of the Telerik support documents, but I need to disable this for specific rows based on the enabled status of the link button.

Code.

I've cut out a lot of the columns of the grid and also the form template as they are not relevant. I've highlighted the relevant parts in bold.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RowDblClick(sender, eventargs)
            {
                sender.get_masterTableView().editItem(eventargs.get_itemIndexHierarchical());
            }

        </script>
    </telerik:RadCodeBlock>


<telerik:RadGrid ID="ShiftRadGrid" runat="server" AllowSorting="True" 
                                        AutoGenerateColumns="False" 
                                        DataSourceID="ShiftSqlDataSource" 
                                        ShowFooter="True" GridLines="Both">
                            
                            <ExportSettings ExportOnlyData="True" OpenInNewWindow="True">
                            </ExportSettings>

                            <ClientSettings EnableRowHoverStyle="true">
                                <Selecting AllowRowSelect="True" />
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                <ClientEvents OnRowDblClick="RowDblClick" />
                            </ClientSettings>
                            
                            <MasterTableView DataSourceID="ShiftSqlDataSource" DataKeyNames="id">
                                <Columns>
                                    <telerik:GridEditCommandColumn buttontype="LinkButton"  UniqueName="RadGrdEditCommand" EditText="Edit">
                                    </telerik:GridEditCommandColumn>
                                   
<telerik:GridButtonColumn CommandName="Select" FilterControlAltText="Filter Select column" Text="Select" UniqueName="Select">
                                    </telerik:GridButtonColumn>
                                    <telerik:GridBoundColumn DataField="ScheduleDate" DataFormatString="{0:d}" DataType="System.DateTime" FilterControlAltText="Filter ScheduleDate column" HeaderText="Date Worked" SortExpression="ScheduleDate" UniqueName="ScheduleDate">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CAName" FilterControlAltText="Filter CAName column" HeaderText="Name" ReadOnly="True" SortExpression="CAName" UniqueName="CAName">
                                        <ItemStyle Wrap="False" />
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <EditFormSettings EditFormType ="Template">
                                    <FormTemplate>
                                        <table id="FormTable" class="Table4" border="0">
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblWorkingDate" runat="server" Text ="Working Date:"></asp:Label>
                                                </td>
                                                <td>
                                                    <telerik:RadDatePicker ID="RadShiftEditWorkingDatePicker" runat="server" 
                                                                            Height="22px" Width="100px"
                                                                            DBSelectedDate='<%# Bind("ScheduleDate", "{0:d}")%>' >
                                                    </telerik:RadDatePicker>
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblHospital" runat="server" Text="Hospital"></asp:Label>
                                                </td>
                                            </tr>

                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>
                            </MasterTableView>
                        </telerik:RadGrid>



Protected Sub ShiftRadGrid_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles ShiftRadGrid.ItemDataBound
        If TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim itemCounter As Integer = item.Cells.Count

            Try
                'Dim lnkEdit As LinkButton = DirectCast(e.Item.FindControl("RadGrdEditCommand"), LinkButton)

                Dim lnkEdit As LinkButton = DirectCast(item("RadGrdEditCommand").Controls(0), LinkButton)
                lnkEdit.Enabled = False
               ' I've disabled all rows just to test but this will ultimately be based on logic.


            Catch ex As Exception
' Rest of logic.

End try
end if

    End Sub

Hope this is clear enough. Many thanks.

    







Princy
Top achievements
Rank 2
 answered on 04 Jun 2014
6 answers
221 views
HI,
I have created RadGrid completely programmatically in Page_Init() method with Export to CSV button shown on the Grid. When i click on Export to CSV button is raising exception "Path 'OPTIONS' is forbidden" and some times PROPFIND is forbidden. I have even included in web.config file <add path="*" verb="OPTIONS, PROPFIND" type="System.Web.StaticFileHandler" /> still it gives the same excpetion. Please follow below code.

protected void Page_Init(object sender, EventArgs e)
{
_CurrentUser = (UserDetails)HttpContext.Current.Session["UserDetailSession"];

RadGrid RadGrid1 = new RadGrid();
RadGrid1.ID = "RadGrid1";
RadGrid1.AutoGenerateColumns = false;
RadGrid1.AllowPaging = true;
RadGrid1.AllowSorting = true;
RadGrid1.AllowFilteringByColumn = true;
RadGrid1.PageSize = 50;
RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;


RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
RadGrid1.ItemCommand += new GridCommandEventHandler(RadGrid1_ItemCommand);

GridEditCommandColumn EditColumn = new GridEditCommandColumn();
RadGrid1.MasterTableView.Columns.Add(EditColumn);
EditColumn.UniqueName = "Edit";

List<clsColumnList> listColumnList = null;
DynamicPopulation _objDynamic = new DynamicPopulation();

//please create few columns before usage of listColumnList
foreach (clsColumnList _clsColumnList in listColumnList)
{
GridTemplateColumn _TemplateColumn = new GridTemplateColumn();
_TemplateColumn.ItemTemplate = new ItemTemplate(_clsColumnList.COLUMN_NAME);
_TemplateColumn.EditItemTemplate = new EditItemTemplate(_clsColumnList.COLUMN_NAME, _clsColumnList.DISPLAY_NAME, ViewState["ColumnList"] as List<clsColumnList>, Convert.ToInt32(Session["CurrentMeneID"]));
_TemplateColumn.DataField = _clsColumnList.COLUMN_NAME;
_TemplateColumn.HeaderText = _clsColumnList.DISPLAY_NAME;
_TemplateColumn.UniqueName = _clsColumnList.COLUMN_NAME;

RadGrid1.MasterTableView.Columns.Add(_TemplateColumn);
}

GridButtonColumn DeleteColumn = new GridButtonColumn();
RadGrid1.MasterTableView.Columns.Add(DeleteColumn);
DeleteColumn.ButtonType = GridButtonColumnType.LinkButton;
DeleteColumn.CommandName = "Delete";
DeleteColumn.Text = "Delete";
DeleteColumn.UniqueName = "Edit";
DeleteColumn.HeaderText = "Delete";
DeleteColumn.ConfirmText = "Are you sure, you want to delete?";
RadPane2.Controls.Add(RadGrid1);

}

//Export to CSV button click event captured
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.ExportToCsvCommandName)
{
RadGrid RadGrid1 = sender as RadGrid;
//RadGrid1.ExportSettings.ExportOnlyData = true;
//RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.ExportSettings.IgnorePaging = true;
RadGrid1.MasterTableView.GetColumn("Edit").Visible = false;
RadGrid1.MasterTableView.GetColumn("Delete").Visible = false;
///RadGrid1.Rebind();
RadGrid1.MasterTableView.ExportToExcel();
}
}

Please someone help me in this regard it would be greatly appreciated.
Kostadin
Telerik team
 answered on 04 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?