Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
266 views
I have a calendar control, which can be viewed in the two available modes, Interactive or Preview, depending on what's needed. By default, I have my Calendar control set to AutoPostback="true", so that I can handle the calendar navigation event. The problem I get is that when I have the control in Interactive mode, since I want the user to select the dates, it will always postback because of the AutoPostback setting. So what I want to do is that when I have the control in Interactive mode I would set AutoPostback="false", to prevent post backs when a date is selected and only postback when they navigate the calendar.

How would I be able to cause the postback for the navigation event?
Nikolay Rusev
Telerik team
 answered on 25 Mar 2010
3 answers
255 views
I am using a RadToolbar in a RadGrid CommandItemTemplate. The client side OnCommand event does not get fired if one of the items in the toolbar is clicked. This happens even if the item has been configured with the appropriate CommandName i.e New item has a CommandName="InitInsert". Is there a way I can allow the event to bubble up the RadToolbar so that it can reach Rad|Grid and fire the OnCommand event?
Sebastian
Telerik team
 answered on 25 Mar 2010
5 answers
698 views
HI,

Is there a way to pass a parameter value to a usercontrol that is displayed by the radgrid during editing.
When a user clicks on the edit command in a row I would like to pass the "ID" of the row to my usercontrol that is displayed.

Many thanks
Antony
Abiri Masoni
Top achievements
Rank 1
 answered on 25 Mar 2010
3 answers
144 views
I have a RadWindow where I have set ShowContentDuringLoad to be false, so the first time the window loads, i see the loading animation etc but when I click something on the page (i.e. a postback to the same page), I dont see the loading image during the rendering of the postback results..
Georgi Tunev
Telerik team
 answered on 25 Mar 2010
6 answers
82 views
Hi,
I've set up our ListToolsFile.xml as below but when I click the MOSSInsertTableElement button in the RTE the option popup is empty.
We are using 5.6.0.0.
We have got a custom stylesheet but I've run the page with FireBug and can't find any of our styles that would be affecting this.

Please can you help in finding the options again! 

Dan

<root>

 ....[removed to make this a bit shorter!] 
<tools name="row2">
....  
    <tool name="MOSSInsertTableElement">
      <tool name="InsertRowAbove" />
      <tool name="InsertRowBelow" />
      <tool name="InsertColumnLeft" />
      <tool name="InsertColumnRight" />
      <tool name="SplitCell" />
    </tool>
    ...
</root>

Dan Hibbert
Top achievements
Rank 1
 answered on 25 Mar 2010
2 answers
96 views
Hello,
I'm migrating from Telerik Version 1Q 2007 to 1Q 2010.

I have following scenario:

Page[ RadEditor[ Custom Dialog ]  ]

CustomDialog[ RadStrip[] MultiPage[PageView[ RadEditor ], PageView[TextBox], PageView[RadTreeView], ... ] ]

And I have to get an object referenced to the Controls inside the Pageviews (clientside).
But I even can't find the RadTabstrip nor the pageView with:

 

