Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
48 views
Hi - i've just started playing with rad chart. i've come across an annoyance - i have setup a number of custom series, colours, etc for the chart. if i change any of the chart properties (series orientation, show data charts, anything) it removes all my customisations, and shows all of the series form the data source, applies the original colours , loses the custom legend text, etc....

is there a way to stop tit doing this!?
Ves
Telerik team
 answered on 28 Oct 2009
2 answers
42 views
Hello,

I am using RadControls for asp.net Ajax_2009_2_826 

while using advannced attributes i am getting "Validation (XHTML 1.0 Transitional): Element 'Advancedform' not supported" error with red underline below <AdvancedForm modal="True">...


please let me know where i am going wrong.. 

Thanks In advanced
Peter
Telerik team
 answered on 28 Oct 2009
1 answer
124 views
Hi,
I am having a link button in my webpage and i have disabled that link button, now i am not able to get tooltip on that disabled link button in IE8, whereas it is working fine in IE7.

Can u please suggest me a solution as my projects goes live on 27th of this month i need a quick solution.


Thanks in advance.

Regards,
Suresh S
Tsvetie
Telerik team
 answered on 28 Oct 2009
1 answer
47 views
Hi,

I have a telerik menu that is working well, apart from the ImageOverUrl property.

The ExpandedImageUrl is working fine for when I have child options, but not the ImageOverUrl.

Any ideas?

Thanks in advance!



Yana
Telerik team
 answered on 28 Oct 2009
9 answers
239 views
I  have been using Terlerik for many many years now and it is pretty much the only product design system I used to release my products. But for some time now I noticed that with each major Q release the Skins layouts seems to change drastically from previous builds causing site redesign. 

The latest Q1 2009 build seems to really change the skin layout for the controls I used even though I use my own modified skins from Q3 2008.  I think there needs to be a better way to upgrade to the latest builds without having to keep changing skin layouts.  That way, you still can get the latest technology Telerik releases and only optionally change your Skin.

One suggestion I would recommend is to use the Skins folder to store old skins in its build directory.  For example
 
Skins\Q320081125\...
Skins\Q12009311\...

That way, if you wanted to change to previous or future skins, you have that option.

I don't know if this is affecting others but it is becoming a nightmare for me when I spend a lot of time redesigning the presentation layer for every release.

Thanks,
Tim
Martin
Telerik team
 answered on 28 Oct 2009
1 answer
84 views
Hi,

I have been trying to use Jquery to apply some logic to the edit elements on my form.

The grid is auto generated and all the rows are in edit mode I have tried

$("INPUT").Keyup to access the edit items (as this is how the elements appear when i look at the source of the page but the jquery doesnt find it)

I know the jquery is working as I have put an onload alert message.

Is there anything todo with the grid which would prevent it form working?

Thanks
Tsvetoslav
Telerik team
 answered on 28 Oct 2009
3 answers
83 views
I am get the value for End After.  For example, UNTIL=20090330T000000Z and COUNT=22 and NO END Date.

Is there an object that contains this?

Thanks

Vincent
Peter
Telerik team
 answered on 28 Oct 2009
1 answer
112 views
Hi There,

When I add items to the clicked item in the ItemClick event, I would like the current item (e.Item) to be expanded after the postback. Setting the Expanded property does not work for me.

Thanks,

-Derek
Shinu
Top achievements
Rank 2
 answered on 28 Oct 2009
1 answer
127 views
HI

Iam using Rad Grid View  When I scroll grid view Scrolling is very very slow

How can Make fast when i select Rad Gridview

Regards
S.Senthilnathan
Princy
Top achievements
Rank 2
 answered on 28 Oct 2009
2 answers
176 views
Can anyone tell whats wrong with the following code? The inert / update failed with message " Cannot insert null value to database, etc" Thanks


