Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
342 views
Is there way to navigate to next page of wizard by click on the content itself (eg. Gridview row ) instead of clicking on the previous and next button on wizard ? I do not want to use "next" and "previous" button that comes with the wizard. For previous button I just want to use wizard tab itself but for next button I want to use content on page itself ( may be button on content page itself or table row etc ). Can this be achieve in wizard ?
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 01 Jul 2016
5 answers
101 views
Hi.

My existing dataform was pulling through the data fields just fine, but I needed to separate them into category’s so decided to use the RadPanelBar.
But now the fields with in the RadPanelBar wont display.
It seems silly that you have to rebind this data all over again when the dataform has it already, is there a way to pass through the dataform data into RadPanelBar. After all its sitting in its itemtemplate!

Many Thanks

Mark

<itemtemplate>
 
        <div class="rdfRow">
            <asp:Label ID="p_codeLabel2" runat="server" CssClass="rdfLabel" Text="p_code"></asp:Label>
            <asp:Label ID="p_codeLabel1" runat="server" CssClass="rdfFieldValue" Text='<%# Eval("p_code") %>' />
        </div>
        <div class="rdfRow">
            <asp:Label ID="p_nameLabel2" runat="server" CssClass="rdfLabel" Text="p_name"></asp:Label>
            <asp:Label ID="p_nameLabel1" runat="server" CssClass="rdfFieldValue" Text='<%# Eval("p_name") %>' />
        </div>
 
        <telerik:RadPanelBar RenderMode="Lightweight" runat="server" ID="RadPanelBar2" Width="90%" ExpandMode="MultipleExpandedItems" >
            <Items>
                <telerik:RadPanelItem Expanded="True" Text="Product key Information">
                    <ContentTemplate>
                        <div class="rdfRow">
                            <asp:Label ID="p_descriptionLabel2" runat="server" CssClass="rdfLabel" Text="p_description"></asp:Label>
                            <asp:Label ID="p_descriptionLabel1" runat="server" CssClass="rdfFieldValue" Text='<%# Eval("p_description") %>' />
                        </div>
 
                        <div class="rdfRow">
                            <asp:Label ID="p_dateLabel2" runat="server" CssClass="rdfLabel" Text="p_date"></asp:Label>
                            <asp:Label ID="p_dateLabel1" runat="server" CssClass="rdfFieldValue" Text='<%# Eval("p_date") %>' />
                        </div>
 
 
                  </ContentTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
</itemtemplate>
Viktor Tachev
Telerik team
 answered on 01 Jul 2016
1 answer
297 views

Hi,

I am trying to use the plugin footable on GridView but it does not work. Maybe you would have an idea about my problem?

Here is the code of my ascx file:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search.ascx.cs" Inherits="Controls.Search.Search" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>

<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/css/footable.min.css"
    rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/js/footable.min.js"></script>
<script type="text/javascript">
    $(function () {
        alert("enter function footable");
        $('[id*=GridView1]').bind('footable_breakpoint', function () {
            $('[id*=GridView1]').trigger('footable_expand_first_row');
        }).footable();
        alert("exit function footable");
    });
</script>
<div>
  <asp:GridView ID="GridView1" CssClass="footable" runat="server"
           AutoGenerateColumns="False">
       <Columns>
           <asp:BoundField DataField="FirstName" HeaderText="First Name"   />
           <asp:BoundField DataField="LastName" HeaderText="Last Name" />
           <asp:BoundField DataField="Email" HeaderText="Email" />
           <asp:BoundField DataField="Contact" HeaderText="Contact" />
       </Columns>
   </asp:GridView>
</div>

Here the cs file that define the grid:

DataTable tab = new DataTable();
            tab.Columns.Add("FIRSTNAME", typeof(string));
            tab.Columns.Add("LASTNAME", typeof(string));
            tab.Columns.Add("EMAIL", typeof(string));
            tab.Columns.Add("CONTACT", typeof(string));
            
            var firstname = "toto";
            var lastname = "toto";
            var email = "toto@email";
            var contact = "loremipsum loremipsum loremipsumloremipsum";
            tab.Rows.Add(new object[] { firstname, lastname, email, contact });

            GridView1.DataSource = tab;
            GridView1.DataBind();

            //Attribute to show the Plus Minus Button
            GridView1.HeaderRow.Cells[0].Attributes["data-class"] = "expand";

            //Attribute to hide column in Phone and Tablet
            GridView1.HeaderRow.Cells[0].Attributes["data-hide"] = "phone,tablet";
            GridView1.HeaderRow.Cells[0].Attributes["data-hide"] = "phone,tablet";

            //Adds THEAD and TBODY to GridView
            GridView1.UseAccessibleHeader = true;
            GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;