function initDialog() {  

var clientParameters = getRadWindow().ClientParameters;

var tabStrip = $find("<%= RadTabStrip1.ClientID %>");

var pageView = $find("<%= RadMultiPage1.ClientID %>");

 

 

 

 

at least the ClientParameters are ok. Can someone help?
Thanks.

 

Rumen
Telerik team
 answered on 25 Mar 2010
1 answer
128 views
I want to upgrade from telerik 2006 to telerik Web 2010 so I use version trial Q1 2010.
I created columns of RadGrid in code behind (OnInit).
Here is my code
In aspx page
<telerik:RadGrid  ID = "gridTemp" runat = "server" AutoGenerateColumns="false"
        OnNeedDataSource="OnNeedDataSource" OnItemDataBound="gridTemp_ItemDataBound">                     
            <MasterTableView AutoGenerateColumns="false" AllowSorting="true" AllowFilteringByColumn="true"
                    EnableViewState="false" EnableColumnsViewState="false">
                <AlternatingItemStyle CssClass="CssAlternatingItem" />
                <ItemStyle CssClass="CssItem" />
                <NoRecordsTemplate><%=ML("Norecordtodiplay")%></NoRecordsTemplate>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnColumnResized="ChangeStatus();" OnColumnSwapped="ChangeStatus();" />
            </ClientSettings>           
       </telerik:RadGrid >      



In aspx.cs page
..............
foreach (Column column in caseOverviewXml.ListColumn)
                                {                                  
                                    if (string.Compare(column.Name.ToLower(), "allconversationsid") == 0)
                                    {
                                        DynamicTemplate mt = new DynamicTemplate(ListItemType.Item);
                                        Label lblColor = new Label();
                                        lblColor.ID = "lblColor";
                                        mt.AddControl(lblColor, string.Empty, string.Empty);
                                        GridTemplateColumn templateColumn = new GridTemplateColumn();
                                        templateColumn.ItemTemplate = mt;
                                        templateColumn.UniqueName = column.Name;
                                        templateColumn.OrderIndex = orderIndex;
                                        templateColumn.AllowFiltering = false;

                                        switch (Request.QueryString["lang"])
                                        {
                                            case "de":
                                                templateColumn.HeaderText = column.Caption_de;
                                                break;
                                            case "en":
                                                templateColumn.HeaderText = column.Caption_en;
                                                break;
                                            case "fr":
                                                templateColumn.HeaderText = column.Caption_fr;
                                                break;
                                            case "it":
                                                templateColumn.HeaderText = column.Caption_it;
                                                break;
                                            default:
                                                templateColumn.HeaderText = column.Caption_en;
                                                break;
                                        }
                                        gridTemp.MasterTableView.Columns.Add(templateColumn);
                                    }
                                    else
                                    {
                                        GridHyperLinkColumn boundColumn = new GridHyperLinkColumn();
                                        column.Name = column.Name.Replace("@LANG", Request.QueryString["lang"]);
                                        
                                        boundColumn.UniqueName = column.Name;
                                        boundColumn.DataTextField = column.Name;

                                        boundColumn.ShowSortIcon = true;
                                        boundColumn.SortExpression = column.Name;

                                        boundColumn.ItemStyle.Wrap = true;                                        
                                        boundColumn.OrderIndex = orderIndex;
                                        boundColumn.ShowFilterIcon = false;
                                        boundColumn.AllowFiltering = true;
                                        boundColumn.CurrentFilterFunction = GridKnownFunction.Contains;
                                        boundColumn.AutoPostBackOnFilter = true;
                                       
                                        switch (Request.QueryString["lang"])
                                        {
                                            case "de":
                                                boundColumn.HeaderText = column.Caption_de;
                                                break;
                                            case "en":
                                                boundColumn.HeaderText = column.Caption_en;
                                                break;
                                            case "fr":
                                                boundColumn.HeaderText = column.Caption_fr;
                                                break;
                                            case "it":
                                                boundColumn.HeaderText = column.Caption_it;
                                                break;
                                            default:
                                                boundColumn.HeaderText = column.Caption_en;
                                                break;
                                        }

                                        boundColumn.DataNavigateUrlFormatString =
                                            "/Default.aspx?caseId={0}&ConversationID={1}&lang=" + Request.QueryString["lang"];
                                        boundColumn.DataNavigateUrlFields = new string[]
                                                                        {
                                                                            "CaseId", "NavigationLastConversationId"
                                                                        };
                                        if (!string.IsNullOrEmpty(column.Width))
                                        {
                                            boundColumn.HeaderStyle.Width =
                                                new Unit(ConvertHelper.ToDouble(column.Width));
                                        }
                                        gridTemp.MasterTableView.Columns.Add(boundColumn);

                                    }   // end else

                                    orderIndex++;
                                }   // end foreach

Filter problem : I cannot press Enter to filter because it not postback
Sort problem : The first it sort success, in the second or the third it occur error :"

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation."


Could you help me ?
Pavlina
Telerik team
 answered on 25 Mar 2010
1 answer
525 views

Hi,

I am using the radgrid and have enabled the client side property EnableRowHoverStyle to true.
It works fine but the grid contains some columns where in i have set a background color to it .
On mouse over of the row the coloured columns get clipped at the bottom (IE7) and in mozilla it does not hover over these colors at all. Refer to screenshot 1,3.
Also i have OnItemDataBound of the grid set the 

 

e.Item.CssClass =

"";
so that i get the view a compact one.
It works fine .
But when i go to the edit mode the edited row also get hovered.Before i could set the Row cssclass to empty it used to work fine.But now it hovers over the edited row too.
I do not want the edited row to be hovered.So i checked the cssClass of the previous implementation and found that rgEditForm was used i tried using this but on hover the input field accumilates space Refer to screenshot 2

How do i use my own cssClass where do i have to write the css class the control is in a ascx page.?

Thanks & Regards,
Francis P.

 

Dimo
Telerik team
 answered on 25 Mar 2010
5 answers
84 views

Is there any way to change the colour of 15 mintues slot's . I found the article in which it's showed how the change the colour for an hour slot. below is my code. please can help me how to change the colour of 15 minutes slots.
thanks



 

protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)

 

