Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
how to give heading on radgrid in top of the grid.
i show my form name in the radgrid
mohamed
Top achievements
Rank 1
 answered on 25 Apr 2011
1 answer
109 views
Hi,

I'm using a radcombobox within a edititemtemplate and I would like to get the selected item on the client side but no matter which technique I use I always recieve "Object expected error" or "Microsoft JScript runtime error: radcombobox1 is undefined". I'm new
to rad controls I've spent all day on this , I must be doing something wrong. Can you help?

Thanks,
Shinu
Top achievements
Rank 2
 answered on 25 Apr 2011
3 answers
163 views
Hi Expert,

             I want to get radDialog confirm result. I don't know how can i get it. I follow the site example, but before return result my button command is already fired it. i want to repalce below code with radDialog Confirm. Kindly, please advice to me.

<asp:ImageButton ID="_imgbtnNew" OnCommand="_imgbtnNew_Command" runat="server" ImageUrl="~/site_images/new.png"
ImageAlign="AbsMiddle" Height="15px" OnClientClick="javascript:return confirm('Are you sure?');" ></asp:ImageButton>


Best Regards,
ALEX
Top achievements
Rank 1
 answered on 25 Apr 2011
2 answers
161 views
I have a grid with detail table, I would like user to allow multiple parent rows, but only single row from detail table. Is that possible? I see that AllowMultiRowSelect is at Grid level, not table view level. So when I enable that, it allows selection of multiple rows on both parent and child rows.

At the same time, I want to allow user to select detail table row only if parent row is NOT slected and allow to select parent row only if child row is NOT selected. Is there a way to achieve this task?

thanks,
Sameers
Sameers
Top achievements
Rank 1
 answered on 24 Apr 2011
3 answers
146 views
My problem has a long description, hopefully the subject made enough sense. :) I have a datepicker control in the itemtemplate of the combobox, when the popup calendar goes away, the Combobox drop down gets a scroll bar. This only happens in chrome.

The RadComboBox is created as
<telerik:RadComboBox ID="cboDateRange" runat="server" width="175px"
    DropDownWidth="325px" CloseDropDownOnBlur="False" Font-Bold="True" 
    AllowCustomText="false">
    <ItemTemplate>
        <asp:Label ID="lblDateRange" runat="server" Text="Date Range" Font-Bold="true"></asp:Label><br />
        <div id="divStartDateSelected" class="divFloatLeft">
            <telerik:RadDatePicker ID="dateStartDate" runat="server" Width="90px" >
                <DateInput SelectionOnFocus="SelectAll">
                </DateInput>
                <Calendar ShowRowHeaders="false"></Calendar>
            </telerik:RadDatePicker>
        </div>
        <div class="divFloatLeft">
             <asp:Label ID="lblDateRangeDash" runat="server" Text="-"></asp:Label>  
        </div>
        <div id="divEndDateSelected" class="divFloatLeft">
            <telerik:RadDatePicker ID="dateEndDate" runat="server" Width="90px">
                <DateInput SelectionOnFocus="SelectAll">
                </DateInput>
                <Calendar ShowRowHeaders="false"></Calendar>
            </telerik:RadDatePicker>
        </div>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem Text="" Selected="True" />
    </Items>
</telerik:RadComboBox>

I haven't had time to create a minimal project to dig into it more, but thought I'd post to see if there was any quick fixes or known problems. I'm running the latest release of Telerik and Chrome is 5.0.375.125.

Thanks
Thad
Top achievements
Rank 2
 answered on 23 Apr 2011
22 answers
414 views
I don't get the value in radgrid itemcomman how i pass in the need data soucrce
please replay as soon as possible