Asp.net:

    <asp:SqlDataSource ID="LessonHardStudentDescDataSource" runat="server" 
       ConnectionString="<%$ ConnectionStrings:EnglishAGoGoConnectionString %>" 
       SelectCommand="select * from LESSONHARD_STUDENTDESCRIPTION where LessonHard_ID = @SelectLessonHard_ID" 
       InsertCommand="INSERT INTO LESSONHARD_STUDENTDESCRIPTION (LessonHard_ID, LessonHard_Name_Student, LessonHard_Description_Student, ResourceLanguage_ID) VALUES (@InsertLessonHard_ID, @InsertLessonHard_Name_Student, @InsertLessonHard_Description_Student, @InsertResourceLanguage_ID)" 
       UpdateCommand="Update LESSONHARD_STUDENTDESCRIPTION SET LessonHard_Name_Student=@UpdateLessonHard_Name_Student, LessonHard_Description_Student=@UpdateLessonHard_Description_Student, ResourceLanguage_ID=@UpdateResourceLanguage_ID">        
        <InsertParameters> 
            <asp:Parameter DbType="Guid" Name="InsertLessonHard_ID" /> 
            <asp:Parameter DbType="String" Name="InsertLessonHard_Name_Student" /> 
            <asp:Parameter DbType="String" Name="InsertLessonHard_Description_Student" /> 
            <asp:Parameter DbType="Int32" Name="InsertResourceLanguage_ID" /> 
        </InsertParameters> 
        <UpdateParameters> 
            <asp:Parameter DbType="String" Name="UpdateLessonHard_Name_Student" /> 
            <asp:Parameter DbType="String" Name="UpdateLessonHard_Description_Student" /> 
            <asp:Parameter DbType="Int32" Name="UpdateResourceLanguage_ID" /> 
        </UpdateParameters> 
    </asp:SqlDataSource> 
 
<telerik:RadGrid ID="RadGridResource" runat="server" AllowAutomaticDeletes="True"   
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True"   
                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"   
            AutoGenerateColumns="False" GridLines="None"   
                onitemdatabound="RadGridResource_ItemDataBound" OnItemDeleted="RadGridResource_ItemDeleted"   
            OnItemInserted="RadGridResource_ItemInserted"   
                OnItemUpdated="RadGridResource_ItemUpdated"   
                DataSourceID="LessonHardStudentDescDataSource"   
                onitemcommand="RadGridResource_ItemCommand">  
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="LHSD_ID"   
                DataSourceID="LessonHardStudentDescDataSource">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridEditCommandColumn> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="LessonHard_ID" HeaderText="LessonID" UniqueName="LessonHard_ID"   
                        Visible="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"   
                        DataField="LessonHard_Name_Student" HeaderText="Name" ShowFilterIcon="False"   
                        SortExpression="LessonHard_Name_Student" UniqueName="LessonHard_Name_Student">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"   
                        DataField="LessonHard_Description_Student" HeaderText="Description"   
                        ShowFilterIcon="False" SortExpression="LessonHard_Description_Student"   
                        UniqueName="LessonHard_Description_Student">                          
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="ResourceLanguage_ID" DataType="System.Int32" HeaderText="Type" DataSourceID="ResourceLangDataSource" 
                        SortExpression="ResourceLanguage_ID" UniqueName="ResourceLanguage_ID"   
                        ListTextField="ResourceLanguageName" ListValueField="ResourceLanguageID">  
                        <FilterTemplate> 
                            <telerik:RadComboBox ID="RadComboBox1" DataSourceID="ResourceLangDataSource" DataTextField="ResourceLanguageName" 
                                DataValueField="ResourceLanguageID" AppendDataBoundItems="true"   
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ResourceLanguage_ID").CurrentFilterValue %>'   
                                runat="server" OnClientSelectedIndexChanged="SelectedIndexChanged1">  
                                <Items> 
                                    <telerik:RadComboBoxItem /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
                                <script type="text/javascript">  
                                    function SelectedIndexChanged1(sender, args) {  
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                        tableView.filter("ResourceLanguage_ID", args.get_item().get_value(), "EqualTo");  
                                    }  
                                </script> 
                             </telerik:RadScriptBlock>     
                        </FilterTemplate> 
                    </telerik:GridDropDownColumn> 
                    <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" ConfirmDialogType="RadWindow"   
                        ConfirmText="Delete this resource?" ConfirmTitle="Delete" Text="Delete"   
                        UniqueName="DeleteColumn">  
                    </telerik:GridButtonColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template">  
                    <FormTemplate> 
                        <table id="Table3" border="0" cellpadding="1" cellspacing="1" width="250">  
                            <tr> 
                                <td>Lesson ID: </td> 
                                <td> 
                                    <asp:TextBox ID="txtLessonHardID" runat="server" Text='<%# Bind("LessonHard_ID") %>'></asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td>Name:</td> 
                                <td> 
                                    <asp:TextBox ID="TextBox7" runat="server" CssClass="form100" Rows="5" Text='<%# Bind("LessonHard_Name_Student") %>' TextMode="MultiLine">  
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td>Description:</td> 
                                <td> 
                                    <asp:TextBox ID="TextBox8" runat="server" CssClass="form100" Rows="5" TabIndex="1" Text='<%# Bind("LessonHard_Description_Student") %>' TextMode="MultiLine">  
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td>Resource Language:</td> 
                                <td> 
                                    <telerik:RadComboBox ID="RadComboBox2" runat="server" AppendDataBoundItems="true" DataSourceID="ResourceLangDataSource" DataTextField="ResourceLanguageName" DataValueField="ResourceLanguageID"   
                                        SelectedValue='<%# Bind("ResourceLanguage_ID") %>'>  
                                        <Items> 
                                            <telerik:RadComboBoxItem /> 
                                        </Items> 
                                    </telerik:RadComboBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" colspan="2">  
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                    </asp:Button> 
                                    &nbsp;  
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> 
                                </td> 
                            </tr> 
                         </table> 
                     </FormTemplate> 
                 </EditFormSettings> 
             </MasterTableView> 
                <GroupingSettings   
                CaseSensitive="False" /> 
         </telerik:RadGrid> 

 

 


