Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
206 views
Hi guys
I am working in chart

http://demos.telerik.com/aspnet-ajax/chart/examples/functionality/yaxis2/defaultcs.aspx

In this chart i need to add label for x axis and y axis

                           |
   expense         |
                           |
                           |
                           |
                           ------------------------------------
                                      no of items

Like above

please guide me

Karthik.K
Karthik Kantharaj
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
259 views
Hello,

I am facing a issue regarding the radgrid, in which a white space is coming below the pagination, attached is the snapshot of the issue and the code, please suggest where am i going wrong.

Thanx in advance!!!
<%@ Page Title="" Language="C#" MasterPageFile="~/DWL.Master" AutoEventWireup="true"
    CodeBehind="UserList.aspx.cs" Inherits="DWL_WebApplication.UserList" %>
     
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<html>
<head>
<title></title>
        </head>
        <body style="width:100%; height:100%; background-color:#666666;">
       <div id="wrapper" class="grid" style="background-color:#F0F2F4 !important; padding-bottom:30%; margin-top:-55px; padding-left:3px; width:100%; height: 100%;">
        <form id="Form1" action="">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
             <div style="margin-left:14px; margin-right:14px; ">
            <telerik:RadGrid ID="RadGridUserList" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" GridLines="None" AllowMultiRowSelection="True" AllowAutomaticInserts="True"
                AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" Width="998px" CssClass="gridHeightSet"  OnItemDataBound="radGridUser_ItemDataBound"
                GroupingSettings-CaseSensitive="false" PageSize="20" OnItemCommand="radGridUserList_ItemCommand"
                OnInit="radGridUserList_OnInit" OnNeedDataSource="RadGridUserList_NeedDataSource">
                <HeaderContextMenu>
                </HeaderContextMenu>
                <PagerStyle AlwaysVisible="True" />
                <MasterTableView CommandItemDisplay="Top" AllowAutomaticDeletes="False" AllowAutomaticInserts="False"
                    AllowAutomaticUpdates="False" AllowFilteringByColumn="True" FilterItemStyle-Height="10px"  HeaderStyle-CssClass="gridcloumnHeader"
                     HeaderStyle-Height="35px"  FilterItemStyle-Width="100%">
                    <CommandItemTemplate>
                    </CommandItemTemplate>
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    </ExpandCollapseColumn>
                    <AlternatingItemStyle BackColor="#EDF1F3" />
                    <Columns>
                        <telerik:GridTemplateColumn AllowFiltering="False">
                        <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left"  ForeColor="White" /><ItemStyle HorizontalAlign="Left" />
                            <HeaderTemplate>
                                <asp:Label ID="lblHeaderAction" runat="server" Text="Action" CssClass="gridHAlign"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Panel ID="editButtonPanel" runat="server" Width="60px">
                                <asp:ImageButton ID="editUserButton" runat="server" OnClick="editUser_Click" Height="16px" Width="19px" ToolTip="Edit"
                                            CausesValidation="False" />
                                    <img alt="" src="images/menu_border-action.gif" />
                                    <asp:ImageButton ID="deleteUserButton" runat="server" OnClick="deleteUser" Height="16px" Width="14px" ToolTip="Delete"
                                        CausesValidation="False" />
                                </asp:Panel>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="UserID" UniqueName="columnUserId" Visible="false">
                        <HeaderStyle   />
                        </telerik:GridBoundColumn>
 
 
                        <telerik:GridBoundColumn DataField="UserName" UniqueName="columnUserName" FilterControlAltText="Filter columnUserName column"
                            HeaderText="Username" HeaderTooltip="Username" FilterControlWidth="70%" ItemStyle-HorizontalAlign="Center">
                            <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" /><ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="IsActive" AllowFiltering="false" AllowSorting="true"
                            FilterControlAltText="Filter columnCategory column" HeaderText="Status" HeaderTooltip="Status"
                            UniqueName="columnUserStatus" Visible="true">
                          <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White"/><ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
 
 
                        <telerik:GridBoundColumn DataField="UserFullName" FilterControlAltText="Filter columnDetails column"
                            HeaderText="Full Name" HeaderTooltip="Full Name" UniqueName="columnUserFullName" ItemStyle-HorizontalAlign="Center"
                            FilterControlWidth="70%">
                            <HeaderStyle CssClass="gridcloumnHeader gridHAlign" ForeColor="White" HorizontalAlign="Left"  Width="200px" Height="15px"/>
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="RoleCode" FilterControlAltText="Filter columnUserRole column"
                            HeaderText="Role" HeaderTooltip="Role" AllowFiltering="false" UniqueName="columnRole">
                             <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" />
                             <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="UserEmail" FilterControlAltText="Filter columnAssignedTo column"
                            HeaderText="Email address" HeaderTooltip="Email address" AllowFiltering="false"
                            UniqueName="columnEmailaddress" FilterControlWidth="70%">
                             <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" Width="200px" Height="15px"/>
                             <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ClientName" FilterControlAltText="Filter columnCompany By column"
                            HeaderText="Company" HeaderTooltip="Company" UniqueName="columnCompany" AllowFiltering="false"
                            FilterControlWidth="70%">
                             <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White"  Width="200px" Height="15px"/>
                             <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            </div>
        </form>
    </div>
    </body>
    </html>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
