Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
Does anyone know how to make RadDatePicker fully support TaiwanCalender?
RadCalender support that.
but when it return to DateInput then will change to normal calender.
like i chooese TaiwanCalender 100/01/01 it retrun to DateInput 2011/01/01
This is a big question.because if it can't solve then no one will buy my product.
most company in Taiwan are using TaiwanCalender.

Please help me. Thanks!
Daniel
Telerik team
 answered on 25 Oct 2010
1 answer
47 views
Hi

I created custom GridBoundColumn. I want to add required field validator in edit and insert form if the column is nullable. I want to do this for every custom column. How can i check if the data in column are nullable? When i look at DataTypeName i can not see if it is nullable or not.

Thanks
Veli
Telerik team
 answered on 25 Oct 2010
1 answer
129 views
Hi,

We are using Rad Controls and Rad Grid Extensively in our project.  Right now i am working on the optimization of the Rad Controls. I want to know few scenario what we had implemented in our application. My application Structure.
1) Master Page is header part contains the Rad Menu. On Menu Click Navigates to the respective content page.
2) All our content pages contains the RadGrid
3) We are using WebUserControl for the RadGrid EditForm.
Ref : http://test.aptisys.com/UOMSetup.aspx

Please answer my below queries based on the our above mentioned application UI Structure.
1)  We are using IBindableControl interface and bind the user control form elements that in turn automatically bind to the rad grid. (We are worried does it cause any performance issues? If the binding is automatic in this manner to the Rad Grid does it takes more memory or load time than manually binding using need datasource ?
2) Which one is more faster in terms of loading the data in the grid with the webusercontrol edit form with add, edit, update and delete feature? Is it Autobinding using Ibindable interface or Using NeedDatasource?  Which is more controllable?
3) If we set the view state as false in the grid and implemented the autobinding using IBindableControl Interface. Is to programatically able to rebind the data on update?
I have seen the below code in the support resource.
protected void MyButton_Click(object sender, EventArgs e)
{
       
//perform some actions here
       
RadGrid1.DataSource = null;
       
       
//call the Rebind() method after nullifying the data source
       
RadGrid1.Rebind();
}

4) How do you get the Rad Grid Reference if it is the WebUserControl? For example when we click the save button we need to make the data source null and rebind the update datasource.
5) Is it posssible to implement rebinding of the RadGrid without need datasource if the view state is set to false?
6) If possible can you send some examples how to do it?
7) Is not so even using the need data source how do you get the reference in the of the RadGrid since it is an Web usercontrol that is tied to the rad Grid as Edit Form?
8) Could you please send us some example for both the scenario rebind the data to the RadGrid after update or save if the view state is set to false using WebUsercontrol as edit form?
9) If the view state is set to false in the RadGrid and i am using need datasource? I have seen that Grouping, Filtering feature doesnt work.  What is the workaround for these scenarios? Pls send us some examples.
10)Pls send us the examples handling grouping, filtering for the above scenario, if the View State is set as false?
11) In what scenario i can used the Ibindable interface autobinding and in what scenario i can make use of need Datasource? Pls Advice.
12) In the Heirarchy Grid, Right now we are using the Autobinding, if we go for the manual binding using the needdatasource is it complex to implement all the grouping, filtering scenario using the webusercontrol as edit form?Could you please send some example using the manual binding webusercontrol -Heirarchial RadGrid Examples supporting the Grouping, Filtering, Sorting, etc.
13) We are using the image icon as the view button on each row of the rad Grid, you can see from our url mentioned on top.? Does the image icon in the row cause any performance issue?
14) Using the Tooltip Manager in the RadGrid causes any Performance issue? What are the work around? Please advice with examples.

Thanks & Regards
Pavlina
Telerik team
 answered on 25 Oct 2010
1 answer
96 views
Hello

i am using outlook panel bar in my page.
i want to kept it in a raddock.

but when i run this the

 

OnClientItemClicking () function in the panelbar is having some errors.
when i placed the panelbar outside the raddock it works correctly..
please help me..

thanks in advance.

Nikolay Tsenkov
Telerik team
 answered on 25 Oct 2010
3 answers
153 views
Hi,
I need to know where call  and ajaxRequest in a particolar scenario:

When i click in ContexMenu of a RadTreeView i open a radwindow that receives some arguments from the RadTreeView .
On the radwindow i have two hiddenfields and a radajaxpanel that contains a formview.
I Get the args on the rad window with this javascript function

function
pageLoad() {txtInputIdLinea = document.getElementById('hdfIdLinea');

 

 

 

var currentWindow = GetRadWindow();

 

txtInputIdLinea.value = currentWindow.argument.Idlinea;}

 

 

The datasource of the formview has hdfIdLinea as a parameter.

The problem is that when the radwindow finish "loading" the formview didn't see the value set in hdfIdLinea, so  after setting the value i add an ajax Request like this
$find(

 

"<%= Panel.ClientID %>").ajaxRequest("Update panel");

And It works, but this code run in a loop and i have this exception
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

May you help me?. I need to force a postback of the FormView once time after the radwindow is loaded.
thanks._

 

Maria Ilieva
Telerik team
 answered on 25 Oct 2010
1 answer
114 views
I have a RadGrid that i a sorting by "AdmitDate". This date column could have NULL values and i need to get these rows to display on top of all other RadGrid rows. I was hoping that i could place these rows with NULL values in a group at the top of the Radgrid. Sorting the SqlDataSource in Asc order works, however i need to display the rows with actual dates in Desc order.

I was then looking into populating two SqlDataSource. 1 for the null rows and one for the non-null rows. I was then hoping that the RadGrid could append the two datasources together in the grid. Is this possible?

Any guidance as to how to accomplish this would be great.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
 