CS:

 

using System;  
using System.Web.Security;  
using System.IO;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using System.Data.SqlClient;  
 
using Telerik.Web.UI;  
 
using ORM = EAGG.ORM;  
using BLL = EAGG.BLL;  
using Utilities = EAGG.Utilities;  
using System.Data;  
 
public partial class Lessons_LessonEditor : System.Web.UI.Page  
{  
    Guid LessonId;  
    Boolean IsDeleted;  
 
 
     //<summary> 
     //Get the License_ID from session  
     //</summary> 
     //<returns>Guid LicenseID</returns> 
    protected String GetLicenseID()  
    {  
        String LicenseID;  
        if (Session["License_ID"] != null)  
        {  
            LicenseID =  Session["License_ID"].ToString();  
        }  
        else  
        {  
            LicenseID = "";  
        }  
        return LicenseID;  
    }  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        RadAjaxManager AjaxManager = (RadAjaxManager)this.Page.Master.FindControl("RadAjaxManager1");  
        AjaxManager.AjaxSettings.AddAjaxSetting(RadMultiPage1, RadMultiPage1);  
        AjaxManager.AjaxSettings.AddAjaxSetting(RadMultiPage1, RadTabStrip1);  
        AjaxManager.AjaxSettings.AddAjaxSetting(RadGridResource, RadGridResource);  
 
        Guid myID;  
 
        string sID = Request.QueryString.Get("Id");  
        string sDeleted = Request.QueryString.Get("Deleted");  
 
        if (string.IsNullOrEmpty(sID))  
        {  
            myID = Guid.Empty;  
        }  
        else  
        {  
            myID = new Guid(sID);  
        }  
             
        LessonId = myID;  
 
        if (LessonId != Guid.Empty)  
        {  
            //LessonHardDataSource.CommandText = "select * from LessonHardStudentDescription where LessonHardID='" + LessonId + "'";  
            LessonHardStudentDescDataSource.SelectParameters.Clear();  
            LessonHardStudentDescDataSource.SelectParameters.Add("SelectLessonHard_ID", System.Data.DbType.Guid, LessonId.ToString());          
 
            IsDeleted = Boolean.Parse(sDeleted);  
 
            if (IsDeleted == true)  
            {  
                RadTabStrip1.Enabled = false;  
                RadMultiPage1.Enabled = false;  
            }  
            else  
            {  
                lblDeleted.Visible = false;  
                btnRestore.Visible = false;  
                btnRestore.Enabled = false;  
            }  
        }  
 