Peeyush
Top achievements
Rank 1
 answered on 18 Jan 2012
4 answers
85 views
Hi,

Please, I need a little help... 
how could change the div background-color and include a Photo in a image tag?

Please see the code below

<AppointmentTemplate>
<
div style='background-color: <%# Eval("BackgroundColor")%>); height: 200px'>
<img src='../uploads/avatars/<%# Eval("Photo") %>' style="height: 28px;float: left" alt='' />
    <%# Eval("Subject")%>
</div>
</AppointmentTemplate>

Thanks
Peter
Telerik team
 answered on 18 Jan 2012
6 answers
145 views

I will really appreciate if you can help me with the following.

In our application we have some controls with parent child functionality inside rad panel.

We need the dropdown1 ="Yes" enable the remaining controls and "No" to disable them.
On disable/enable the backcolor should change too.
We need to achieve this clientside using javascript.

The other controls include 1 textbox, 1 radDatepicker and 3 radcombobox.

The enable/disable should also change the backcolor.

What's happening is .......
1. TextBox is enabling and disabling also changing the backcolor.
2. Radcombobox is enabling and disabling but not changing the backcolor.
3. RadDatepicker is neither enabling and disabling also not changing the backcolor.

Here is the script

 

function

 

 

OnPriorCathChange() {

 

 

 

// alert("Inside OnPriorCathChange");

 

 

 

var PriorCath;

 

 

 

var ProcedureLookupCombo;

 

 

 

// var ProcedureLookupComboJs;

 

 

 

var ProcedureID;

 

PriorCath = $telerik.$(

 

"[id$='UIPriorCath']");

 

ProcedureLookupCombo = $telerik.$(

 

"[id$='UIProcedureLookupCombo']");

 

 

 

// ProcedureLookupComboJs = $find(ProcedureLookupCombo[0].id);

 

 

 

var LastCathDate;

 

 

 

var MostRecCathProcID;

 

 

 

var NumPriorCath;

 

LastCathDate = $telerik.$(

 

"[id$='UILastCathDate']");

 

MostRecCathProcID = $telerik.$(

 

"[id$='UIMostRecCathProcID']");

 

NumPriorCath = $telerik.$(

 

"[id$='UINumPriorCath']");

 

ProcedureID = $telerik.$(

 

"[id$='ProcedureID']");

 

 

 

var HFConfirm = $telerik.$("[id$='HFConfirm']");

 

 

 

// var LastCathDatetextBox = LastCathDate[0].get_textBox();

 

 

 

if (PriorCath[0].selectedIndex != 1)

 

{

// if (!confirm('All child records will be deleted. Are you sure you want to proceed?')) {

// HFConfirm.val('0');

// PriorCath[0].selectedIndex = '1';

// return false;

// }

// else {

// HFConfirm.val('1');

 

 

//__doPostBack(PriorCath[0].id, '');

 

 

 

// access the select DOM element and set the selected index

 

ProcedureLookupCombo[0].selectedIndex = 0;

ProcedureLookupCombo[0].attributes(

 

'disabled').value = true

 

 

 

// ProcedureLookupCombo[0].style.backgroundColor = "Beige";

 

ProcedureLookupCombo[0].style.backgroundColor =

 

"Beige";

 

 

 

//document.getElementById(ProcedureLookupCombo[0].id).style.backgroundColor = "Beige";

 

LastCathDate[0].value =

 

'';

 

LastCathDate[0].attributes(

 

'disabled').value = true

 

 

 

//LastCathDate.attr("disabled", "disabled");

 

 

 

// LastCathDatetextBox.css("backgroundColor", "Beige");

 

MostRecCathProcID[0].selectedIndex = 0;

MostRecCathProcID.attr(

 

"disabled", "disabled");

 

MostRecCathProcID.css(

 

"backgroundColor", "Beige");

 

ProcedureID[0].selectedIndex = 0;

ProcedureID.attr(

 

"disabled", "disabled");

 

ProcedureID.css(

 

"backgroundColor", "Beige");

 

 

NumPriorCath[0].selectedIndex = 0;

NumPriorCath.attr(

 

"disabled", "disabled");

 

NumPriorCath.css(

 

"backgroundColor", "Beige");

 

NumPriorCath.val(

 

'');

 

 

 

 

// }

 

 

}

 

 

else {

 

 

 

 

if (ProcedureLookupCombo.attr("disabled"))

 

ProcedureLookupCombo.removeAttr(

 

"disabled");

 

ProcedureLookupCombo.css(

 

"backgroundColor", "#05EDFF");

 

 

 

if (LastCathDate.attr("disabled"))

 

LastCathDate.removeAttr(

 

"disabled");

 

LastCathDate.css(

 

"backgroundColor", "#05EDFF");

 

 

 

if (MostRecCathProcID.attr("disabled"))

 

MostRecCathProcID.removeAttr(

 

"disabled");

 

MostRecCathProcID.css(

 

"backgroundColor", "#05EDFF");

 

 

 

if (NumPriorCath.attr("disabled"))

 

NumPriorCath.removeAttr(

 

"disabled");

 

NumPriorCath.css(

 

"backgroundColor", "#05EDFF");

 

}

 

}