{

 

if (dsAppointments == null)

 

 

{

 

 

 dsAppointments = GetAppointments(this.RadScheduler1.SelectedDate);

 

 

}

 

 

 foreach (DataRow row in dsAppointments.Tables[0].Rows)

 

 

 {

 

 

 DateTime start = Convert.ToDateTime(row["start"]);

 

 

 DateTime end = Convert.ToDateTime(row["end"]);

 

 

 // if ((e.TimeSlot.Start.Date.ToShortDateString() == start.ToShortDateString()) && ((e.TimeSlot.Start.Hour >= start.Hour && e.TimeSlot.End.Hour <= end.Hour) && (e.TimeSlot.Start.Minute >= start.Minute && e.TimeSlot.End.Minute <= start.Minute)) && (e.TimeSlot.Resource.Text == Convert.ToString(row["StaffName"])))

 

 

 if (e.TimeSlot.Resource.Text == Convert.ToString(row["StaffName"]))

 

 

 {

 

 

 if ((e.TimeSlot.Start.Date.ToShortDateString() == start.ToShortDateString()) && ((e.TimeSlot.Start.Hour >= start.Hour && e.TimeSlot.End.Hour <= end.Hour )))

 

 

 {

 

 

 e.TimeSlot.CssClass = "Disabled";

 

 

 }

 

 

 }

 

 

 }

 

Peter
Telerik team
 answered on 25 Mar 2010
0 answers
113 views
Hi,

this is shanker am doing one project .My requirement is hierarchy of radgrid and several table sat a level .I am doing multi hierarchy in single level hierarchy grid i have multiple detail tables in rad grid How to difference in item data bound event 

hot difference detail stables in item databound event and insert and update and delete in manule code

this my code 

example


GridTableView tableView = e.Item.OwnerTableView;
                if (e.Item.OwnerTableView.Name == "student")
                {
                    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
                    {
                        int? eventId = GetEventId(e.Item);

                        if (e.Item.OwnerTableView.IsItemInserted)
                        {
                            //item is about to be inserted
                        }
                        else
                        {
                            if (eventId.HasValue)
                            {
                                var det = studentinformation.sch_view_student_profile_detail(eventId.Value);


                                if (det != null)
                                {

                                    TextBox txtFristname = e.Item.FindControl("txtFristname") as TextBox;
                                    if (txtFristname != null)
                                    {
                                        txtFristname.Text = det.first_name;
                                    }
                                    TextBox txtLastName = e.Item.FindControl("txtLastName") as TextBox;
                                    if (txtLastName != null)
                                    {
                                        txtLastName.Text = det.last_name;
                                    }
                                    TextBox txtMiddleName = e.Item.FindControl("txtMiddleName") as TextBox;
                                    if (txtMiddleName != null)
                                    {
                                        txtMiddleName.Text = det.middle_name;
                                    }
                                    TextBox txtAdmission = e.Item.FindControl("txtAdmission") as TextBox;
                                    if (txtAdmission != null)
                                    {
                                        txtAdmission.Text = det.admission_number;
                                    }
                                    RadioButtonList rdbgender = e.Item.FindControl("rdbgender") as RadioButtonList;
                                    if (rdbgender != null)
                                    {
                                        rdbgender.SelectedValue = det.gender;
                                    }
                                    RadDatePicker rdp_start_date = e.Item.FindControl("rdp_start_date") as RadDatePicker;
                                    if (rdp_start_date != null)
                                    {

                                        rdp_start_date.SelectedDate = det.date_of_birth;

                                    }
                                    RadDatePicker rdp_end_date = e.Item.FindControl("rdp_end_date") as RadDatePicker;
                                    if (rdp_end_date != null)
                                    {
                                        rdp_end_date.SelectedDate = det.Admission_date;
                                    }
                                    CheckBox check = e.Item.FindControl("ficalyearcheck") as CheckBox;
                                    {
                                        if (check != null)
                                        {
                                            check.Checked = det.Active;
                                        }

                                    }
                                }
                            }
                        }
                    }
                }

                if (e.Item.OwnerTableView.Name == "parent")
                {
                    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
                    {
                        int? eventId = GetEventId(e.Item);
                        RadComboBox Existingperson = e.Item.FindControl("Existingperson") as RadComboBox;
                        if (Existingperson != null)
                        {
                            Existingperson.DataSource = studentinformation.org_view_person_lookup();
                            Existingperson.DataBind();
                        }
                        RadComboBox Relationship = e.Item.FindControl("Relationship") as RadComboBox;
                        if (Relationship != null)
                        {

                            Relationship.DataSource = studentinformation.org_view_relationship_lookup();
                            Relationship.DataBind();
                        }
                        RadComboBox Designation = e.Item.FindControl("Designation") as RadComboBox;
                        if (Designation != null)
                        {
                            Designation.DataSource = studentinformation.org_view_designation_lookup();
                            Designation.DataBind();
                        }


                        if (e.Item.OwnerTableView.IsItemInserted)
                        {
                            //item is about to be inserted
                        }
                        else
                        {
                            if (eventId.HasValue)
                            {
                                GridEditableItem editedItem = e.Item as GridEditableItem;
                                int? parent_person_id = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["parent_person_id"].ToString().GetInteger();
                                var det = studentinformation.sch_view_student_parent_relationship_detail(eventId.Value, parent_person_id);



                                if (det != null)
                                {
                                    if (det.parent_person_id != null)
                                    {
                                        Existingperson.SelectedIndex = Existingperson.Items.IndexOf(Existingperson.Items.FindItemByValue(det.parent_person_id.ToString()));
                                    }
                                    if (det.relationship != null)
                                    {
                                        Relationship.SelectedIndex = Relationship.Items.IndexOf(Relationship.Items.FindItemByText(det.relationship.ToString()));
                                    }
                                    if (det.designation != null)
                                    {
                                        Designation.SelectedIndex = Designation.Items.IndexOf(Designation.Items.FindItemByText(det.designation.ToString()));
                                    }

                                    TextBox txtfristname = e.Item.FindControl("txtfristname") as TextBox;
                                    if (txtfristname != null)
                                    {
                                        txtfristname.Text = det.parent_first_name;
                                    }
                                    TextBox txtMiddlename = e.Item.FindControl("txtMiddlename") as TextBox;
                                    if (txtMiddlename != null)
                                    {
                                        txtMiddlename.Text = det.parent_middle_name;
                                    }
                                    TextBox txtLastname = e.Item.FindControl("txtLastname") as TextBox;
                                    if (txtLastname != null)
                                    {
                                        txtLastname.Text = det.parent_last_name;
                                    }
                                    RadDatePicker rdp_end_date = e.Item.FindControl("rdp_end_date") as RadDatePicker;
                                    if (rdp_end_date != null)
                                    {
                                        rdp_end_date.SelectedDate = det.parent_date_of_birth;
                                    }
                                    RadioButtonList parentrdgender = e.Item.FindControl("parentrdgender") as RadioButtonList;
                                    if (parentrdgender != null)
                                    {
                                        parentrdgender.SelectedValue = det.parent_gender;
                                    }
                                }
                            }
                        }
                   
                }
            }
                if (e.Item.OwnerTableView.Name == "misc")
            {
                    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
                    {
                        int? eventId = GetEventId(e.Item);
                        RadComboBox Monther_tongue = e.Item.FindControl("Monther_tongue") as RadComboBox;
                        if (Monther_tongue != null)
                        {
                            Monther_tongue.DataSource = studentinformation.org_view_language_lookup();
                            Monther_tongue.DataBind();
                        }
                        RadComboBox primary_contact = e.Item.FindControl("primary_contact") as RadComboBox;
                        if (primary_contact != null)
                        {

                            primary_contact.DataSource = studentinformation.sch_view_student_parent_lookup(eventId);
                            primary_contact.DataBind();
                        }
                       

                        if (e.Item.OwnerTableView.IsItemInserted)
                        {
                            //item is about to be inserted
                        }
                        else
                        {
                            if (eventId.HasValue)
                            {
                                GridEditableItem editedItem = e.Item as GridEditableItem;

                                var det = studentinformation.sch_view_student_misc_info_detail(eventId.Value);



                                if (det != null)
                                {
                                   
                                    if (det.mother_tongue != null)
                                    {
                                        Monther_tongue.SelectedIndex = Monther_tongue.Items.IndexOf(Monther_tongue.Items.FindItemByText(det.mother_tongue.ToString()));
                                    }
                                    if (det.parent_name != null)
                                    {
                                        primary_contact.SelectedIndex = primary_contact.Items.IndexOf(primary_contact.Items.FindItemByText(det.parent_name.ToString()));
                                    }

                                    TextBox txtMole1 = e.Item.FindControl("txtMole1") as TextBox;
                                    if (txtMole1 != null)
                                    {
                                        txtMole1.Text = det.mole1;
                                    }
                                    TextBox txtMole2 = e.Item.FindControl("txtMole2") as TextBox;
                                    if (txtMole2 != null)
                                    {
                                        txtMole2.Text = det.mole2;
                                    }
                                    TextBox txtMole3 = e.Item.FindControl("txtMole3") as TextBox;
                                    if (txtMole3 != null)
                                    {
                                        txtMole3.Text = det.mole3;
                                    }
                                  
                                }
                            }
                        }
                   
                }
            }
                if (e.Item.OwnerTableView.Name == "address")
            {
                
                if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
                {
                    int? eventId = GetEventId(e.Item);
                    RadComboBox person = e.Item.FindControl("person") as RadComboBox;
                    if (person != null)
                    {
                        person.DataSource = studentinformation.sch_view_student_parent_lookup(eventId);
                        person.DataBind();
                    }
                    RadComboBox Adresstype = e.Item.FindControl("Adresstype") as RadComboBox;
                    if (Adresstype != null)
                    {

                        Adresstype.DataSource = studentinformation.org_view_address_type_lookup();
                        Adresstype.DataBind();
                    }
                    RadComboBox city = e.Item.FindControl("city") as RadComboBox;
                    if (city != null)
                    {
                        city.DataSource = studentinformation.org_view_city_lookup();
                        city.DataBind();
                    }
                    RadComboBox Postal_code = e.Item.FindControl("Postal_code") as RadComboBox;
                    if (city != null)
                    {
                        Postal_code.DataSource = studentinformation.org_view_postal_code_city_lookup();
                        Postal_code.DataBind();
                    }


                    if (e.Item.OwnerTableView.IsItemInserted)
                    {
                        //item is about to be inserted
                    }
                    else
                    {
                        int? parent_person_id = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["parent_person_id"].ToString().GetInteger();
                        int? address_type_id = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["address_type_id"].ToString().GetInteger();
                        if (address_type_id.HasValue)
                        {

                            var det = studentinformation.sch_view_student_parent_address_detail(parent_person_id, address_type_id);



                            if (det != null)
                            {
                                TextBox txtAdress1 = e.Item.FindControl("txtAdress1") as TextBox;
                                if (txtAdress1 != null)
                                {
                                    txtAdress1.Text = det.address1;
                                }
                                TextBox txtAdress2 = e.Item.FindControl("txtAdress2") as TextBox;
                                if (txtAdress2 != null)
                                {
                                    txtAdress2.Text = det.address2;
                                }
                                TextBox txtAdress3 = e.Item.FindControl("txtAdress3") as TextBox;
                                if (txtAdress3 != null)
                                {
                                    txtAdress3.Text = det.address3;
                                }


                            }
                        }
                    }
                }
            }

                if (e.Item.OwnerTableView.Name == "phone")
            {
                if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
                {
                    int? eventId = GetEventId(e.Item);
                    RadComboBox person = e.Item.FindControl("person") as RadComboBox;
                    if (person != null)
                    {
                        person.DataSource = studentinformation.sch_view_student_parent_lookup(eventId);
                        person.DataBind();
                    }
                    RadComboBox Phonetype = e.Item.FindControl("Phonetype") as RadComboBox;
                    if (Phonetype != null)
                    {

                        Phonetype.DataSource = studentinformation.org_view_address_type_lookup();
                        Phonetype.DataBind();
                    }
                    RadComboBox STD = e.Item.FindControl("STD") as RadComboBox;
                    if (STD != null)
                    {
                        STD.DataSource = studentinformation.org_view_phone_std_lookup();
                        STD.DataBind();
                    }
                  


                    if (e.Item.OwnerTableView.IsItemInserted)
                    {
                        //item is about to be inserted
                    }
                    else
                    {
                        int? parent_person_id = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["parent_person_id"].ToString().GetInteger();
                        int? address_type_id = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["address_type_id"].ToString().GetInteger();
                        if (address_type_id.HasValue)
                        {

                            var det = studentinformation.sch_view_student_parent_phone_detail(parent_person_id, address_type_id);



                            if (det != null)
                            {
                                TextBox txtPhone = e.Item.FindControl("txtPhone") as TextBox;
                                if (txtPhone != null)
                                {
                                    txtPhone.Text = det.phone_number;
                                }
                                TextBox txtExtension = e.Item.FindControl("txtExtension") as TextBox;
                                if (txtExtension != null)
                                {
                                    txtExtension.Text = det.std_number;
                                }
                               


                            }
                        }
                    }
                }
            }

It's argent Am stopped my project this issue please hot to solve that please forward any example 

thanks and regards
shanker.B
shanker bangari
Top achievements
Rank 1
 asked on 25 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?