        if (!IsPostBack)  
        {  
            //when page loads for the first time...  
            if (LessonId == Guid.Empty) //if there is no Id passed through...  
            {  
                AddOrEditMode1.SetMode("create");  
                DetailsView1.ChangeMode(DetailsViewMode.Insert);  
                lblDeleted.Visible = false;  
                btnRestore.Visible = false;  
            }  
            else  
            {  
                //we have an Id  
                AddOrEditMode1.SetMode("edit");               
            }  
            RadTabStrip1.SelectedIndex = 0;  
            RadMultiPage1.SelectedIndex = 0;              
        }  
    }  
    protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)  
    {  
        if (e.CommandName == "Cancel")  
        {  
            Response.Redirect("~/Lessons/Lesson.aspx?message=Your request has been cancelled.");  
        }  
    }  
    protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)  
    {  
        //try  
        //{  
        //    Guid newLessonID;  
        //    ORM.Lessonhard newlh = (ORM.Lessonhard)e.Entity  
        //    newLessonID = newlh.LessonHardID;  
 
        //    Response.Redirect("~/Lesson/LessonEditor.aspx?Id=" + newLessonID + "&" + "Deleted=False");  
        //    //Master.ResultMessage = "Command completed.";  
 
        //}  
        //catch (SqlException ex)  
        //{  
        //    // Master.ErrorMessage = ex.Message;  
        //    //Master.ErrorMessage = "Cannot get product data.";  
        //}  
        RadGridResource.Rebind();  
    }  
    protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)  
    {  
        lblMessage.Text = "Information has been updated.";  
    }  
 
    protected void DetailsView1_DataBound(object sender, EventArgs e)  
    {  
        if (DetailsView1.CurrentMode == DetailsViewMode.Insert)  
        {  
            DetailsView view = (DetailsView)sender;  
            DetailsViewRowCollection rows = view.Rows;  
            //Set the value for LicenseID from Sesson  
            DetailsViewRow row = rows[2];  
            Label licenseLabel = (Label)row.FindControl("lblLicenseID");  
            licenseLabel.Text = GetLicenseID();  
            //Set the value for AdministratorID from Sesson  
            DetailsViewRow row1 = rows[1];  
            Label adminIDLabel = (Label)row.FindControl("lblAdminID");  
            adminIDLabel.Text = Session["Administrator_ID"].ToString();  
        }  
          
    }  
    protected void LessonHardDataSource_Inserted(object sender, Telerik.OpenAccess.OpenAccessDataSourceChangedEventArgs e)  
    {  
         try  
        {  
            Guid newLessonID;  
            ORM.Lessonhard newlh = (ORM.Lessonhard)e.Entity;  
            newLessonID = newlh.LessonHardID;  
 
            //LessonHardDataSource.Sel.Where = "LessonHardID='" + newLessonID.ToString() + "'";  
 
            //LessonHardStudentDescDataSource.Where = "LessonHardID = '" + newLessonID + "'";  
            //RadGridResource.DataSource = LessonHardStudentDescDataSource;  
            //RadGridResource.Rebind();  
 
            RadGridResource.Rebind();  
 
            Response.Redirect("~/Lessons/LessonEditor.aspx?Id=" + newLessonID + "&" + "Deleted=False");  
            //Master.ResultMessage = "Command completed.";  
 
              
        }  
        catch (SqlException ex)  
        {  
            // Master.ErrorMessage = ex.Message;  
            //Master.ErrorMessage = "Cannot get product data.";  
        }  
    }  
    protected void LessonHardDataSource_Inserting(object sender, Telerik.OpenAccess.OpenAccessDataSourceChangingEventArgs e)  
    {  
 
    }  
    protected void RadGridResource_ItemDeleted(object source, GridDeletedEventArgs e)  
    {  
        if (e.Exception != null)  
        {  
            e.ExceptionHandled = true;  
            DisplayMessage(true, "Resource " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LHSD_ID"] + " cannot be deleted. Reason: " + e.Exception.Message);  
        }  
        else  
        {  
            DisplayMessage(false, "Resource " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LHSD_ID"] + " deleted");  
        }  
 
 
    }  
    protected void RadGridResource_ItemInserted(object source, GridInsertedEventArgs e)  
    {  
        if (e.Exception != null)  
        {  
            e.ExceptionHandled = true;  
            e.KeepInInsertMode = true;  
            DisplayMessage(true, "Resource cannot be inserted. Reason: " + e.Exception.Message);  
        }  
        else  
        {  
            DisplayMessage(false, "Resource inserted");  
        }  
 
 
    }  
    protected void RadGridResource_ItemUpdated(object source, GridUpdatedEventArgs e)  
    {  
        if (e.Exception != null)  
        {  
            e.KeepInEditMode = true;  
            e.ExceptionHandled = true;  
            DisplayMessage(true, "Resource " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LSHD_ID"] + " cannot be updated. Reason: " + e.Exception.Message);  
        }  
        else  
        {  
            DisplayMessage(false, "Resource " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LSHD_ID"] + " updated");  
        }  
 
 
    }  
 
    private void DisplayMessage(bool isError, string text)  
    {  
        RadGridResource.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));  
    }  
 
    protected void RadGridResource_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)  
        {  
            GridEditFormItem eeditFormItem = e.Item as GridEditFormItem;  
 
            TextBox txtLessonHardID = (TextBox)editFormItem.FindControl("txtLessonHardID");  
            txtLessonHardID.Text = LessonId.ToString();  
 
        }          
    }  
    protected void RadGridResource_ItemCommand(object source, GridCommandEventArgs e)  
    {  
        if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked  
        {  
            GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGridResource.MasterTableView.GetColumn("EditCommandColumn");  
            editColumn.Visible = false;  
        }  
        else if (e.CommandName == RadGrid.RebindGridCommandName && e.Item.OwnerTableView.IsItemInserted)  
        {  
            e.Canceled = true;  
        }  
        else  
        {  
            GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGridResource.MasterTableView.GetColumn("EditCommandColumn");  
            if (!editColumn.Visible)  
                editColumn.Visible = true;  
        }  
 
 
    }  
}  
 

Thanks

 

 

 

Jaimie
Top achievements
Rank 1
 answered on 28 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?