Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
42 views
Hi there,

We would like to rebind the RadGrid before I stream the content to the browser window? Can this be achieved?

Thanks
Antonio Stoilkov
Telerik team
 answered on 22 Feb 2012
3 answers
330 views
Hello,

We are developing webparts for Sharepoint 2010.  There is one strict rule we have to obey - not to modify default sharepoint master pages, because it would be very difficult to support this changes later on when webparts are distributed to clients. From the other hand we would like to modify the master page dynamically, adding RadScriptManager and RadAjaxManager controls from the OnInit event of the webpart.

With RadAjaxManager there is no problem, but replacing the default ScriptManager with RadScriptManager causes a strange exception. To recreate the problem create a blank visual web part and create the OnInit override method like this:

protected override void OnInit(EventArgs e)
{
    base.OnInit(e);
 
    //this is a recomendation of Telerik, do not know if it necessary in Sharepoint 2010?
 
    Page.ClientScript.RegisterStartupScript(typeof(BlankWebPart), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
    if (this.Page.Form != null)
    {
        string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
        if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
        {
            this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
        }
    }
 
 
    //Remove System.Web.UI.ScriptManager from Page.Form.Controls and Page.Items
    foreach (Control ctr in Page.Form.Controls)
    {
        if (ctr.GetType() == typeof(System.Web.UI.ScriptManager))
        {
            Page.Form.Controls.Remove(ctr);
            break;
        }
    }
    Page.Items.Remove(typeof(ScriptManager));
 
    //Problematic code. If you remove it, no exception
    RadScriptManager rsm = new RadScriptManager();
    // rsm.ID = "RadScriptManager1";
    Page.Items.Add(rsm.GetType(), rsm);
    Page.Form.Controls.AddAt(0, rsm);
 
    //Adding Ajax manager, working ok
    RadAjaxManager ram = new RadAjaxManager();
    ram.ID = "RadAjaxManager1";
    Page.Items.Add(ram.GetType(), ram);
    Page.Form.Controls.AddAt(2, ram);
}

The PageInit is executed without problems, but replacing script manager this way causes an exception later on.

Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

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.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Source Error:

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.

Stack Trace:

[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.]
   System.Web.UI.ScriptManager.get_IPage() +654824
   System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +59
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +11039454
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3672


Already a day spent fighting with it, but no success.



Cat Cheshire
Top achievements
Rank 1
 answered on 22 Feb 2012
2 answers
135 views
Is there any way to get the count of checked nodes under a given node. The reason is because, i dont want to loop through all nodes and get the checked nodes on the client side. My entire operations are based on the client 
        I was just wondering if i can use the json string in _clientState.checkedNodes to find the count? 
mirang
Top achievements
Rank 1
 answered on 22 Feb 2012
1 answer
156 views
Hello,

Can I have a RadTabStrip inside of a ContentPlaceHolder that loads content into a RadMultiPage control that sits on the MasterPage?  Setting the radTabStrip.MultiPageID to either the ID or ClientID of the RadMultiPage still leaves radTab.MultiPage set to null so PageViews can not be added dynamically.

More details:
Our master page has a content place holder for tabs and we want to be able to have the RadMultiPage control on the MasterPage so that it can be shared by the half dozen user controls with RadTabStrip controls.  Also, we want to decouple the two controls so that the content loaded into the MultiPage can be positioned in the page flow wherever the designers feel it should sit.

Piece of master page:
<!-- holds the page banner -->
<asp:Panel runat="server" ID="pnlBanner">
    <asp:ContentPlaceHolder ID="cphBannerContent" runat="server" />
</asp:Panel>
<!-- holds the tabstrip appropriate for the appropriate page -->
<asp:Panel runat="server" ID="pnlTabs">
    <asp:ContentPlaceHolder ID="cphTabsContent" runat="server" />
</asp:Panel>
<div class="contentWidth">
    <!-- Content placed at the beginning of the page prior to any regular content-->
    <asp:Panel runat="server" ID="pnlPageHeader">
        <asp:ContentPlaceHolder ID="cphPageHeaderContent" runat="server" />
    </asp:Panel>
    <div>
        <telerik:RadMultiPage ID="rmpMain" runat="server" SelectedIndex="0" />
    </div>
    <!-- Master page automatically ajaxifies any content placed here -->
    <asp:Panel runat="server" ID="pnlAutoAjaxified">
        <asp:ContentPlaceHolder ID="cphAutoAjaxifiedContent" runat="server" />
    </asp:Panel>
    <!-- Any content placed here must be ajaxified by the page -->
    <asp:Panel runat="server" ID="pnlSelfAjaxified">
        <asp:ContentPlaceHolder ID="cphSelfAjaxifiedContent" runat="server" />
    </asp:Panel>
</div>

On our page we have a RadTabStrip inside of the content placeholder "cphTabsContent" and dynamically load UserControls into each tab when clicked using code derived from the demo program.
Here is the RadTabStrip on the demo page:
<telerik:RadTabStrip ID="rtsDemo" runat="server" AutoPostBack="true" CausesValidation="false"
    Orientation="HorizontalTop" SelectedIndex="0">
    <Tabs>
        <telerik:RadTab NavigateUrl="" Text="Tab 1" ToolTip="Tab 1" Value="Tab1" />
        <telerik:RadTab NavigateUrl="" Text="Tab 2" ToolTip="Tab 2" Value="Tab2" />
        <telerik:RadTab NavigateUrl="" Text="Tab 3" ToolTip="Tab 3" Value="Tab3" />
        <telerik:RadTab NavigateUrl="" Text="Tab 4" ToolTip="Tab 4" Value="Tab4" />
    </Tabs>
</telerik:RadTabStrip>

In the OnInit event I'm trying to set the MultiPageID of the RadTabStrip to the one on the MasterPage, but no matter what I do it doesn't work.
rtsDemo.MultiPageID = "rtsMain"; // didn't work
rtsDemo.MultiPageID = "ctl100_rtsMain"; // didn't work

When we click on a tab, here is the code that runs:
private void TabStrip_TabClick(object sender, RadTabStripEventArgs e)
{
    AddPageView(e.Tab);
    SelectTab(e.Tab);
}
 
private void AddPageView(RadTab radTab)
{
    RadPageView pageView = new RadPageView {ID = radTab.Value, Selected = true};
    // If the PageView is already added to the RadMultiPage, then don't add it again
    if (MasterMultiPage.PageViews.Cast<RadPageView>().Any(multiPage => multiPage.ID == radTab.Value))
    {
        radTab.PageViewID = pageView.ID;
        radTab.PageView.Selected = true;
        return;
    }
    // Add a new PageView to the RadMultiPage
    MasterMultiPage.PageViews.Add(pageView);
    radTab.PageViewID = pageView.ID;
    radTab.PageView.Selected = true;// ERROR!!  radTab.PageView is always NULL
}
 
private static void SelectTab(RadTab tab, bool withParent = true)
{
    // Select tab
    tab.Selected = true;
 
    // Determine if tab has tab
    if (withParent && tab.Parent is RadTab)
    {
        tab.SelectParents();
    }
}
Dimitar Terziev
Telerik team
 answered on 22 Feb 2012
4 answers
116 views
btnupdate9 not working :(


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UC_tahsilat.ascx.cs" Inherits="SNN.islemler_tahsilat_UC_tahsilat" %>
<table width="100%">
    <tr>
        <td>
        </td>
    </tr>
    <tr>
        <td>
        </td>
    </tr>
</table>
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" SelectedIndex="0" MultiPageID="RadMultiPage1">
    <Tabs>
        <telerik:RadTab Text="Genel Bilgiler" Selected="True">
        </telerik:RadTab>
        <telerik:RadTab Text="Tutar GiriÅŸ">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" Height="218px"
    Width="100%" CssClass="multiPage">
    <telerik:RadPageView runat="server" ID="Genel_Bilgiler">
        <table width="100%">
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <table style="width: 100%; border: 1px solid #f0f0f0;">
                        <tr>
                            <td style="width: 160px;">
                                Proje
                            </td>
                            <td style="width: 50px;">
                            </td>
                            <td style="width: 195px;">
                                <telerik:RadComboBox ID="cmbProje" runat="server" AppendDataBoundItems="true" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.PROJE_KODU")%>'
                                    DataSourceID="dsProje" DataTextField="KISA_ADI" DataValueField="PROJEKOD" Width="200px"
                                    Culture="tr-TR" TabIndex="1" AllowCustomText="True" AutoPostBack="True" OnSelectedIndexChanged="cmbProje_SelectedIndexChanged">
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ForeColor="Red" ID="RequiredFieldValidator4"
                                    ControlToValidate="cmbProje" Display="Dynamic" ErrorMessage="*" ValidationGroup="FormValidationGroup" />
                            </td>
                            <td style="width: 150px;">
                            </td>
                            <td style="width: 180px;">
                                Ä°ÅŸlem Tutarı
                            </td>
                            <td style="width: 50px;">
                                <telerik:RadComboBox ID="cmbParaBirim" runat="server" AppendDataBoundItems="true"
                                    Culture="tr-TR" DataSourceID="dsParaBirim" DataTextField="PARABIRIM" DataValueField="PARABIRIM"
                                     
                                    TabIndex="6" Width="50px">
                                </telerik:RadComboBox>
                            </td>
                            <td style="width: 195px;">
                                <telerik:RadNumericTextBox ID="txtTutarLokal" runat="server" Culture="tr-TR"
                                    NumberFormat-DecimalDigits="0" TabIndex="7" Width="195px">
                                    <NumberFormat DecimalDigits="0" ZeroPattern="n" />
                                    <EnabledStyle HorizontalAlign="Right" />
                                </telerik:RadNumericTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtTutarLokal"
                                    Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="FormValidationGroup" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Ä°ÅŸveren
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbIsveren" runat="server" AppendDataBoundItems="true" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.ISVEREN_KODU")%>'
                                    DataSourceID="dsIsveren" DataTextField="ADI" DataValueField="KOD" Width="200px"
                                    Culture="tr-TR" TabIndex="2">
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ForeColor="Red" ID="RequiredFieldValidator7"
                                    ControlToValidate="cmbIsveren" Display="Dynamic" ErrorMessage="*" ValidationGroup="FormValidationGroup" />
                            </td>
                            <td>
                            </td>
                            <td>
                                Tutar (€)
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtTutarEuro" runat="server"
                                    Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="0" TabIndex="9">
                                    <EnabledStyle HorizontalAlign="Right" />
                                </telerik:RadNumericTextBox>
                                <asp:RequiredFieldValidator runat="server" ForeColor="Red" ID="RequiredFieldValidator1"
                                    ControlToValidate="txtTutarEuro" Display="Dynamic" ErrorMessage="*" ValidationGroup="FormValidationGroup" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Tarih
                            </td>
                            <td>
                            </td>
                            <td>
                                <mark:DateTimePicker ID="dateTarih" runat="server" ShowClearButton="true" UseImageButtons="true"
                                    PickerCssClass="Picker" Culture="tr-TR" Format="dd-MM-yyyy" Text='<%# DataBinder.Eval( Container, "DataItem.ISLEM_TARIHI") %>'
                                    CancelButtonText="Seç" ClearButtonText="Temizle" SelectButtonText="Seç..." TabIndex="3"
                                    NoCurrentValueText="Tarih Seçilmedi" OKButtonText="Tamam" Width="150px" />
                                <asp:RequiredFieldValidator runat="server" ForeColor="Red" ID="RequiredFieldValidator2"
                                    ControlToValidate="dateTarih" Display="Dynamic" ErrorMessage="*" ValidationGroup="FormValidationGroup" />
                            </td>
                            <td>
                            </td>
                            <td>
                                Tutar ($)
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtTutarDolar" runat="server" Culture="tr-TR"
                                    NumberFormat-DecimalDigits="0" TabIndex="11" Width="195px">
                                    <EnabledStyle HorizontalAlign="Right" />
                                </telerik:RadNumericTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtTutarDolar"
                                    Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="FormValidationGroup" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Ä°ÅŸlem
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbIslem" runat="server" AppendDataBoundItems="true" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.HAREKET_TIPI")%>'
                                    DataSourceID="dsIslemTip" DataTextField="ADI" DataValueField="KOD" Width="200px"
                                    Culture="tr-TR" TabIndex="4">
                                </telerik:RadComboBox>
                            </td>
                            <td>
                            </td>
                            <td>
                                  Pasif
                            </td>
                            <td>
                            </td>
                            <td>
                                  
                                <asp:CheckBox ID="chkPasif" runat="server"
                                    Checked='<%# (DataBinder.Eval(Container,"DataItem.PASIF")) %>' TabIndex="13" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Tahsilat Ülkesi
                            </td>
                            <td>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="cmbTahsilatUlke" runat="server" AppendDataBoundItems="true"
                                    SelectedValue='<%# DataBinder.Eval( Container, "DataItem.ULKE_KODU")%>' DataSourceID="dsUlke"
                                    DataTextField="ADI" DataValueField="KOD" Width="200px" Culture="tr-TR" TabIndex="5"
                                    EnableAutomaticLoadOnDemand="False" EnableTextSelection="True" AllowCustomText="True">
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ForeColor="Red" ID="RequiredFieldValidator6"
                                    ControlToValidate="cmbTahsilatUlke" Display="Dynamic" ErrorMessage="*" ValidationGroup="FormValidationGroup" />
                            </td>
                            <td>
                                <asp:Label ID="lblHareketID" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.ID") %>'></asp:Label>
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                            </td>
                            <td>
                                  
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 25px; vertical-align: middle;">
                                Açıklama
                            </td>
                            <td align="left">
                                  
                            </td>
                            <td colspan="5" align="left">
                                <telerik:RadTextBox ID="txtAciklama" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.ACIKLAMA") %>'
                                    TextMode="MultiLine" TabIndex="14" Width="99%" MaxLength="150">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="border: 1px solid #f0f0f0;">
                    <telerik:RadButton ID="btnUpdate" Text="Güncelle" runat="server" CommandName="Update"
                        Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' ValidationGroup="FormValidationGroup">
                    </telerik:RadButton>
                    <telerik:RadButton ID="btnInsert" Text="Kaydet" runat="server" CommandName="PerformInsert"
                        Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>' ValidationGroup="FormValidationGroup">
                    </telerik:RadButton>
                      
                    <telerik:RadButton ID="btnCancel" Text="Kapat" runat="server" CausesValidation="False"
                        CommandName="Cancel">
                    </telerik:RadButton>
                </td>
                <td>
                </td>
            </tr>
        </table>
    </telerik:RadPageView>
    <telerik:RadPageView runat="server" ID="Tutar_Giris">
        <table width="100%">
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <table style="width: 100%; border: 1px solid #f0f0f0;">
                        <tr>
                            <td>
            
                                <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                                    CellSpacing="0" DataSourceID="dsTutar" GridLines="None" ShowFooter="True">
                                    <ClientSettings>
                                        <Selecting AllowRowSelect="True" />
                                    </ClientSettings>
                                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="KOD"
                                        DataSourceID="dsTutar" EditMode="PopUp" NoMasterRecordsText="Gösterilecek kayıt bulunamadı."
                                        Width="100%">
                                        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Ekle" RefreshText="Yenile">
                                        </CommandItemSettings>
                                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                        </RowIndicatorColumn>
                                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                        </ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="KOD" DataType="System.Int64" FilterControlAltText="Filter KOD column"
                                                HeaderText="KOD" ReadOnly="True" SortExpression="KOD" UniqueName="KOD" Visible="false">
                                            </telerik:GridBoundColumn>
                                               <telerik:GridBoundColumn DataField="HAREKET_ID" DataType="System.Int64" FilterControlAltText="Filter HAREKET_ID column"
                                                HeaderText="HAREKET_ID" SortExpression="HAREKET_ID" UniqueName="HAREKET_ID">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridDropDownColumn DataField="DOVIZ" FilterControlAltText="Filter DOVIZ column"
                                                HeaderText="Döviz" SortExpression="DOVIZ" UniqueName="DOVIZ" DataSourceID="dsDoviz"
                                                DataType="System.String" ListTextField="PARA_BIRIM" ListValueField="PARA_BIRIM">
                                            </telerik:GridDropDownColumn>
                                            <telerik:GridBoundColumn DataField="SOZLESME_TUTAR" DataType="System.Double" FilterControlAltText="Filter SOZLESME_TUTAR column"
                                                HeaderText="Tahsilat Tutarı" SortExpression="SOZLESME_TUTAR" UniqueName="SOZLESME_TUTAR"
                                                DataFormatString="{0:N0}">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="YEREL_PARITE" DataType="System.Double" FilterControlAltText="Filter YEREL_PARITE column"
                                                HeaderText="Yerel Parite" SortExpression="YEREL_PARITE" UniqueName="YEREL_PARITE"
                                                DataFormatString="{0:N4}">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="YEREL_TUTAR" DataType="System.Double" FilterControlAltText="Filter YEREL_TUTAR column"
                                                HeaderText="Yerel Tutar" SortExpression="YEREL_TUTAR" UniqueName="YEREL_TUTAR"
                                                DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}"
                                                ReadOnly="true">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="EUR_PARITE" DataType="System.Double" FilterControlAltText="Filter EUR_PARITE column"
                                                HeaderText="EUR Parite" SortExpression="EUR_PARITE" UniqueName="EUR_PARITE" DataFormatString="{0:N4}">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="EUR_TUTAR" DataType="System.Double" FilterControlAltText="Filter EUR_TUTAR column"
                                                HeaderText="EUR Tutar" SortExpression="EUR_TUTAR" UniqueName="EUR_TUTAR" ReadOnly="true"
                                                DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="USD_PARITE" DataType="System.Double" FilterControlAltText="Filter USD_PARITE column"
                                                HeaderText="USD Parite" SortExpression="USD_PARITE" UniqueName="USD_PARITE" DataFormatString="{0:N4}">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="USD_TUTAR" DataType="System.Double" FilterControlAltText="Filter USD_TUTAR column"
                                                HeaderText="USD Tutar" SortExpression="USD_TUTAR" UniqueName="USD_TUTAR" ReadOnly="true"
                                                DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="KDV_ORANI" DataType="System.Double" FilterControlAltText="Filter KDV_ORANI column"
                                                HeaderText="Kdv Oranı" SortExpression="KDV_ORANI" UniqueName="KDV_ORANI" DataFormatString="{0:N0}">
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="YEREL_TUTAR_KDVLI" DataType="System.Double" FilterControlAltText="Filter YEREL_TUTAR_KDVLI column"
                                                HeaderText="Yerel Tutar + Kdv" SortExpression="YEREL_TUTAR_KDVLI" UniqueName="YEREL_TUTAR_KDVLI"
                                                ReadOnly="true" DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="EUR_TUTAR_KDVLI" DataType="System.Double" FilterControlAltText="Filter EUR_TUTAR_KDVLI column"
                                                HeaderText="EUR Tutar + Kdv" SortExpression="EUR_TUTAR_KDVLI" UniqueName="EUR_TUTAR_KDVLI"
                                                ReadOnly="true" DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="USD_TUTAR_KDVLI" DataType="System.Double" FilterControlAltText="Filter USD_TUTAR_KDVLI column"
                                                HeaderText="USD Tutar + Kdv" SortExpression="USD_TUTAR_KDVLI" UniqueName="USD_TUTAR_KDVLI"
                                                ReadOnly="true" DataFormatString="{0:N0}" Aggregate="Sum" FooterAggregateFormatString="{0:N0}">
                                                <FooterStyle HorizontalAlign="Right" Font-Bold="True" />
                                                <HeaderStyle HorizontalAlign="Right" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridEditCommandColumn CancelText="Kapat" EditText="Düzenle" FilterControlAltText="Filter EditCommandColumn column"
                                                InsertText="Kaydet" UpdateText="Güncelle">
                                                <ItemStyle Width="30px" />
                                            </telerik:GridEditCommandColumn>
                                        </Columns>
                                        <EditFormSettings EditFormType="Template" InsertCaption="Tutar GiriÅŸ" CaptionFormatString="Tutar GiriÅŸ">
                                            <FormTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td>
                                                              
                                                        </td>
                                                        <td>
                                                              
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                        </td>
                                                        <td>
                                                            <table style="width: 100%; border: 1px solid #f0f0f0;">
 
                                                                <tr>
                                                                    <td style="width: 160px;">
                                                                        Döviz
                                                                    </td>
                                                                    <td style="width: 160px;">
                                                                        <telerik:RadComboBox ID="cmbDoviz1" runat="server" DataSourceID="dsDoviz" DataTextField="PARA_BIRIM"
                                                                            Filter="Contains" DataValueField="PARA_BIRIM" TabIndex="2" Width="200px" SelectedValue='<%# Bind("DOVIZ")%>'>
                                                                        </telerik:RadComboBox>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Tahsilat Tutarı
                                                                    </td>
                                                                    <td>
                                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox3" runat="server" DbValue='<%# Bind("SOZLESME_TUTAR")%>'
                                                                            Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="0" TabIndex="3">
                                                                            <EnabledStyle HorizontalAlign="Right" />
                                                                        </telerik:RadNumericTextBox>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Yerel Parite
                                                                    </td>
                                                                    <td>
                                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" DbValue='<%# Bind("YEREL_PARITE")%>'
                                                                            Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="4" TabIndex="4">
                                                                            <EnabledStyle HorizontalAlign="Right" />
                                                                        </telerik:RadNumericTextBox>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        EUR Parite
                                                                    </td>
                                                                    <td>
                                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox2" runat="server" DbValue='<%# Bind("EUR_PARITE")%>'
                                                                            Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="4" TabIndex="5">
                                                                            <EnabledStyle HorizontalAlign="Right" />
                                                                        </telerik:RadNumericTextBox>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        USD Parite
                                                                    </td>
                                                                    <td>
                                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox4" runat="server" DbValue='<%# Bind("USD_PARITE")%>'
                                                                            Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="4" TabIndex="6">
                                                                            <EnabledStyle HorizontalAlign="Right" />
                                                                        </telerik:RadNumericTextBox>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Kdv Oran
                                                                    </td>
                                                                    <td>
                                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox5" runat="server" DbValue='<%# Bind("KDV_ORANI")%>'
                                                                            Width="195px" Culture="tr-TR" NumberFormat-DecimalDigits="0" TabIndex="7">
                                                                            <EnabledStyle HorizontalAlign="Right" />
                                                                        </telerik:RadNumericTextBox>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                        </td>
                                                        <td>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                        </td>
                                                        <td style="border: 1px solid #f0f0f0;">
                                                            <telerik:RadButton ID="btnUpdate9" Text='<%# (Container is GridEditFormInsertItem) ? "Kaydet" : "Güncelle" %>'
                                                                runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                                                TabIndex="8" ValidationGroup="FormValidationGroup">
                                                            </telerik:RadButton>
                                                              
                                                            <telerik:RadButton ID="btnCance9" Text="Kapat" runat="server" CausesValidation="False"
                                                                CommandName="Cancel" TabIndex="9">
                                                            </telerik:RadButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </FormTemplate>
                                            <EditColumn FilterControlAltText="Filter EditCommandColumn column" CancelText="Kapat"
                                                InsertText="Kaydet" UpdateText="Güncelle">
                                            </EditColumn>
                                            <PopUpSettings CloseButtonToolTip="Kapat" Width="310px" Height="300px" />
                                        </EditFormSettings>
                                    </MasterTableView>
                                    <FilterMenu EnableImageSprites="False">
                                    </FilterMenu>
                                </telerik:RadGrid>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:SqlDataSource ID="dsTutar" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
                        DeleteCommand="DELETE FROM [HAREKET_TUTAR] WHERE [KOD] = @KOD"
                        InsertCommand="INSERT INTO HAREKET_TUTAR(HAREKET_ID, DOVIZ, SOZLESME_TUTAR, YEREL_PARITE, EUR_PARITE, USD_PARITE, KDV_ORANI) VALUES (@HAREKET_ID, @DOVIZ, @SOZLESME_TUTAR, @YEREL_PARITE, @EUR_PARITE, @USD_PARITE, @KDV_ORANI)"
                        SelectCommand="SELECT KOD, HAREKET_ID, DOVIZ, SOZLESME_TUTAR, YEREL_PARITE, YEREL_TUTAR, EUR_PARITE, EUR_TUTAR, USD_PARITE, USD_TUTAR, KDV_ORANI, YEREL_TUTAR_KDVLI, EUR_TUTAR_KDVLI, USD_TUTAR_KDVLI FROM HAREKET_TUTAR WHERE (HAREKET_ID = @HAREKET_ID)"                      
                        UpdateCommand="UPDATE HAREKET_TUTAR SET DOVIZ = @DOVIZ, SOZLESME_TUTAR = @SOZLESME_TUTAR, YEREL_PARITE = @YEREL_PARITE, EUR_PARITE = @EUR_PARITE, USD_PARITE = @USD_PARITE, KDV_ORANI = @KDV_ORANI WHERE (KOD = @KOD)">
                        <DeleteParameters>
                            <asp:Parameter Name="KOD" Type="Int64" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:ControlParameter ControlID="lblHareketID" Name="HAREKET_ID" PropertyName="Text" Type="Int64" />
                            <asp:Parameter Name="DOVIZ" Type="String" />
                            <asp:Parameter Name="SOZLESME_TUTAR" Type="Double" />
                            <asp:Parameter Name="YEREL_PARITE" Type="Double" />
                            <asp:Parameter Name="EUR_PARITE" Type="Double" />
                            <asp:Parameter Name="USD_PARITE" Type="Double" />
                            <asp:Parameter Name="KDV_ORANI" Type="Double" />
                        </InsertParameters>
                        <SelectParameters>
                            <asp:ControlParameter ControlID="lblHareketID" Name="HAREKET_ID"
                                PropertyName="Text" />
                        </SelectParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="DOVIZ" Type="String" />
                            <asp:Parameter Name="SOZLESME_TUTAR" Type="Double" />
                            <asp:Parameter Name="YEREL_PARITE" Type="Double" />
                            <asp:Parameter Name="EUR_PARITE" Type="Double" />
                            <asp:Parameter Name="USD_PARITE" Type="Double" />
                            <asp:Parameter Name="KDV_ORANI" Type="Double" />
                            <asp:Parameter Name="KOD" Type="Int64" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <asp:SqlDataSource ID="dsDoviz" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
                        SelectCommand="SELECT [PARA_BIRIM] FROM [_ULKE] ORDER BY [ADI]"></asp:SqlDataSource>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="border: 1px solid #f0f0f0;">
                      
                </td>
                <td>
                </td>
            </tr>
        </table>
    </telerik:RadPageView>
