Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
66 views
hi
i write this code in itemcommandi have error
please help

  GridFooterItem footer = (GridFooterItem)e.Item;

                                CDS.Savin.WebUI.Generals.General.SumDiscount = sumDicount;
                                CDS.Savin.WebUI.Generals.General.SumPrice = SumTotalPrice;
                                (footer["Count"].FindControl("txtSumCount") as TextBox).Text = (CDS.Savin.WebUI.Generals.General.numberToMoney(SumCount.ToString()));
                                (footer["Price"].FindControl("txtSumPrice") as TextBox).Text = (CDS.Savin.WebUI.Generals.General.numberToMoney(sumprice1.ToString()));
                                (footer["Discount"].FindControl("txtSumDiscount") as TextBox).Text = (CDS.Savin.WebUI.Generals.General.numberToMoney(sumDicount.ToString()));
                                (footer["totalPrice"].FindControl("txtSumTotalPrice") as TextBox).Text = (CDS.Savin.WebUI.Generals.General.numberToMoney(SumTotalPrice.ToString()));
                                (footer["sumprice"].FindControl("txtSumPriceT") as TextBox).Text = ((SummPrice.ToString()));

Princy
Top achievements
Rank 2
 answered on 31 Jan 2011
5 answers
130 views
Hi Community, it's me again :)

I have put some own colors in my RadEditor for MOSS 2007.

<colors>
    <color value="#FFFFFF" title="Weiss" />
    <color value="#DDDDDD" title="Grau 1" />
    <color value="#AAAAAA" title="Grau 2" />
    <color value="#666666" title="Grau 3" />
    <color value="#000000" title="Schwarz" />
    <color value="#E7EBF7" title="Blau" />
    <color value="#F3E03B" title="Gelb" />
    <color value="#CC0000" title="Rot" />
    <color value="#FF6600" title="Orange" />
    <color value="#9BC73B" title="Gruen 100" />
    <color value="#AED161" title="Gruen 80" />
    <color value="#C2DD88" title="Gruen 60" />
    <color value="#D6E8AF" title="Gruen 40" />
    <color value="#EAF3D7" title="Gruen 20" />
  </colors>

Is there a possibility to view the title attribute as text instead of the hexcode as it is used by darkorange?
Rumen
Telerik team
 answered on 31 Jan 2011
2 answers
213 views
Hi, we are working on implementing Select/Insert/Update/Delete functionality using RADGrid, it is working if we use <asp:SqlDataSource>

But when we implemented the events to call our own DAOs and do the Select/Insert/Update/Delete functionality  using the custom code

the events are not getting what can be going wrong

Thanks

The code that works:

 <
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGridEquityCharacterstics">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridEquityCharacterstics" />
                    </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
           
            <telerik:RadGrid ID="RadGridEquityCharacterstics" runat="server" AllowSorting="true" DataSourceID="SqlDataSource1"
                AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                ShowStatusBar="true" Skin="Sunset" AllowMultiRowEdit="True">
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="EquityCharId" DataSourceID="SqlDataSource1"
                CommandItemDisplay="TopAndBottom" EditMode="EditForms">
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="imagebutton" />
                        <telerik:GridBoundColumn DataField="EquityCharId" DataType="System.Int32" HeaderText="EquityCharId"
                            ReadOnly="True" SortExpression="EquityCharId" UniqueName="EquityCharId" Visible="False"/>   
                        <telerik:GridBoundColumn DataField="CharType" HeaderText="CharType" SortExpression="CharType"
                            UniqueName="CharType" />
                        <telerik:GridBoundColumn DataField="RepAccount" HeaderText="RepAccount" SortExpression="RepAccount"
                            UniqueName="RepAccount" />
                        <telerik:GridBoundColumn DataField="AccountABC" HeaderText="ABC" SortExpression="AccountABC"
                            UniqueName="Account703" />
                        <telerik:GridBoundColumn DataField="AccountBCD" HeaderText="BCD" SortExpression="AccountBCD"
                            UniqueName="Account103" />
                        <telerik:GridBoundColumn DataField="SP500" HeaderText="S&P 500" SortExpression="SP500"
                            UniqueName="SP500" />
                        <telerik:GridBoundColumn DataField="R1000" HeaderText="R 1000 Value" SortExpression="R1000"
                            UniqueName="R1000" />
                        <telerik:GridBoundColumn DataField="AsOfDate" DataType="System.DateTime" HeaderText="AsOfDate"
                            SortExpression="AsOfDate" UniqueName="AsOfDate" DataFormatString="{0:MM/dd/yyyy}"/>
                        <telerik:GridButtonColumn UniqueName="ButtonColumn" Text="Delete" CommandName="Delete"
                            ButtonType="imagebutton" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <br />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DCMaster %>"
                SelectCommandType="StoredProcedure" SelectCommand="SelectEDCEquityCharacterstics" DeleteCommandType="StoredProcedure"
                DeleteCommand="DeleteEDCEquityCharacterstics" UpdateCommandType="StoredProcedure" UpdateCommand="UpdateEDCEquityCharacterstics"
                InsertCommandType="StoredProcedure" InsertCommand="InsertEDCEquityCharacterstics">
            <UpdateParameters>
                <asp:Parameter Name="CharType" Type="String" />
                <asp:Parameter Name="RepAccount" Type="String" />
                <asp:Parameter Name="AccountABC" Type="String" />
                <asp:Parameter Name="AccountBCD" Type="String" />
                <asp:Parameter Name="SP500" Type="String" />
                <asp:Parameter Name="R1000" Type="String" />
                <asp:Parameter Name="AsOfDate" Type="DateTime" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="CharType" Type="String" />
                <asp:Parameter Name="RepAccount" Type="String" />
                <asp:Parameter Name="AccountABC" Type="String" />
                <asp:Parameter Name="AccountBCD" Type="String" />
                <asp:Parameter Name="SP500" Type="String" />
                <asp:Parameter Name="R1000" Type="String" />
                <asp:Parameter Name="AsOfDate" Type="DateTime" />
            </InsertParameters>
            </asp:SqlDataSource>
        </div>
        </form>