The 2 alerts in the javascript are displayed but the table remains unchanged when I resize the window to phone size....

Kostadin
Telerik team
 answered on 01 Jul 2016
7 answers
823 views
In the past I have used something like this:

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

        {

            if (e.Row.RowType == DataControlRowType.DataRow)

            {

                var dr = (ObjectTypeBeingBound)e.Row.DataItem;

                HyperLink editLink = (HyperLink)e.Row.FindControl("hlEditLink");

                editLink.Attributes.Add("onclick", String.Format("openRadWindow({0},{1})", dr.Id, dr.Name));

            }

        }

How do I do similar with a RadGrid?  My best attempt (not an exact replacement for the above method) so far is:

protected void gvSpecs_ItemDataBound(object sender, GridItemEventArgs e)

        {

            if (e.Item is GridDataItem)

            {

                GridDataItem item = (GridDataItem)e.Item;

                var supplierPartNumber = item.GetDataKeyValue("SupplierPartNumber");

                var setNo = item.GetDataKeyValue("SetNo");

                HyperLink editLink = (HyperLink)item["editAttributes"].Controls[0];

                editLink.Attributes.Add("onclick", String.Format("openRadWindow({0},{1})"

                    supplierPartNumber != null ? supplierPartNumber: String.Empty, 

                    setNo != null ? setNo : String.Empty));                

            }

        }


But I can seem to only access the datakeys and not the rest of the datasource cast as an object.

Thanks
Eyup
Telerik team
 answered on 01 Jul 2016
5 answers
58 views

I have project test schedule (using version 2016.2.504.40). This sourcecode and script Db in attachment.

When I compare data view MonthView default and WeekView default diffrent data.

1. Page1 set SelectedView="MonthView", data show in Date (27-Jun + 28-Jun + 30-Jun). See image: MonthView_Default.JPG (in attachment)

2. Page2 set SelectedView="WeekView", click next week onview, data show in date (28-Jun), but not show in date (27-Jun + 30-Jun). See image: WeekView_Default.JPG (in attachment) 

Why???

The codeBehide the same in two page. only set SelectedView of two page.

How to fix this issue???

Link myWebtest online: http://115.146.121.171:8085/

Nencho
Telerik team
 answered on 01 Jul 2016
2 answers
50 views

Hi, I have two grids with ajax and one function that opens a window with a windowmanager, when using the function in the first grid (with a button and in the updatecommand) it works ok and it shows a message I put with the current time, but If I try to use that function from an event in the second grid it shows the last message not current. I'll try to explain:

 

- the new window has a label when I put the next message: current time + "bla bla" before opening it

- if I use it from the first grid it shows the current time but from the second grid it shows the last message not the current time...

luis molina
Top achievements
Rank 1
 answered on 30 Jun 2016
5 answers
235 views

Hi,

I'm using a FilterCheckList and it works on a simple RadGrid (Capture1.jpg). But when I add detail using GridTableView send me an error (Capture2.jpg).

Someone could send me an example using  FilterCheckList and GridTableView?

Regards.

Rocío Ojeda.

 

Pavlina
Telerik team
 answered on 30 Jun 2016
3 answers
174 views

Hello

See attached mockups.

I am trying to produce a line chart with 6 lines on it - 3 lines that represent regional, domestic and international sales in year 2015 and 3 more lines that represent the same reg/dom/int sales data but in 2016 (basically a year over year chart where the x-axis shows the month names and each set of 3 line series represents the international, domestic and regional sales data in that particular year).

The customer has requested that when showing the 3 line series for the 2015 sales data that the lines are within the same color but different shades so it is easy to see all 3 are within 2015. For example if all 2015 lines were blue-like, then I need to dynamically change the line series 1 = LightBlue, line series 2 = Blue and line series 3 = NavyBlue (light, regular, dark colored basically). The same idea for the 2016 lines, they should all be red-like for example Burgundy, Red, Pink.