</telerik:RadMultiPage>
<asp:SqlDataSource ID="dsParaBirim" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
    SelectCommand="SELECT PARA_BIRIM AS PARABIRIM FROM _ULKE ORDER BY PARABIRIM">
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsProje" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
    SelectCommand="SELECT KOD AS PROJEKOD, KISA_ADI FROM _PROJE WHERE (PASIF = 0) ORDER BY KISA_ADI">
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsUlke" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
    SelectCommand="SELECT KOD, ADI FROM _ULKE WHERE (PASIF = 0) ORDER BY ADI"></asp:SqlDataSource>
<asp:SqlDataSource ID="dsIslemTip" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
    SelectCommand="SELECT KOD, ADI, PASIF FROM _HAREKET_TIPI WHERE (PASIF = 0) ORDER BY ADI">
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsIsveren" runat="server" ConnectionString="<%$ ConnectionStrings:DASHBOARD_KAYIConnectionString %>"
    SelectCommand="SELECT _FIRMA.KOD, _FIRMA.ADI, _PROJE_ISVEREN.PROJE_KODU FROM _PROJE_ISVEREN INNER JOIN _FIRMA ON _PROJE_ISVEREN.FIRMA_KODU = _FIRMA.KOD WHERE (_PROJE_ISVEREN.PASIF = 0) AND (_PROJE_ISVEREN.PROJE_KODU = @PROJE)">
    <SelectParameters>
        <asp:ControlParameter ControlID="cmbProje" Name="PROJE" PropertyName="SelectedValue" />
    </SelectParameters>