The code that does not work
<
private void RadGridEquityCharacterstics_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) { 
GridEditableItem editedItem = e.Item as GridEditableItem
Label1.Text =
"Insert Command";  
//This is eVent is not fired
}

>

 

 

 

 

 

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 31 Jan 2011
3 answers
120 views
Hi,

    i am using rad splitter in my application.i have master page and in side that i put splitter control
splitter has two region, menu region and content region. in menu region i am using rad panel bar control for vertical
menu. i am populating the menu items dynamically.after these functionalities done screen is getting too much time to
load.please tell me the solution to improve the performance.

i have attached my sample menu screen shot please refer that 
Yana
Telerik team
 answered on 31 Jan 2011
3 answers
87 views
Hi,

I am binding the RadTReeView from the database. I want to add a image button against each node in RadTreeView. I tried it at the NodeDataBound event. But then the text disappeared and only the image button was showing up.
On the click of that image button I want to do delete the item from the database.

Please assist me...


Thanks
Rohan
Yana
Telerik team
 answered on 31 Jan 2011
1 answer
73 views
I have a need to close all the nestedviewtemplates in my grid before leaving the page.  I've tried the below code and it does not close all the rows.  Any suggestions.

foreach

 

(GridItem item in rdInsLines.MasterTableView.Controls[0].Controls)

 

{

 

if (item is GridDataItem)

 

{

 

if (item.Expanded)

 

{

item.FireCommandEvent(

"ExpandCollapse", String.Empty);

 

}


}
}
Shinu
Top achievements
Rank 2
 answered on 31 Jan 2011
1 answer
66 views
Hello,

I use a treeview include tristate mode.
My problem is that:

When i get the checkeble nodes with the following js function,
 var nodes = treeview.get_checkedNodes();
I get also the parent node that its state is indeterminate.

[¦] Parent
    [X] Child 1
    [X] Child 2
    [  ] Child 3

Is there any way to get only the checkeble nodes with no indeterminate state?

Thanks,
Oren
Princy
Top achievements
Rank 2
 answered on 31 Jan 2011
1 answer
138 views
Hello,

I am using the RadMaskedTextBox to display a mask for a Social Security Number field, but I would like to display the mask only when the textbox has the focus.  When the textbox has the focus the mask should be displayed, such as ___-__-____.  If the user enters a number of values, the mask should still be displayed along with the values entered such as 415-74-____. If the user does not enter any values or deletes these values, the mask should not be displayed. Is this possible using the RadMaskedTextBox? 

This brings a couple of issues to mind:

1. When the mask is constantly displayed in a field that is not required or doesn't need to be validated, the RadMaskedTextBox will send the mask characters to the database field.  The developer then needs to code for the mask as in:

if

 

 

(SSN == "___-__-____")
    SSN =
string.Empty;