<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewModels.aspx.cs" Inherits="TBS_HelpDesk.Views.Assets.NewModels"
    MasterPageFile="~/Views/Shared/MasterPage.Master" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="aboutContent" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid runat="server" ID="RadGrid1" CellPadding="0" GridLines="None" AutoGenerateColumns="False"
        AllowPaging="True" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn DataField="Manuf_ID" DataType="System.Int32" HeaderText="Manuf ID"
                    SortExpression="Manuf_ID" UniqueName="Manuf_ID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Manuf_Name" HeaderText="Manuf Name" SortExpression="Manuf_Name"
                    UniqueName="Manuf_Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Manuf_Description" HeaderText="Manuf Description"
                    SortExpression="Manuf_Description" UniqueName="Manuf_Description">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
    </telerik:RadGrid>
    <telerik:RadGrid runat="server" ID="RadGrid2" CellPadding="0" GridLines="None" AutoGenerateColumns="False"
        AllowPaging="True" Skin="WebBlue" OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid2_NeedDataSource">
        <MasterTableView CommandItemDisplay="Top" EditFormSettings-PopUpSettings-Modal="true"
            EditMode="PopUp">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                <telerik:GridNumericColumn DataField="Model_ID" HeaderText="Model Id" SortExpression="Model_ID"
                    UniqueName="Model_ID" Visible="false" ReadOnly="true">
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn DataField="Model_Name" HeaderText="Model Name" SortExpression="Model_Name"
                    UniqueName="Model_Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Model_Description" DataType="System.Boolean"
                    HeaderText="Model Description" SortExpression="Model_Description" UniqueName="Model_Description">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" UniqueName="DeleteColumn"
                    CommandArgument="Child" ConfirmDialogType="RadWindow" ConfirmText="Are You Sure Want To Delete This Record?"
                    ConfirmTitle="Delete Confirm" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</asp:Content>






using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using Telerik.Web.UI;
using System.Data.SqlClient;
using System.Configuration;


namespace TBS_HelpDesk.Views.Assets
{
    public partial class NewModels : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
            //    LoadManufacturers();
            //}            
        }

        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            DataTable dtTable = new DataTable();
            string conn = ConfigurationManager.ConnectionStrings["TBSHelpDeskLiveDB_ConnectionString"].ToString();
            SqlDataAdapter sqladp = new SqlDataAdapter();
            SqlConnection sqlconn = new SqlConnection(conn);
            sqlconn.Open();

            try
            {
                string selectQuery = "SELECT Manuf_ID,Manuf_Name,Manuf_Description FROM [AssetManufacturers] order by Manuf_ID asc";
                sqladp.SelectCommand = new SqlCommand(selectQuery, sqlconn);
                sqladp.Fill(dtTable);
                RadGrid1.DataSource = dtTable;

            }
            finally
            {
                sqlconn.Close();
            }
        }

        protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            SqlConnection connection = new SqlConnection(
         ConfigurationManager.ConnectionStrings["TBSHelpDeskLiveDB_ConnectionString"].ConnectionString);

            SqlDataAdapter adapter = new SqlDataAdapter("SELECT Model_ID,Model_Name,Model_Description FROM " +
                " AssetModels WHERE Model_Manuf_ID =  ", connection);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            RadGrid2.DataSource = dt;
        }


        protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "RowClick")
            {
                GridDataItem item = (GridDataItem)e.Item;
                string Manuf_ID = item["Manuf_ID"].Text;
                LoadModels(Manuf_ID);
            }
        }
        protected void LoadModels(string Manuf_ID)
        {
            SqlConnection connection = new SqlConnection(
      ConfigurationManager.ConnectionStrings["TBSHelpDeskLiveDB_ConnectionString"].ConnectionString);

            SqlDataAdapter adapter = new SqlDataAdapter("SELECT Model_ID,Model_Name,Model_Description FROM " +
                " AssetModels WHERE Model_Manuf_ID=@Manuf_ID ORDER By Model_Manuf_ID,Model_ID", connection);
            adapter.SelectCommand.Parameters.AddWithValue("@Manuf_ID", Manuf_ID);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            RadGrid2.DataSource = dt;
            RadGrid2.DataBind();
        }
    }
}
mohamed
Top achievements
Rank 1
 answered on 23 Apr 2011