The challenge I have is that we are utilizing Telerik skins so the customer could have any telerik skin applied to the website (Silk Skin, Glow, MetroTouch, whatever). I want to be able to pick color that make sense with the Skin selected and shade them vs. hard coding it to shades of blue or red since this will not look right depending on the Skin applied.

 

My design thinking was as follows:

-Derive the Skin being used from the RadSkinManager

-Somehow determine the color palette used by that skin - not sure how to do this?

-Pick 2 colors in that color palette that are "far apart" (2 colors that look the least like each other), shade them and set the LineSeries.Appearance.FillStyle.BackgroundColor on each set of 3 line series.

 

I've found all the code I need to make that design work but I cannot derive how to get the base color palette of a given skin.

 

Vessy
Telerik team
 answered on 30 Jun 2016
3 answers
145 views

Good morning,

 

I've got a GridTemplateColumn that has a set width (10%) and that implements both an Item- and EditItemTemplate. These templates implement asp:table(s) with colspan. The colspan of the itemtemplate is set to 2 and implements two rows, one with a label and one with two buttons.

My problem is that the buttons look slightly too big in relations to the label (see attached screendump).

 

 

I've attempted to setting the width / height in the buttons, but to no effect.

In addition to that I've attempted to set the w/h in CSS, both with a reference to the css-class through the control(s), but also through attempting to set all controls of type RadPushButton.

Still, nothing...

 

Any help would be appriciated!

 

This is the code for the GridTemplateColumn in question:

<telerik:GridTemplateColumn HeaderText="Actual Finish" AllowFiltering="False" runat="server" HeaderStyle-Width="10%" UniqueName="ActualFinish">
            <ItemTemplate>
                <table>
                    <tr>
                        <td colspan="2">
                            <telerik:RadLabel ID="RlblActualFinish" runat="server" Text='<%# Bind ("ActualFinish") %>'       UniqueName="RlblActualFinish"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="1">
                            <telerik:RadPushButton runat="server" ID="RpbActualFinish" Text="Now" CommandName="FinishNow" RenderMode="Auto" cssclass="radpushbutton"/>
                        </td>
 
                        <td colspan="1">
                            <telerik:RadPushButton runat="server" ID="RbtnActualPlannedFinish" Text="Planned" CommandName="FinishPlanned" RenderMode="Auto" />
                        </td>
                    </tr>
                </table>
                                                     
            </ItemTemplate>
 
            <EditItemTemplate>
                <table>
                    <tr>
                            <td colspan="12">
                        <uc2:ctrlDatetimeActivity id="ctrlActualFinishColumn" runat="server"
                            SelectedDateTime='<%# If(Eval("ActualFinish") Is DBNull.Value, Datetime.now(), Eval("ActualFinish"))%>' />
 
                            </td>
                    </tr>
                    <tr>
                            <td colspan="1">
                            <telerik:RadPushButton runat="server" ID="RbtnFinishNowIP" Text="Now" CommandName="FinishNowIP" RenderMode="Auto" />
                            </td>
                                                               
                            <td colspan="1">
                            <telerik:RadPushButton runat="server" ID="RbtnFinishPlannedIP" Text="Planned" CommandName="FinishPlannedIP" RenderMode="Auto" />
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                            <td colspan="1">
                            </td>
                    </tr>
                                                     
                </table>
 
            </EditItemTemplate>
 
</telerik:GridTemplateColumn>

 

Pavlina
Telerik team
 answered on 30 Jun 2016
1 answer
90 views

I have a combo with Autopostback = false. When I click on the small arrow to pull the contents down, its triggers a postback, but if I click the text area, its does NOT cause a post back (which is what i want).   This ONLY happens then RenderMode="Lightweight" 

The combo is in the <EditItemTemplate> of a radgrid,

 <telerik:GridTemplateColumn HeaderText="Days" ItemStyle-Width="240px"  >

                            <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "Status")%>
                            </ItemTemplate>
                        
                            <EditItemTemplate>
                            <telerik:RadComboBox RenderMode="Lightweight" runat="server" ID="RadComboBox1" DataTextField="Day" 
                                DataValueField="DayID" OnDataBound="RadComboBox1_DataBound"  >
                            </telerik:RadComboBox>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>

Peter Milchev
Telerik team
 answered on 30 Jun 2016
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?