Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
104 views
RadControls for ASP.NET AJAX Version: 2011.1 519 (May 19, 2011) No support for .NET 2.0?

I did not find the folder bin20 in the trial download link. can you please advise.
Sebastian
Telerik team
 answered on 23 Jun 2011
1 answer
109 views
I am trying to implement the custom skin from the Car Rental demo at http://demos.telerik.com/aspnet-ajax/carrental/about.aspx. I have downloaded the zip file and put this in my app_themes folder but it looks like maybe some images are missing or a main .css is missing. Can anyone provide me a step by step process to implement the skin properly into my web application.
Bozhidar
Telerik team
 answered on 23 Jun 2011
2 answers
75 views
Hi There,

I have a page which uses a radupload control.

We seem to encounter a problem when a user tries to insert script tags to the field. eg.

<script>
somethingnasty
</script>

What is the suggested way to either validate this input, strip it out, or prevent the error we're being shown.

The error shown is 'htmlfile : access is denied' which after some searching, seems related to possible the control caling form.submit, behind the scenes.

Are there build in validator methods we can use with the radupload control? or a way to link it sensibly to a normal asp:validator control?

Many thanks,

Doug
Peter Filipov
Telerik team
 answered on 23 Jun 2011
1 answer
244 views

Hello everybody ,

I have a combobox inside of a Radgrid and want to be bound on runtime.

There is a very suit sample in Q1 2011 version of Telerik Demo under grid title(Gridà.Net3.5àEntity Framework Manual CRUD Operations) but it is very simple and there are just some common data Management about textbox.

But I tend to do that with a relational model,Suppos that we have two tables ,USERS and GENDER related with a f_key.

USER{UserID int ,Username nvarchar , GenderID int}

GENDER{GenderID int ,Longname nvarchar}

My  aspx file is like this :

  <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"

                AllowPaging="true" AllowSorting="true" OnDeleteCommand="RadGrid1_DeleteCommand"

                OnInsertCommand="RadGrid1_InsertCommand" AllowFilteringByColumn="true" OnUpdateCommand="RadGrid1_UpdateCommand"

                OnUnload="RadGrid1_Unload">

                <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="false" DataKeyNames="USERID"

                    InsertItemPageIndexAction="ShowItemOnCurrentPage">

                    <Columns>

                        <telerik:GridBoundColumn   DataField="UserID" HeaderText="UserID" UniqueName="UserID" />

                        <telerik:GridBoundColumn DataField="Username" HeaderText="Username" UniqueName="Username" />

                        <telerik:GridTemplateColumn DataField="GENDER" HeaderText="GENDER" UniqueName="GENDER" >

                            <InsertItemTemplate>

                                <telerik:RadComboBox ID="RadComboBox1" runat="server"

                                    Width="140px" />

                            </InsertItemTemplate>

                            <EditItemTemplate>

                                <telerik:RadTextBox ID="RadTComboBox1" runat="server"

                                    ReadOnly="true" Width="140px" />

                            </EditItemTemplate>

 

                    </Columns>

                </MasterTableView>

            </telerik:RadGrid>

 

 

 

How I do my CRUDoperation with this realational model with EntityFramework.

I should demonstarte that I have an edmx file with two entities:tbl_Users , tbl_Gender and I tend to do this operation in Codebehind.

Some common code is such as this,if we use only textbox :

protected void RadGrid1_Unload(object sender, EventArgs e)

    {

        if (DbContext != null)

            DbContext.Dispose();

    }

 

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)

    {

        RadGrid1.DataSource = DbContext.tbl_User.Select("it.UserID,it.Username,...");

       

    }

 

    protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)

    {

        GridEditableItem item = e.Item as GridEditableItem;

        int _userId = (int)item.GetDataKeyValue("UserID");

        tbl_User _tbl_user = DbContext.tbl_User.Where(p => p.UserID == _userId).FirstOrDefault();

        item.UpdateValues(_tbl_user);

        DbContext.SaveChanges();

    }

 

    protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)

    {

        GridEditableItem item = e.Item as GridEditableItem;

        Hashtable values = new Hashtable();

        item.ExtractValues(values);

        tbl_User _tbl_user = new tbl_User();

        item.UpdateValues(_tbl_user);

        DbContext.AddTotbl_User(_tbl_user);

        DbContext.SaveChanges();

    }

 

    protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)

    {

        int _userId = (int)(e.Item as GridDataItem).GetDataKeyValue("UserID");

        tbl_User _tbl_user = DbContext.tbl_User.Where(p => p.USERID == _userId).FirstOrDefault();

        DbContext.DeleteObject(_tbl_user);

        DbContext.SaveChanges();

    }

 

 

