Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
369 views
Howdy,

I have an issue where Telerik is styling my submit input fields.

For example this one:
<input type="submit" name="search" value="Book Now">

Get's automatically styled with the Telerik RadButton style using the Default Skin for the project (with is MetroTouch).

I have attached a screenshot of what happens.

Thanks

Andrew

Danail Vasilev
Telerik team
 answered on 18 Dec 2014
1 answer
81 views
I just completed my first RadHtmlChart (woot!). Everything is just as I wanted it except one thing. This is a column chart showing percentages from 0 to 100. I need the 90% line to either be red, or to somehow overlay a red line along this line to show the target percentage we're shooting for. I'm populating this with SQL, so if it can be done by adding a field to the query that would be fine. Image of what I'm trying to do is attached.

Thanks!!
Danail Vasilev
Telerik team
 answered on 18 Dec 2014
1 answer
93 views
Here's what I'm trying to accomplish (and I know it has to be possible, just haven't found a way as of yet). I have a RadGrid which is populated from a database, when a row is clicked I want to open a modal RadLightBox with information pertaining to the selected record (I guess load an ASP.NET page inside the RadLightBox when it loads).

Can anyone help me with this?
Eyup
Telerik team
 answered on 18 Dec 2014
1 answer
784 views
Hi,

I have a page with a dropdown and a radgrid with filtering on.  Depending on the selection on de dropdown another datatable is loaded in the radgrid. 

Problem I have now is when I have a datatable loaded and set a filter on and I change the selection in the dropdown to get another datatable the error 'neither a datacolumn nor a datarelation for table' occurs.

protected void grdEnquiry_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    if (ddlEnquiry.SelectedValue != "-1")
    {
            BLogic.Enquiry Enquiry = new BLogic.Enquiry(Convert.ToInt16(ddlEnquiry.SelectedValue)); 
           grdEnquiry.DataSource = BLogic.Enquiries.Execute(Enquiry.System, Enquiry.Type, Enquiry.File);
    }
}

protected void ddlEnquiry_SelectedIndexChanged(object sender, EventArgs e)
{
    grdEnquiry.Rebind();
}

How can I fix this?

Kind regards

Suzy
Viktor Tachev
Telerik team
 answered on 18 Dec 2014
1 answer
64 views
Hi,

There is a problem with nodelines not centering correctly. Typically when a node has Three Children.
See http://demos.telerik.com/aspnet-ajax/orgchart/examples/drilldown/defaultcs.aspx

As you can see the nodlines are not centered between Hardware and Storage.

How can this be fixed?
Magdalena
Telerik team
 answered on 18 Dec 2014
1 answer
106 views
Hello All,

In my project , i have a left RADpanelbar in which some buttons are placed , clicking on which navigates to appropriate screens.
This works fine in IE. but not in google chrome and safari and firefox.

note: i have included ie.browser file also in my project's app_browser.
also chrome.browser. 
what else i should include in my code to make the buttons clickable .
Meanwhile, i tested this in debug mode of google chrome. pressing f11 (stepin) in google chrome made the buttons clickable but not otherwise. so why is it working in debug mode and not in without debug mode.

Please help. it is top urgent!! 
-Thanks
Gayathri
Bozhidar
Telerik team
 answered on 18 Dec 2014
8 answers
115 views
function rowDropping1(sender, eventArgs) {
           
            var IndexValue = document.getElementById('<%=ddlCrew.ClientID %>').selectedIndex;
            var SelectedVal = document.getElementById('<%=ddlCrew.ClientID %>').options[IndexValue].value;

            
            if (SelectedVal == 0) {
                alert("Must select a crew before scheduling.");
                eventArgs.set.cancel(true);
                return;
            }

            // Fired when the user drops a grid row      
            var htmlElement = eventArgs.get_destinationHtmlElement();
            var scheduler = $find('<%= radScheculer.ClientID %>');

            if (isPartOfSchedulerAppointmentArea(htmlElement)) {
                // The row was dropped over the scheduler appointment area
                // Find the exact time slot and save its unique index in the hidden field
                var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);

                //$get("TargetSlotHiddenField").value = timeSlot.get_index();
                document.getElementById("<%=TargetSlotHiddenField.ClientID %>").value = timeSlot.get_index();
                // The HTML needs to be set in order for the postback to execute normally
                eventArgs.set_destinationHtmlElement("TargetSlotHiddenField");
            }
            else {
                // The node was dropped elsewhere on the document
                eventArgs.set_cancel(true);
            }
        }