public partial class Admin_Admissions : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            GridSortExpression expression = new GridSortExpression();
            expression.FieldName = "AdmitDate";
            expression.SetSortOrder("Descending");
            RadGrid1.MasterTableView.SortExpressions.AddSortExpression(expression);
 
            //GridGroupByExpression expression1 = GridGroupByExpression.Parse("AdmitDate Group By IS NULL(AdmitDate)");
            //RadGrid1.MasterTableView.GroupByExpressions.Add(expression1);
        }
    }
 
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
 
            //foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
            //{
            //    if (column is GridTemplateColumn)
            //    {
            item["PtName"].ToolTip =
                "<strong>Patient Name:</strong><br/>" + ((System.Data.DataRowView)(item.DataItem)).Row["PtName"].ToString() + "<br/><br/>" +
                "<strong>Patient Notes:</strong><br/>" + ((System.Data.DataRowView)(item.DataItem)).Row["History"].ToString() + "<br/><br/>" +
                "<strong>Status Notes:</strong><br/>" + ((System.Data.DataRowView)(item.DataItem)).Row["Status"].ToString();
 
            RadToolTipManager1.TargetControls.Add(item["PtName"].ClientID, true);
            //    }
            //}
 
 
            Label AdmitDateLabel = item.FindControl("AdmitDateLabel") as Label;
 
            if (AdmitDateLabel != null)
            {
 
                if (((System.Data.DataRowView)(item.DataItem)).Row["AdmitDate"].ToString() == "")
                {
                    AdmitDateLabel.Text = "Pending";
                }
            }
 
 
            Label InsLabel = item.FindControl("InsLabel") as Label;
 
            if (InsLabel != null)
            {
                DataView Insurance_DataView = (DataView)Insurance_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["Ins"].ToString(), out indx))
                {
                    Insurance_DataView.Sort = "ID";
                    InsLabel.Text = Insurance_DataView[Insurance_DataView.Find(indx)]["Name"].ToString();
                }
                else
                {
                    InsLabel.Text = "";
                }
            }
 
            Label ReferralLabel = item.FindControl("ReferralLabel") as Label;
 
            if (ReferralLabel != null)
            {
                DataView Referral_DataView = (DataView)Referral_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["Referral"].ToString(), out indx))
                {
                    Referral_DataView.Sort = "ID";
                    ReferralLabel.Text = Referral_DataView[Referral_DataView.Find(indx)]["Name"].ToString();
                }
                else
                {
                    ReferralLabel.Text = "";
                }
            }
 
            Label LOCLabel = item.FindControl("LOCLabel") as Label;
 
            if (LOCLabel != null)
            {
                DataView CareLevel_DataView = (DataView)CareLevel_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["LOC"].ToString(), out indx))
                {
                    CareLevel_DataView.Sort = "ID";
                    LOCLabel.Text = CareLevel_DataView[CareLevel_DataView.Find(indx)]["CareLevel"].ToString();
                }
                else
                {
                    LOCLabel.Text = "";
                }
            }
 
            Label CampaignLabel = item.FindControl("CampaignLabel") as Label;
 
            if (CampaignLabel != null)
            {
                DataView Campaigns_DataView = (DataView)Campaigns_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["Campaign"].ToString(), out indx))
                {
                    Campaigns_DataView.Sort = "ID";
                    CampaignLabel.Text = Campaigns_DataView[Campaigns_DataView.Find(indx)]["Campaign"].ToString();
                }
                else
                {
                    CampaignLabel.Text = "";
                }
            }
 
            Label CCRepLabel = item.FindControl("CCRepLabel") as Label;
 
            if (CCRepLabel != null)
            {
                DataView CCReps_DataView = (DataView)CCReps_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["CCRep"].ToString(), out indx))
                {
                    CCReps_DataView.Sort = "ID";
                    CCRepLabel.Text = CCReps_DataView[CCReps_DataView.Find(indx)]["Name"].ToString();
                }
                else
                {
                    CCRepLabel.Text = "";
                }
            }
 
            Label StateLabel = item.FindControl("StateLabel") as Label;
 
            if (StateLabel != null)
            {
                DataView States_DataView = (DataView)States_DataSource.Select(DataSourceSelectArguments.Empty);
 
                int indx = 0;
                if (Int32.TryParse(((System.Data.DataRowView)(item.DataItem)).Row["State"].ToString(), out indx))
                {
                    States_DataView.Sort = "ID";
                    StateLabel.Text = States_DataView[States_DataView.Find(indx)]["StateName"].ToString();
                }
                else
                {
                    StateLabel.Text = "";
                }
            }
        }
    }
}
<%@ Page Title="" Language="C#" MasterPageFile="~/App_Master/Admin.master" AutoEventWireup="true"
    CodeFile="Admissions.aspx.cs" Inherits="Admin_Admissions" Theme="Reports" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 
    <script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
 
    <br />
    <div class="container_label">
        Add/Update/Delete Lead Records:</div>
    <div>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2007">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <ClientEvents OnRequestStart="onRequestStart" />
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="LeaveToolTip"
            runat="server" EnableShadow="true" RelativeTo="Element" Skin="Default" Height="150px"
            Width="250px" Animation="Resize" AutoCloseDelay="2000" Overlay="False" OffsetX="0"
            AnimationDuration="300">
        </telerik:RadToolTipManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
            AllowSorting="True" AutoGenerateDeleteColumn="True" DataSourceID="Admissions_DataSource"
            GridLines="None" ShowGroupPanel="True" Skin="Office2007" Width="1400px" Height="800px"
            PageSize="75" ShowFooter="True" AutoGenerateColumns="False" OnItemDataBound="RadGrid1_ItemDataBound"
            AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
            <ExportSettings ExportOnlyData="True" HideStructureColumns="True" FileName="LeadsExport"
                IgnorePaging="True" OpenInNewWindow="True">
            </ExportSettings>
            <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top" DataSourceID="Admissions_DataSource"
                EditMode="PopUp" GroupLoadMode="Client" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                <CommandItemSettings ExportToPdfText="Export to Pdf" ShowExportToExcelButton="True"
                    ShowExportToPdfButton="True" />
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="" HeaderStyle-Width="30">
                        <HeaderStyle Width="30px" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="AdmitDate" DataType="System.DateTime"
                        HeaderText="Admit Date" SortExpression="AdmitDate" GroupByExpression="AdmitDate Group By AdmitDate desc"
                        UniqueName="AdmitDate" HeaderStyle-Width="95">
                        <EditItemTemplate>
                            <telerik:RadDatePicker ID="RadDatePicker2" runat="server" Culture="English (United States)"
                                DbSelectedDate='<%# Bind("AdmitDate") %>' Skin="Office2007" ShowPopupOnFocus="True">
                                <Calendar Skin="Office2007" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                                    ViewSelectorText="x">
                                </Calendar>
                                <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
                                </DateInput>
                            </telerik:RadDatePicker>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="AdmitDateLabel" runat="server" Text='<%# Bind("AdmitDate", "{0:MM/dd/yyyy}") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="95px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="CallDate" DataType="System.DateTime"
                        HeaderText="Call Date" SortExpression="CallDate" GroupByExpression="CallDate Group By CallDate desc"
                        UniqueName="CallDate" HeaderStyle-Width="95">
                        <EditItemTemplate>
                            <telerik:RadDatePicker ID="RadDatePicker3" runat="server" Culture="English (United States)"
                                DbSelectedDate='<%# Bind("CallDate") %>' ShowPopupOnFocus="True" Skin="Office2007">
                                <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"
                                    Skin="Office2007">
                                </Calendar>
                                <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
                                </DateInput>
                            </telerik:RadDatePicker>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadDatePicker3"
                                ErrorMessage="Call Date Required"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="CallDateLabel" runat="server" Text='<%# Bind("CallDate", "{0:MM/dd/yyyy}") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="95px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="PtName" Groupable="False" HeaderText="Patient Name"
                        SortExpression="PtName" UniqueName="PtName" ItemStyle-Wrap="false">
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="RadTextBox1" runat="server" EmptyMessage="Patient Name" Skin="Office2007"
                                Text='<%# Bind("PtName") %>' Width="125px">
                            </telerik:RadTextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="RadTextBox1"
                                ErrorMessage="Patient name Required"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="PtNameLabel" runat="server" Text='<%# Bind("PtName") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Wrap="False" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Ins" DataType="System.Int32" HeaderText="Insurance"
                        SortExpression="Ins" GroupByExpression="Ins Group By Ins desc" UniqueName="Ins"
                        HeaderStyle-Width="140">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="Insurance_DataSource"
                                DataTextField="Name" DataValueField="ID" SelectedValue='<%# Bind("Ins") %>' Skin="Office2007"
                                NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="InsLabel" runat="server" Text='<%# Bind("Ins") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="140px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="Referral" DataType="System.Int32"
                        HeaderText="Referrer" SortExpression="Referral" GroupByExpression="Referral Group By Referral desc"
                        UniqueName="Referral" HeaderStyle-Width="100">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox2" runat="server" DataSourceID="Referral_DataSource"
                                DataTextField="Name" DataValueField="ID" SelectedValue='<%# Bind("Referral") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ReferralLabel" runat="server" Text='<%# Bind("Referral") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="100px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="LOC" DataType="System.Int32"
                        HeaderText="Level of Care" SortExpression="LOC" GroupByExpression="LOC Group By LOC desc"
                        UniqueName="LOC" HeaderStyle-Width="90">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox3" runat="server" DataSourceID="CareLevel_DataSource"
                                DataTextField="CareLevel" DataValueField="ID" SelectedValue='<%# Bind("LOC") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="LOCLabel" runat="server" Text='<%# Bind("LOC") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="90px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="Arrived" Groupable="False"
                        HeaderText="Arrived?" SortExpression="Arrived" UniqueName="Arrived" HeaderStyle-Width="80">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox4" runat="server" SelectedValue='<%# Bind("Arrived") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                                <Items>
                                    <telerik:RadComboBoxItem runat="server" Text="Yes" Value="YES" />
                                    <telerik:RadComboBoxItem runat="server" Text="No" Value="NO" />
                                    <telerik:RadComboBoxItem runat="server" Text="Unknown" Value="UNKNOWN" />
                                </Items>
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ArrivedLabel" runat="server" Text='<%# Bind("Arrived") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="80px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="CCRep" DataType="System.Int32"
                        HeaderText="Call Center Rep" SortExpression="CCRep" GroupByExpression="CCRep Group By CCRep desc"
                        UniqueName="CCRep" HeaderStyle-Width="100">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox5" runat="server" DataSourceID="CCReps_DataSource"
                                DataTextField="Name" DataValueField="ID" SelectedValue='<%# Bind("CCRep") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="CCRepLabel" runat="server" Text='<%# Bind("CCRep") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="100px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="Campaign" DataType="System.Int32" HeaderText="Campaign"
                        SortExpression="Campaign" UniqueName="Campaign" GroupByExpression="Campaign Group By Campaign desc"
                        HeaderStyle-Width="200">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox6" runat="server" DataSourceID="Campaigns_DataSource"
                                DataTextField="Campaign" DataValueField="ID" SelectedValue='<%# Bind("Campaign") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="CampaignLabel" runat="server" Text='<%# Bind("Campaign") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="200px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn DataField="State" DataType="System.Int32" HeaderText="State"
                        SortExpression="State" GroupByExpression="State Group By State desc" UniqueName="State"
                        HeaderStyle-Width="120">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox7" runat="server" DataSourceID="States_DataSource"
                                DataTextField="StateName" DataValueField="ID" SelectedValue='<%# Bind("State") %>'
                                Skin="Office2007" NoWrap="True" Sort="Ascending">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="StateLabel" runat="server" Text='<%# Bind("State") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="120px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="Value" DataType="System.Decimal"
                        Groupable="False" HeaderText="ROI Value" SortExpression="Value" UniqueName="Value"
                        HeaderStyle-Width="80">
                        <EditItemTemplate>
                            <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Culture="English (United States)"
                                DbValue='<%# Bind("Value") %>' Skin="Office2007" Type="Currency" Value="0" Width="125px"
                                EmptyMessage="Enter Dollar Value" DataType="System.Decimal">
                            </telerik:RadNumericTextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ValueLabel" runat="server" Text='<%# Bind("Value", "{0:C}") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="80px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="Status" HeaderText="Status"
                        SortExpression="Status" GroupByExpression="Status Group By Status desc" UniqueName="Status"
                        ItemStyle-Wrap="false" Visible="False">
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="RadTextBox3" runat="server" Skin="Office2007" Text='<%# Bind("Status") %>'
                                Width="125px">
                            </telerik:RadTextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="StatusLabel" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Wrap="False" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn AllowFiltering="False" DataField="History" Groupable="False"
                        HeaderText="Notes" SortExpression="History" UniqueName="History" ItemStyle-Wrap="false"
                        Visible="False">
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="RadTextBox2" runat="server" EmptyMessage="Enter History/Details/Notes"
                                Height="75px" Skin="Office2007" Text='<%# Bind("History") %>' TextMode="MultiLine"
                                Width="200px">
                            </telerik:RadTextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="HistoryLabel" runat="server" Text='<%# Bind("History") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Wrap="False" />
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <GroupingSettings ShowUnGroupButton="True" />
            <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true">
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" />
            </ClientSettings>
        </telerik:RadGrid>
        <br />
    </div>
    <asp:SqlDataSource ID="Admissions_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        InsertCommand="INSERT INTO [Admissions] ([CallDate], [PtName], [Ins], [Referral], [AdmitDate], [History], [LOC], [Arrived], [CCRep], [Status], [Campaign], [Value], [State]) VALUES (@CallDate, @PtName, @Ins, @Referral, @AdmitDate, @History, @LOC, @Arrived, @CCRep, @Status, @Campaign, @Value, @State)"
        SelectCommand="SELECT [ID], [CallDate], [PtName], [Ins], [Referral], [AdmitDate], [History], [LOC], [Arrived], [CCRep], [Status], [Campaign], [Value], [State] FROM [Admissions] ORDER BY ISNULL(AdmitDate, '20550101')"
        DeleteCommand="DELETE FROM [Admissions] WHERE [ID] = @original_ID" UpdateCommand="UPDATE [Admissions] SET [CallDate] = @CallDate, [PtName] = @PtName, [Ins] = @Ins, [Referral] = @Referral, [AdmitDate] = @AdmitDate, [History] = @History, [LOC] = @LOC, [Arrived] = @Arrived, [CCRep] = @CCRep, [Status] = @Status, [Campaign] = @Campaign, [Value] = @Value, [State] = @State WHERE [ID] = @original_ID"
        ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="CallDate" DbType="Date" />
            <asp:Parameter Name="PtName" Type="String" />
            <asp:Parameter Name="Ins" Type="Int32" />
            <asp:Parameter Name="Referral" Type="Int32" />
            <asp:Parameter Name="AdmitDate" DbType="Date" />
            <asp:Parameter Name="History" Type="String" />
            <asp:Parameter Name="LOC" Type="Int32" />
            <asp:Parameter Name="Arrived" Type="String" />
            <asp:Parameter Name="CCRep" Type="Int32" />
            <asp:Parameter Name="Status" Type="String" />
            <asp:Parameter Name="Campaign" Type="Int32" />
            <asp:Parameter Name="Value" Type="Decimal" />
            <asp:Parameter Name="State" Type="Int32" />
            <asp:Parameter Name="original_ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="CallDate" DbType="Date" />
            <asp:Parameter Name="PtName" Type="String" />
            <asp:Parameter Name="Ins" Type="Int32" />
            <asp:Parameter Name="Referral" Type="Int32" />
            <asp:Parameter Name="AdmitDate" DbType="Date" />
            <asp:Parameter Name="History" Type="String" />
            <asp:Parameter Name="LOC" Type="Int32" />
            <asp:Parameter Name="Arrived" Type="String" />
            <asp:Parameter Name="CCRep" Type="Int32" />
            <asp:Parameter Name="Status" Type="String" />
            <asp:Parameter Name="Campaign" Type="Int32" />
            <asp:Parameter Name="Value" Type="Decimal" />
            <asp:Parameter Name="State" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="CCReps_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [Name] FROM [CCReps] ORDER BY [Name]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="Insurance_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [Name] FROM [Insurance] ORDER BY [Name]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="Referral_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [Name] FROM [Referral] ORDER BY [Name]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="CareLevel_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [CareLevel] FROM [CareLevels] ORDER BY [CareLevel]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="Campaigns_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [Campaign] FROM [Campaigns] ORDER BY [Campaign]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="States_DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [StateCode], [StateName] FROM [States] ORDER BY [StateName]">
    </asp:SqlDataSource>