</asp:SqlDataSource>
Tsvetina
Telerik team
 answered on 22 Feb 2012
3 answers
214 views
I'm having some issues with the datepicker in a radwindow

1) does the EnableScreenBoundaryDetection work for RadWindow instances as well as browser window instances?

2) I have also tried to set EnableScreenBoundaryDetection to "false" and set the PopupDirection value to TopRight. The datepicker always pops up in the same place.. right below the dateinput. In the end, I can make my dialog larger toaccomodate the datepicker, but I would prefer not to have to.

Here is my markup:

<

 

telerik:RadDatePicker ID="rdpDate" runat="server" Width="100px" DateInput-DateFormat="MM/dd/yyyy" style="vertical-align:middle;z-index:20000" EnableScreenBoundaryDetection="true"></telerik:RadDatePicker>

My Rad Window Z-index is set to 7500.

Attached is what this looks like:

 

Galin
Telerik team
 answered on 22 Feb 2012
3 answers
250 views
Hi,

I have one RadPanelBar on my page. My requirement is to add or remove RadPaneItem dynamically on check change of one checkboxlist. There is a User control with multiple radgrids to load inside every RadPanelItem. Check chenge of checkboxlist will be handled at client side and there will be an ajax call to add RadPanelItem with Usercontrol inside. Now my problem is I am unable to add Ajax response of new RadPanelItem in RadPanelBar. 

