Hi ,
I have a pie chart containing large amount of data, thus when the chart is rendered the labels overlap each other (see attached image). So, how can I show label of pie slice so it appears readable ? Is there any way to provide line connectors from pie slice to Labels…or may be something similar to this?
The project is being developed in asp.net 3.5 with C# as scripting language.
Your quick response will be appreciated.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
'/==> Directory structure (?)
'/==>~/App_Files/
'/==>~/App_Files/App_Views/
'/==>~/App_Files/App_Uploads/
'/==>~/App_Files/App_Deletes/
Dim sPath1 As String = "~/App_Files/" '/==>Parent directory (Views)
Dim sPath2 As String = "~/App_Files/App_Uploads/" '/==>Child of Parent (Uploads)
Dim sPath3 As String = "~/App_Files/App_Deletes/" '/==>Child of Parent (Deletes)
Dim saViewPaths As String() = New String() {sPath1}
Dim saUploadPaths As String() = New String() {sPath2} '/==>or {sPath2, sPath3}
Dim saDeletePaths As String() = New String() {sPath3} '/==>or {sPath2, sPath3}
rfe1.Configuration.ViewPaths = saViewPaths
rfe1.Configuration.UploadPaths = saUploadPaths
rfe1.Configuration.DeletePaths = saDeletePaths
rfe1.Configuration.SearchPatterns =
New String() {"*.*", "*.JPG"}
rfe1.Grid.Columns(1).HeaderStyle.CssClass =
"sizeColumn"
End Sub
Maybe, it will save someone else a little time.
Joe
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
Nevermind ... I finally figured out that the RadCodeBlock could go around the <script></script> code; and then it works without errors.
| <div id="content" class="content" runat="server" > |
| <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> |
| </asp:ContentPlaceHolder> |
| </div><!-- end content --> |
| .content { |
| display:block; |
| font-family: Arial, Helvetica, sans-serif; |
| font-size: small; |
| background-color: #FFFFFF; |
| left: 218px; |
| top: 85px; |
| text-align: justify; |
| position: fixed; |
| margin: 85px,218px,0,0; |
| overflow: auto; |
| height: 100%; |
| } |
| .header { |
| display:block; |
| top:0px; |
| left:0; |
| position:fixed; |
| text-align:left; |
| background:#00453D url(logo.gif) no-repeat fixed 0px 5px; |
| height: 85px; |
| vertical-align: bottom; |
| padding: 0px; |
| visibility: visible; |
| border-bottom: 10px solid #FDDEA9; |
| z-index: 1; |
| width: 100%; |
| } |
I am trying to use the Insert Command to save while using a custom Template form. I copied the code from a sample, but I cannot get it to work. Here is a copy of my code.
aspx page
| <telerik:RadGrid ID="rgEntityFinancials" runat="server" AutoGenerateColumns="False" |
| GridLines="None" Skin="Web20" Width="320px"> |
| <AlternatingItemStyle BackColor="LemonChiffon" /> |
| <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" NoMasterRecordsText="No financials available."> |
| <NoRecordsTemplate> |
| <strong><span style="font-size: 14pt; background-color: #ff0033">No Financials!</span></strong> |
| </NoRecordsTemplate> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="TaxYear" HeaderText="Tax Year" SortExpression="TaxYear" |
| UniqueName="TaxYear"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="StatementDescr" HeaderText="Stmt Type" SortExpression="StatementDescr" |
| UniqueName="StatementDescr"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="DateReceived" DataFormatString="{0:d}" HeaderText="Date Received" |
| SortExpression="DateReceived" UniqueName="DateReceived"> |
| </telerik:GridBoundColumn> |
| <telerik:GridEditCommandColumn> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridBoundColumn DataField="StatementType" HeaderText="StatementType" UniqueName="StatementType" |
| Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="True" UniqueName="ID"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <EditColumn UniqueName="EditCommandColumn1"> |
| </EditColumn> |
| <FormTemplate> |
| <table> |
| <tr> |
| <td style="width: 100px"> |
| </td> |
| <td style="width: 403px"> |
| </td> |
| </tr> |
| <tr> |
| <td style="width: 100px"> |
| <asp:Label ID="Label5" runat="server" Text="Tax Year" Width="80px"></asp:Label></td> |
| <td style="width: 403px"> |
| <asp:TextBox ID="TaxYear" runat="server" Text='<%# eval("taxyear") %>'></asp:TextBox> |
| <%-- <telerik:RadTextBox ID="rtxtTaxYear" runat="server" InvalidStyleDuration="100" Text='<%# Eval("TaxYear") %>' |
| Width="125px" Skin="Vista"> |
| </telerik:RadTextBox>--%> |
| </td> |
| </tr> |
| <tr> |
| <td style="width: 100px; height: 42px"> |
| <asp:Label ID="Label6" runat="server" Text="Statement Type" Width="128px"></asp:Label></td> |
| <td style="width: 403px; height: 42px"> |
| <%-- <telerik:RadComboBox ID="rcbStatementType" runat="server" DataSourceID="sqlStmtTypes" |
| DataTextField="StatementDescr" DataValueField="StatementType" Font-Names="Arial" |
| SelectedValue='<%# Eval("StatementType") %>' Skin="WebBlue"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox>--%> |
| </td> |
| </tr> |
| <tr> |
| <td style="width: 100px; height: 44px"> |
| <asp:Label ID="Label7" runat="server" Text="Date Received" Width="128px"></asp:Label></td> |
| <td style="width: 403px; height: 44px"> |
| <%-- <telerik:RadDatePicker ID="rdpDateReceived" runat="server" Culture="English (United States)" |
| dbselecteddate='<%# Eval("DateReceived") %>' Skin="WebBlue"> |
| <DateInput InvalidStyleDuration="100" LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue"> |
| </DateInput> |
| <Calendar Skin="WebBlue"> |
| </Calendar> |
| </telerik:RadDatePicker>--%> |
| </td> |
| </tr> |
| <tr> |
| <td style="width: 100px"> |
| <asp:LinkButton ID="btnUpdate" runat="server" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>' |
| Text='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "Insert", "Update") %>'> |
| </asp:LinkButton> |
| </td> |
| <td style="width: 403px"> |
| <asp:LinkButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" |
| Text="Cancel"></asp:LinkButton> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </MasterTableView> |
| <HeaderStyle ForeColor="White" /> |
| <ClientSettings EnableRowHoverStyle="True"> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| Public ReadOnly Property EntityFinancials() As DataTable |
| Get |
| Dim obj As Object = Me.Session("EntFinancials") |
| If (Not obj Is Nothing) Then |
| Return CType(obj, DataTable) |
| End If |
| Dim myDataTable As DataTable = New DataTable("EntityFinancials") |
| Dim row1 As DataRow |
| Try |
| Dim ID As DataColumn = New DataColumn("ID") |
| ID.DataType = System.Type.GetType("System.String") |
| myDataTable.Columns.Add(ID) |
| Dim portfolio As DataColumn = New DataColumn("Portfolio") |
| portfolio.DataType = System.Type.GetType("System.String") |
| myDataTable.Columns.Add(portfolio) |
| Dim taxYear As DataColumn = New DataColumn("TaxYear") |
| taxYear.DataType = System.Type.GetType("System.String") |
| myDataTable.Columns.Add(taxYear) |
| Dim stmtType As DataColumn = New DataColumn("stmtType") |
| stmtType.DataType = System.Type.GetType("System.String") |
| myDataTable.Columns.Add(stmtType) |
| Dim dateRcvd As DataColumn = New DataColumn("dateRcvd") |
| dateRcvd.DataType = System.Type.GetType("System.String") |
| myDataTable.Columns.Add(dateRcvd) |
| row1 = myDataTable.NewRow |
| row1.Item("ID") = 1 |
| row1.Item("portfolio") = "616" |
| row1.Item("taxyear") = "2008" |
| row1.Item("stmttype") = "tr" |
| row1.Item("datercvd") = "04/15/2009" |
| myDataTable.Rows.Add(row1) |
| Catch ex As Exception |
| Me.lblMessage.Text = ex.Message |
| End Try |
| Me.Session("EntFinancials") = myDataTable |
| Return myDataTable |
| End Get |
| End Property |
| Protected Sub rgEntityFinancials_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgEntityFinancials.NeedDataSource |
| MeMe.rgEntityFinancials.DataSource = Me.EntityFinancials |
| Me.EntityFinancials.PrimaryKey = New DataColumn() {Me.EntityFinancials.Columns("ID")} |
| End Sub |
| Protected Sub rgEntityFinancials_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgEntityFinancials.InsertCommand |
| Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) |
| Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) |
| 'Prepare new row to add it in the DataSource |
| Dim newRow As DataRow = Me.EntityFinancials.NewRow |
| 'Insert new values |
| Dim newValues As Hashtable = New Hashtable |
| newValues("Portfolio") = Me.rtxtPortfolio.Text |
| newValues("taxyear") = CType(userControl.FindControl("taxyear"), TextBox).Text |
| 'make sure that unique primary key value is generated for the inserted row |
| newValues("ID") = (CType(Me.EntityFinancials.Rows((Me.EntityFinancials.Rows.Count - 1))("ID"), Integer) + 1) |
| Try |
| For Each entry As DictionaryEntry In newValues |
| newRow(CType(entry.Key, String)) = entry.Value |
| Next |
| Me.EntityFinancials.Rows.Add(newRow) |
| Me.EntityFinancials.AcceptChanges() |
| Catch ex As Exception |
| Me.rgEntityFinancials.Controls.Add(New LiteralControl(("Unable to update/insert Financials. Reason: " + ex.Message))) |
| e.Canceled = True |
| End Try |
| End Sub |