Thanks,
Gauri

Kaushal
Top achievements
Rank 1
 answered on 18 Jan 2012
0 answers
94 views
Hi,
I try to build an asp.net 2.0 application in VS 2010, reference Telerik.Web.UI (2011.1.519.35). It has lot of errors due to Telerik.Web.UI is not resolved. The following warning I believe is important,

Warning    14    The primary reference "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".  

However, this application can be built successfully in VS 2005 with same version of Telerik.Web.UI (2011.1.519.35). What is the problem?

Thanks,
York
york
Top achievements
Rank 1
 asked on 18 Jan 2012
4 answers
192 views
Hi all,

I have a button in a GridTemplateColumn Header which I am using to open a RadWindow through code behind. Here is the .aspx:
<telerik:GridTemplateColumn UniqueName="CVATemplateColumn" InitializeTemplatesFirst="false">
  <HeaderTemplate>
     <asp:Button ID="id" runat="server" OnClick="NewWindowCommand" />
  </HeaderTemplate>
</telerik:GridTemplateColumn>

and in the code behind:
protected void NewWindowCommand(object sender, EventArgs e)
{
  RadWindowManager windowManager = new RadWindowManager();
  RadWindow radWindow = new RadWindow();
  // Set the window properties
  radWindowNavigateUrl = "radWindow.aspx";
  radWindow.ID = "radWindowId";
  radWindow.VisibleOnPageLoad = true;
  windowManager.Windows.Add(radWindow );
  Form.Controls.Add(radWindow );
}

In debug, the NewWindowCommand event handler fires and I can step through all the code, but no window appears.

However, using exactly the same event handler, if I have an asp:button outside the grid, if I click that everything works fine and the window appears.
<telerik:RadGrid>
....
</telerik:RadGrid>
<asp:Button ID="id" runat="server" OnClick="NewWindowCommand" />

Why this unexpected behaviour?
Any help would be appreciated,
Donald
Donald
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
86 views
Hi,

We have used RAD Grid with GridTableView with HierarchyDefaultExpanded=True. Attached screen shot "ExpandedColumn Grid.JPG"
There is a provision to export the gird to PDF (Third party dll). We want to hide the expand column image from header and detail view.
I have tried using MyGrid.MasterTableView.ExpandCollapseColumn.Display = false;  This Hides the grouping row and only shows the detail grid in pdf. I have also tried
(rgdGenderAgeSummaryReport.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem)["ExpandColumn"].Visible = false;
  
            foreach (GridDataItem dataItem in rgdGenderAgeSummaryReport.MasterTableView.Items)
            {
                dataItem["ExpandColumn"].Style["display"] = "none";
                dataItem["ExpandColumn"].Visible = false;
            }

This also not working. Attached screen shot of PDF. Please suggest the solution. should be able to control at runtime.
Hiren
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
61 views
  •  The problem: i have the Dock but i want the checkbox list can put inside the Dock


  •  But the multipleValuesResouceControl cannot put in the content of the dock for example:
<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px">
<telerik:RadDock ID="RadDock1" runat="server" Width="300px">
<ContentTemplate>
     <scheduler:MultipleValuesResourceControl runat="server" ID="ResStudent" Type="Student" Label="User: " />
</ContentTemplate>
</telerik:RadDock>
</telerik:RadDockZone>

will getting this error


The source code refer from example here.



Tan
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
103 views
hi,
 i am planning to use telerik grid in one of my project present i am using infragristic grid

is it possible to edit the hirarchial grid and i want to update all edited recodes at a time in the preset each row having the rowstate which indicates the whether   any one of the cell value is changed or not if change the row state is modified at the end when i click on save i go through loop and find out which row is modified and updated those rows only at the same time if we add now row the sate is new so we can update all the values at a time i want this type of functionality is is possible in the telerik grid

i am waiting for your reply

Thanks & Regards,
M.Koteswara Rao
koteswararao
Top achievements
Rank 1
 answered on 18 Jan 2012
7 answers
185 views
Hi 

The  export to excel, word, pdf, csv  feature works for me in the simple grid

Can someone let me know , whether the Export to Excel, Pdf, Word, CSV is really supported in the RADGrid having heirarchical structure
I get below error when try to export to PDF
 

Server Error in '/' Application.

System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Telerik.Web.Apoc.Fo.Flow.TableRow.CellArray.GetNextFreeCell(Int32 colNum)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.InitCellArray()
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Telerik.Web.Apoc.Fo.Flow.TableRow.CellArray.GetNextFreeCell(Int32 colNum)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.InitCellArray()
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

thanks
Shinu
Top achievements
Rank 2
 answered on 18 Jan 2012
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?