I am working on version: Asp.Net Ajax Q3 2011
Telerik.Web.UI Version 2011.3.1115.40
Runtime version v4.0.30319
Asp.net 4.0

Please find attached image and code for batter understanding.

Regards,
Ankit
Kate
Telerik team
 answered on 22 Feb 2012
3 answers
109 views
Hi,

I am using AsyncUpload and have set the MaxFileSize property to 20mb, now I want to validate the filesize and display an error message next to the contol. to check the filesize. The control shows red dot next to file saying that validation failed but I would like to display a custom error message. Is it possible?

Thanks,
Raji
Dimitar Terziev
Telerik team
 answered on 22 Feb 2012
3 answers
270 views
I am using the radeditor in one of my screens and currently I have the tools as dropdowns. One dropdown has the possibility of having too many values. It will be difficult for the user to go through the entire list to find his item. So, I was thinking about using a type ahead combo box in the tools instead of the dropdown. I looked around and couldn't find anything similar. Please let me know if it is possible to replace the dropdowns with typeahead combos and if it is, please give me some sample code to accomplish that.

Thank you,
Vithiya
Rumen
Telerik team
 answered on 22 Feb 2012
1 answer
152 views

Hi,

I have a question regarding client side binding. I think I am missing something here but can't find any information on how to properly do this from the documentation. Anyhow, I am using json object to bind to the grid as my datasource. I have no problem binding this to the grid. I tried it with a default grid without any settings and it works like a charm. The problem i get is when I tried to do paging. I put PageSize="2" and AllowPaging="True" as seen below and it simply doesn't work. In my example below I have 6 items, it always shows 6 items in the grid even with the page size set to 2. The paging icons below the grid seems to show the right numbers though based on the row count I declared. (mtv.set_virtualItemCount(msg.length);)