1 answer
66 views
I have a radgrid that i am trying to customize using properties like backcolor.
I changed the backcolor of my header to be red (#E31B23) in both the mastertableview and the main grid properties; on the design view in visual studio the color is changed, but once i try to see the change in the browser the color is not there.

Same thing when i change the skin of the grid: in visual studio i see the change of skin, but once i go live in a browser, nothing is changed. Please help. 
Pavlina
Telerik team
 answered on 22 Apr 2011
1 answer
62 views
I have a simple web page that gives the option of selecting one of two radio buttons.  Depending on which one they select, I want of the bottom portion of the form to become visible after they select the 2nd radio button, but otherwise I want it to remain hidden.  Seems like I used to do this with a plain Ajax panel, but I don't see one listed now.
dean.carrefour
Top achievements
Rank 1
 answered on 22 Apr 2011
13 answers
324 views
Hello,

In IE8 and FF3 i run into a strange problem.

I know all about the 100% solution, and use this standard on every page.
e.q. 
    <style type="text/css">  
        html, body, form  
        {  
            width: 100%;  
            height: 100%;  
            overflow: hidden;  
        }  
    </style> 

 

If i use a simple radgrid with Scrolling-UseStaticHeaders="true" on a page, without any container or other control, the grid is 100% heigth, and this is working perfect.
But as soon as i put a RadAjaxmanager on the page, the RadGrid is going from 300px to 10 px in a split second when the page load, and stays 10px.
e.q. 

 

    <telerik:RadAjaxManager ID="RAM" runat="server" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="myRadrid (or any other control)">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="myRadGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

 

For testing i put the Radgrid inside the form container, so the heigth for the container is set.
I can write a workaround in js to follow the window height, but that is not real smooth solution.
The Grid is then loading from 300px, to 10px, and then the right height...

I'am sure the RadAjaxmanager is the reason for this, but is there a solution?
p.s. i use the latest 2009.1 402 build.

 

Michael
Top achievements
Rank 1
 answered on 22 Apr 2011
6 answers
283 views
Hi,
I am putting together a line chart to display data from a MSSQL database but cannot stop the numerical score labels from displaying. I have gone through all of the examples but need a little assistance. Please take a look at what I have and add what I need to stop the scores from rendering on the lines. I have attached images of existing render and table.
I appreciate your time.

<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:IPdataConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT top 7 Date = CONVERT(char(10), Date, 101), score, IPaddress, Partner FROM IPhistory WHERE Partner = 'NEAstates' ORDER BY Date ASC;" runat="server">
</asp:SqlDataSource>
            <telerik:radchart id="RadChart4" runat="server" width="800px" datasourceid="SqlDataSource1"
                defaulttype="Line" autolayout="true" charttitle-visible="false">
                <Appearance TextQuality="AntiAlias">
                </Appearance>
                <PlotArea>
                <Appearance Dimensions-Margins="18%, 24%, 12%, 16%"></Appearance>
                    <YAxis Step="10" AxisMode="Extended">
                        <Appearance MajorGridLines-Visible="true" MinorGridLines-Visible="false">
                        </Appearance>
                    </YAxis>
                    <XAxis DataLabelsColumn="Date" LayoutMode="Between">
                        <Appearance ValueFormat="ShortDate" MajorGridLines-Visible="true">
                            <LabelAppearance RotationAngle="10" Position-AlignedPosition="Top">
                            </LabelAppearance>
                        </Appearance>
                    </XAxis>
                </PlotArea>
            </telerik:radchart>

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        // Manually setting the series groups and Y values columns
        RadChart4.DataGroupColumn = "IPaddress";
        RadChart4.DataManager.ValuesYColumns = new string[1] { "score" };
        RadChart4.Skin = "LightBlue";
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Type = ChartSeriesType.Line;
        chartSeries.Appearance.LabelAppearance.Visible = false;
    }
}


JT
Top achievements
Rank 1
 answered on 22 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?