I don't feel as though this is proper.  Is there a way around this? Can the mask be displayed only when values exists?

 

Veli
Telerik team
 answered on 31 Jan 2011
1 answer
89 views

Hi,

I've problem with my radgrid.

My page add columns to Radgrid at runtime mode.

I've fired the Page_Init event and i'm able to add columns.

After edit or insert a record into my ragrid, if I don't close the edit form and do a postback with another control (in this case a RadTab control), who a different datasource (with more or less columns) my page catch an exception: "unable to load view state".

If I close the edit form page works correctly.

How can I resolve this problem?

<telerik:RadAjaxPanel ID="pnlElenco" runat="server" Height="100%" Width="100%">
                    <asp:Label ID="lblStato" runat="server" Width="100%" CssClass="statusbar_silver" />
                    <telerik:RadGrid ID="grdElenco" runat="server" AutoGenerateColumns="true" Width="100%"
                        AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true"
                        OnInsertCommand="OnInsertCommand" OnUpdateCommand="OnUpdateCommand" OnDeleteCommand="OnDeleteCommand"
                        OnNeedDataSource="NeedDataSource" Skin="Default" PageSize="15" OnColumnCreated="OnColumnCreated">
                        <PagerStyle AlwaysVisible="false" Mode="NextPrev" />
                        <ExportSettings ExportOnlyData="true" HideStructureColumns="true" IgnorePaging="false">
                            <Excel Format="ExcelML" />
                        </ExportSettings>
                        <MasterTableView AllowPaging="true" ShowHeadersWhenNoRecords="true"
                            CommandItemDisplay="Top" EditMode="InPlace" EnableColumnsViewState="false">
                            <Columns>
                                <telerik:GridEditCommandColumn HeaderStyle-Width="40" ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                    EditText="Modifica">
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridButtonColumn ConfirmText="Eliminare questo record in maniera definitiva?"
                                    ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"
                                    CommandName="Delete" Text="Elimina" UniqueName="DeleteColumn">
                                    <ItemStyle HorizontalAlign="Center" Width="40" />
                                </telerik:GridButtonColumn>
                            </Columns>
                            <CommandItemSettings ShowExportToExcelButton="true" />
                        </MasterTableView>
                    </telerik:RadGrid>
                    <asp:HiddenField ID="txtCurrentTable" runat="server" />                    
                </telerik:RadAjaxPanel>

Regards!

Cristian

Tsvetina
Telerik team
 answered on 31 Jan 2011
9 answers
543 views
Hi,

I am using adhoc tool to populate data for RadChart pie and I don't know the column name at front for DataYColumn until end user run the adhoc query. I did add DataYColumn  at run time using following code:

radChart.Series[0].DataYColumn = ds.Tables[0].Columns[1].ColumnName;
radChart.PlotArea.XAxis.DataLabelsColumn = ds.Tables[0].Columns[0].ColumnName;
radChart.ChartTitle.TextBlock.Text = ChartTitle;
radChart.Series[0].Name = SeriesName;

protected void radChart_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e) {
        DataSet ds = (DataSet)ViewState["Result"];
        e.SeriesItem.Name = ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString();
 
        e.SeriesItem.ActiveRegion.Tooltip += ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString() + ":  " + e.SeriesItem.YValue;
    }


and aspx looks like following:
<telerik:RadChart ID="radChart" runat="server" Height="650px" AutoLayout="true" OnItemDataBound="radChart_ItemDataBound"
                                  SkinsOverrideStyles="True">
                                  <;                                                                 
                                  <ChartTitle>
                                    <TextBlock>
                                    </TextBlock>
                                  </ChartTitle>
                                  <Series>
                                    <telerik:ChartSeries>
                                      <Appearance LegendDisplayMode="ItemLabels" TextAppearance-AutoTextWrap="True">
                                      </Appearance>
                                    </telerik:ChartSeries>
                                  </Series>
                                  <PlotArea>
                                    <XAxis AutoScale="true">
                                      <Appearance TextAppearance-TextProperties-Color="Black">
                                        <TextAppearance AutoTextWrap="true">
                                        </TextAppearance>
                                        <LabelAppearance Position-AlignedPosition="Left" RotationAngle="45">
                                        </LabelAppearance>
                                      </Appearance>
                                    </XAxis>
                                  </PlotArea>
                                </telerik:RadChart>
For some reason, the Pie legend won't show up on the side.

Please help me

Alan

Yavor
Telerik team
 answered on 31 Jan 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?