</asp:Content>
Martin
Telerik team
 answered on 25 Oct 2010
1 answer
111 views
Hello Telerik team,

Please give me the C# code to hide the leaf node grid in a self referencing hierarchical grid

Thanks
Shinu
Top achievements
Rank 2
 answered on 25 Oct 2010
9 answers
189 views
Hi
sorry for bothering, but I've a few problems with the programmatic creation of columns in rad grid.

I start from the scenario that for me it would be perfect because I'd like to understand how far the grid is from it:
- should be possible to create the columns of the grid in the page_load (when IsPostBack == false)
- the dynamic columns should be of type Template
- during the event phase of the page (basically when a user clicks a button) it should be possible to clear the old columns and create new ones.

I've looked to this example
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/groupby/defaultcs.aspx
where you attach columns dynamically on the onload of the page. That works with simple columns, but fails with templated columns.
For precision's sake, I'm using NeedDataSource event, but on postbacks the InstantiateIn method of the templates is not called.
Is there any way to force it on postbacks?
Should I use the simple DataBind approach?

I've also tried creating the columns in the oninit (I underline the fact that I don't like it very much, because OnInit is a very early phase of the control lifecycle. Many informations could not be there for deciding which column instantiate).
I was able to create both simple and template columns, but I had to do one of these choices:
1. Check if IsPostBack == false and leave EnableColumnsViewState == true
2. Don't check the IsPostBack property and set EnableColumnsViewState = false
Which is the correct approach?

May you give some advice on how to fulfill my scenario?

Best regards, Andrea Pirola

Iana Tsolova
Telerik team
 answered on 25 Oct 2010
1 answer
285 views
Hello friends,

I have a problem when i want to export grid data into pdf format.
All non-english charachters ( Persian(farsi)) changes into '#' charachters.
When I export the same data into excel, i have no problem.

Best regards,
Ruhollah.
Daniel
Telerik team
 answered on 25 Oct 2010
5 answers
341 views
I add a RadEditor control to my aspx page, Since spell checking functionality not required, I didn't turn it on. Now problem is, When I run my application, I got runtime error, i.e., The spellchecking functionality of RadEditor requires a dictionary file named 'en-US.tdf'.

Since, this functionality is not required, why would I suppose to add this file?

Can anyone please tell me, how to disabled spell checking functionality?

aspx source:
<telerik:RadEditor ID="radEditorBody" runat="server" SkinID="RadEditorSimple">
                    <Content>                    
                
                    </Content>
</telerik:RadEditor>

Rumen
Telerik team
 answered on 25 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?