To add to that, when I try to click the next page (or any paging button), the grid just disappears.

A simple example like this that works would be very helpful.

//javscript

function bindGrid(){
var msg = [{ "ID": 1, "Text": "Text1" }, { "ID": 2, "Text": "Text2"}, 
   { "ID": 3, "Text": "Text3"}{ "ID": 4, "Text": "Text4"}
   { "ID": 5, "Text": "Text3"}{ "ID": 6, "Text": "Text6"} 
]

var grid = $find("<%=  RadGrid1.ClientID %>")
var mtv = grid.get_masterTableView();
        mtv.set_dataSource(msg);
        mtv.dataBind();          
        mtv.set_virtualItemCount(msg.length);

} 

<
telerik:RadGrid ID="RadGrid1" runat="server" >               
<
mastertableview PageSize="2" AllowPaging="true" >                   
<
Columns>                       
<
telerik:GridBoundColumn DataField="ID" HeaderText="ID" />
                        <telerik:GridBoundColumn DataField="Text" HeaderText="DocName" />
                </Columns>               
</
mastertableview><br>               
<
clientsettings>                   
<
ClientEvents  OnCommand=function(){} />               
</
clientsettings>
</
telerik:RadGrid>
Tsvetina
Telerik team
 answered on 22 Feb 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?