function isPartOfSchedulerAppointmentArea(htmlElement) {
            // Determines if an html element is part of the scheduler appointment area
            // This can be either the rsContent or the rsAllDay div (in day and week view)
            return $telerik.$(htmlElement).parents().is("div.rsAllDay") ||
                            $telerik.$(htmlElement).parents().is("div.rsContent")
        }
In Above two functions, there is a statement as below,

var htmlElement = eventArgs.get_destinationHtmlElement();

This statement returns incorrect html on row dropping over scheduler from grid.
This only happens with Crome. In Mozilla its works well and as expected. 

I feel that in some Crome version its working correctly and for others its returns wrong elements
i.e its return gridrow td element instead of scheduler td element.

Please some buddy fix it! 

Thanks in advance!



Plamen
Telerik team
 answered on 18 Dec 2014
4 answers
415 views
Good day,

I was wondering if it is possible to include text above the exported data in an Excel file using the normal Export to Excel method with a RadGrid?

For example I wish to include a description of the data as follows,  "Description: Data selected using dates between 1 Jan 2011 to 1 Sep 2011", above the actual data exported.

I shall be grateful for any information on this matter

Justin
Paul
Top achievements
Rank 1
 answered on 17 Dec 2014
1 answer
425 views
I'm fetching column names and column types (Text, Note, DateTime, Number, and Currency) from another system in my c# code behind.

I use this to create a query to return back a datatable. I also use this to create columns for a RadGrid control my my ASPX page.

This is what I'm using to add fields to the grid:

private void AddFieldToRadGrid(string internalName, string type, string title)
        {
            if (rgStudyInfo.MasterTableView.Columns.FindByUniqueNameSafe(internalName) == null)
            {
                if (string.IsNullOrEmpty(title)) title = internalName;
                GridBoundColumn column = new GridBoundColumn();
                column.HeaderText = title;
                column.AllowSorting = true;
                column.AllowFiltering = true;
                column.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
                column.DataField = internalName;
                column.EmptyDataText = "N/A";
                column.UniqueName = internalName;
                column.SortExpression = internalName;
                column.ItemStyle.VerticalAlign = VerticalAlign.Top;
                Type typ;
                switch (type)
                {
                    case "DateTime":
                        typ = typeof(System.DateTime);
                        break;
                    case "Number":
                        typ = typeof(System.Int32);
                        break;
                    case "Currency":
                        typ = typeof(System.Decimal);
                        break;
                    default:
                        typ = typeof(System.String);
                        break;
                }
                column.DataType = typ;
                rgStudyInfo.MasterTableView.Columns.Add(column);
            }
        }

I read online that if the grid itself is delcared via markup, the new columns should be added during Page_Load within a !Page.IsPosback test. I can't get the dataformatstring to work if I add it here (using "{0:dd-MMM-yyyy}" for it in the case "DateTime" above). So I was attempting to format date fields during the itemdatabound event. But when I check to see if a field is type DateTime, I find that all fields are String. I checked if e.Item is GridDataItem, then instantiated a GridDataItem variable (e.Item as GridDataItem) to get the row.

The only place I found a referenced data type was in ((DataRowView)item.DataItem).Row.Table.Columns[col].DataType (col is an int index). And as I said, it's always System.String. Dates are in the columns, as strings that include date as well as time.

Also, since I programmatically added columns, do I need to do something special to handle sorting when users click column headers? When I click on them, the column headers' tex disappears and the grid isn't sorted.  Filtering breaks the page, but I haven't looked into that yet. Do I need to do something special for that since the columns were added programatically?

Data is loading fine during ItemDataBound event, and column headers are properly shown.


Pavlina
Telerik team
 answered on 17 Dec 2014
2 answers
94 views
I set the AllowPaging="true" and PageSize="2" but the list view only creates on long column when I was hoping it would create 2 columns.
Here is the code I have.

<telerik:RadListView ID="equipmentListView" runat="server" AllowPaging="true" PageSize="2">
    <LayoutTemplate>
        <div>
            <table>
                <tbody>
                    <tr id="itemPlaceholder" runat="server">
                    </tr>
                </tbody>
            </table>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <tr>
            <td>
                <asp:Label ID="Label7" runat="server" Text="Stuff1" />
                <asp:Label ID="Label5" runat="server" Text="Stuff1" />
                <asp:Label ID="Label8" runat="server" Text="Stuff2" />
                <asp:Label ID="Label9" runat="server" Text="Stuff2" />
            </td>
        </tr>
    </ItemTemplate>
</telerik:RadListView>
James
Top achievements
Rank 1
 answered on 17 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?