Radoslav
Telerik team
 answered on 23 Jun 2011
4 answers
263 views
Hi,

I have a  form with RadComboBox. I have set EmptyMessage for RadComboBox. I need to keep that ComboBox focused when the page is loaded and start typing.

I tried followings.

in Page load event

1.
this.Form.DefaultFocus = RadComboBox1.ClientID;

2.
RadAjaxManager am = RadAjaxManager.GetCurrent(this);
 
am.FocusControl(RadComboBox1.ClientID + "_Input");
RadScriptManager1.SetFocus(RadComboBox1);


In 1st method RadComboBox is focused but EmptyMessge is not cleared. when we type, "EmptyMessage" also remains.

In 2nd method all work fine only in IE. but not in FireFox or Chrome.

Can anybody help regarding this matter ?.

Thank you,

Dinesh 
Helen
Telerik team
 answered on 23 Jun 2011
1 answer
448 views
Hi,

I am Srinivasa

in my project i have a problem for bind the Date form backend table to RadDatePicker in Rad Grid. But in my data Base in date column i have a empty value. 

here i am using the client side coding for bind Date data to RadDatePicker in RadGrid like the following way...

                       <telerik:RadDatePicker ID="actstart" runat="server" MaxDate='<%# Convert.ToDateTime(Eval("early_start_display")).ToString("dd/MMM/yyyy") %>' Width="100px" Calendar-ShowOtherMonthsDays="false" 
                        Calendar-ShowRowHeaders="false" DbSelectedDate='<%# Bind("actual_start") %>' DateInput-DateFormat="MM/dd/yyyy">
                       </telerik:RadDatePicker>

But it shows the error at the time of Date Column Null value in the DataBase...

Error is :

object cannot be cast from dbnull to other types

Please Help me.

Thanks

D.Srinivasa
Veli
Telerik team
 answered on 23 Jun 2011
2 answers
148 views










Dear Sir:
    I have a asp.net application and i used the radsplitter to separate top RadPane and bottom RadPane. the top panel will show up a separate web page with a grid inside. when any one of the row selected in the top pane and the client side will ask the bottom pane to show up the detail of the record.
   everything work fine when it first time show up but the problem will happen when i clicked on some of the button/links and the page will AJAX post back to server and rebind the grid again. The tool tips on the top panel's grid works fine but when i clicked on the row and the detail pane show up. the tool tips on the bottom pane will show up the error

"Rad Tool Tip manager response error
    An unknown error occurred while processing to the request on the server. the status code returned from the server was 12031"


i am not sure is it the problem of the ajaxmanager's setting for the top pane, after the row selected on the grid and the bottom pane's page will FULLY RELOAD. when i click on the control and tooltip will show up the error.

i tried to use the latest version of telerik but it still  not work.

i include some code for you to have look. i hope i can give you some help for understand for my situration. if you want then i can included my source code to you

Search_Instruction.aspx
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline" >
                   <AjaxSettings>
                         
                       <telerik:AjaxSetting AjaxControlID="grdInstruction">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" 
                                   LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" 
                                   LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="RadToolTipManager1">
                           <UpdatedControls
                               <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" 
                                   LoadingPanelID="RadAjaxLoadingPanel1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="lbtnBound4Locator">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboUnitLocator" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                               <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="lbtnBound5Locator">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboUnitLocator" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                               <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="lbtnPropertyLocator">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboUnitLocator" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                               <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="cboBuildingLocator">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound4Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="litBound5Locator" />
                               <telerik:AjaxUpdatedControl ControlID="lbtnPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litPropertyLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="litBuildingLocator" />
                               <telerik:AjaxUpdatedControl ControlID="cboUnitLocator" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="cboUnitLocator">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="rtbStockMenu">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="grdInstruction" LoadingPanelID="RadAjaxLoadingPanel1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="mnuInstructionAction">
                           <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdInstruction" 
                                   LoadingPanelID="RadAjaxLoadingPanel1" />
                               <telerik:AjaxUpdatedControl ControlID="mnuInstructionAction" />
                               <telerik:AjaxUpdatedControl ControlID="lbMsg" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                   </AjaxSettings>
                   <ClientEvents />
               </telerik:RadAjaxManager>
       <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
       OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" 
       CssClass="ToolTipCssClass"
       Animation="Resize" AnimationDuration="300"  
       ShowDelay="0" AutoCloseDelay="0"
       HideDelay="1000" Skin="Hay"
       Width="510px" Height="200px"
       ShowCallout="False"
       ContentScrolling="Auto"
       OffsetX="50" 
       OffsetY="80"
       Position="MiddleRight"  
       HideEvent="ManualClose"
       ShowEvent="OnClick"
       ManualClose="True" 
       meta:resourcekey="RadToolTipManager1Resource1" onclientresponseerror="ToolTipManager_OnClientResponseError" >
   </telerik:RadToolTipManager>

Search_Instruction.aspx.cs

protected void grdInstruction_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridHeaderItem)
    {
        GridHeaderItem headerItem = (GridHeaderItem)e.Item;
    }
    else if (e.Item is GridDataItem)
    {
        GridDataItem dataItem = (GridDataItem)e.Item;
          
          
        //Control lnkOwnerName = e.Item.FindControl("lnkOwnerName");
        if (!Object.Equals(this.RadToolTipManager1, null))
        {
            if (dataItem["Owner_ID_Text"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", "") != "")
            {
                RadToolTipManager1.TargetControls.Add(((HyperLink)dataItem["Owner_Name"].FindControl("lnkOwner_Name")).ClientID, "Owner_Name|" + dataItem["Owner_ID_Text"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", ""), true);
            }
            if (dataItem["Owner_Contact_ID_Text"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", "") != "")
            {
                RadToolTipManager1.TargetControls.Add(((HyperLink)dataItem["Owner_Contact"].FindControl("lnkOwner_Contact")).ClientID, "Owner_Contact|" + dataItem["Owner_Contact_ID_Text"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", ""), true);
            }
            if (dataItem["Occupant_ID"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", "") != "")
            {
                RadToolTipManager1.TargetControls.Add(((HyperLink)dataItem["Occupant_Name"].FindControl("lnkOccupant_Name")).ClientID, "Occupant_Name|" + dataItem["Occupant_ID"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", ""), true);
            }
            if (dataItem["UC_Exist"].Text.Replace(" ", "") != "0")
            {
                RadToolTipManager1.TargetControls.Add(((HyperLink)dataItem["Unit_Number_From"].FindControl("lnkUnit_Number_From")).ClientID, "Unit_Number_From|" + dataItem["Unit_Id"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", ""), true);
            }
            if (dataItem["Tenant_Id"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", "") != "")
            {
                RadToolTipManager1.TargetControls.Add(((HyperLink)dataItem["Tenant_Name"].FindControl("lnkTenant_Name")).ClientID, "Tenant_Name|" + dataItem["Tenant_Id"].Text.Replace(" ", "").Replace("<nobr>", "").Replace("</nobr>", ""), true);
            }
        }
        switch (dataItem["Agency_Code"].Text.Trim())
        {
            case "SoleA":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Red";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                 
                break;
            case "co-op":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Pink";
                  
                break;
            case "Multi":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Blue";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                 
                break;
            case "Hearsay":
                dataItem["ClientSelectColumn"].Style["background-color"] = "ForestGreen";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                  
                break;
            case "co-op (sa)":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Gray";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                  
                break;
            case "active":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Orange";
                  
                break;
            case "cp-op(COM)":
                dataItem["ClientSelectColumn"].Style["background-color"] = "rgb(132, 112, 255)";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                 
                break;
            case "Surrender":
                dataItem["ClientSelectColumn"].Style["background-color"] = "LightSkyBlue";
                break;
            case "Lead":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Maroon";
                dataItem["ClientSelectColumn"].Style["color"] = "White";
                 
                break;
            case "Cobreak":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Cyan";
                break;
            case "OwnerList":
                dataItem["ClientSelectColumn"].Style["background-color"] = "Olive";
                break;
        }
        if (dataItem["UnderOffer"].Text.Trim() == "1")
        {
            dataItem["ClientSelectColumn"].Style["background-color"] = "Yellow";
        }
    }
}



CH
Top achievements
Rank 1
 answered on 23 Jun 2011
1 answer
124 views
Hi!

In week view I just point on the start time-slot and drag down to my desired en-time to make an appointment.
But how do i accomplish the same thing in month view? Multi selecting days doesn´t work.
I need this feature to let my employee select their vacation days.

Any ideas?

I'm using Telerik v.2011.1.519.40

Sincerely, Thomas
Veronica
Telerik team
 answered on 23 Jun 2011
5 answers
126 views
Guys,
When I use oRotator.set_currentItemIndex(newIndex); there is no animation. Is it possible to have an animation with currentItemIndex method?

Thanks!
Niko
Telerik team
 answered on 23 Jun 2011
1 answer
171 views
Hi,

I have a RadCombo inside a RadGrid. I am using RadCombo inside a templated column so that user can select any value without changing the Grid mode to Edit. My Goal is to update the server information asyncronously when the user changes the grid value.

I have the onCLientSelectedIndexChange event functional. But I need the Primary Key from the Row.

Any suggestions on How i can achieve this behavior?
Thanks,
Navneet


Princy
Top achievements
Rank 2
 answered on 23 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?