Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
155 views
We identified a Visual Studio error when running the RadControls for ASP.NET AJAX Q1 2010 Beta Scenario Wizard.
The problem relates to a bug in the serialization of a TypeCode property.

The bug is already fixed and will be alive in the official RadControls for ASP.NET AJAX Q1 2010 release.

Best,
Erjan Gavalji
The Telerik VSXTeam
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 07 Mar 2010
0 answers
110 views
Would someone please post a demon video how to create a google-like filtering?  I tried to follow the help http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid but I could not make it work.
vinh le
Top achievements
Rank 1
 asked on 07 Mar 2010
2 answers
165 views
Hello,

I'm trying to populate a RadGrid using client databind accessing a wcf service hosted on a second project. Is it possible?
I searched at online demos, but I couldn't find anyone with this scenario.

Best regards,

Henrique 
Henrique Duarte
Top achievements
Rank 1
Veteran
 answered on 06 Mar 2010
0 answers
149 views
HI
   In the below figure i given  MinutesPerRow="10" in scheduler .in week  it gets side alldays like 3 times 8am..how can i change like  8 and 8:20 and 8:40 .....


     Thank u...

 

Nagesh Mynedi
Top achievements
Rank 1
 asked on 06 Mar 2010
0 answers
53 views


protected void Page_Init(object sender, EventArgs e)
        {

            string strPlant = string.Empty;            

            if (Session["PlantVal"] != null)
            {
                strPlant = Session["PlantVal"].ToString();

                if (strPlant != null && strPlant.Trim().Length > 0)
                {
                    DefineGridStructure(strPlant);
                }
            }
            
        }


public DataTable DefineGridStructure(string strPlant)
        {
            dtRakeLoad = new DataTable();

            Plants oplant = new Plants();
            GridBoundColumn boundColumn = new GridBoundColumn();
            dtRakeLoad .Columns.Add("Date", typeof(string));
            this.RadGrid1.MasterTableView.Columns.Add(boundColumn);
            boundColumn.DataField = "Date";
            boundColumn.UniqueName = "Date";
            boundColumn.HeaderText = "Date";
            boundColumn.DataType = System.Type.GetType("System.String");


            GridBoundColumn boundColumn1;

            DataSet ds = new DataSet();
            ds = oplant.GetChildCode(strPlant);
            string strChildCode = ds.Tables[0].Rows[0][0].ToString();
            Session["ChildCode"] = strChildCode;
            DataTable dtgroup = new DataTable();
            string strgroup = strChildCode;
            dtgroup = oplant.GetPlant(strgroup);

            DataRow dtRow = null;
            if (dtgroup != null)
            {
                foreach (DataRow dr in dtgroup.Rows)
                {
                    String sPlantName = "";
                    String sPlantCode = "";                    
                    sPlantCode = dr["PlantCode"].ToString();
                    dtRakeLoad .Columns.Add(sPlantCode, typeof(string));
                    boundColumn1 = new GridBoundColumn();
                    this.RadGrid1.MasterTableView.Columns.Add(boundColumn1);
                    boundColumn1.DataField = sPlantCode;
                    boundColumn1.UniqueName = sPlantCode;
                    boundColumn1.HeaderText = sPlantCode;
                    boundColumn1.DataType = System.Type.GetType("System.String");

                }

            }

            

            string templateColumnName = "Total";
            GridTemplateColumn templateColumn = new GridTemplateColumn();
            dtRakeLoad .Columns.Add("Total", typeof(string));
            templateColumn.ItemTemplate = new MyTemplate1(templateColumnName);
            this.RadGrid1.MasterTableView.Columns.Add(templateColumn);
            templateColumn.UniqueName = "Total";
            templateColumn.DataField = "Total";
            templateColumn.HeaderText = "Total";
            templateColumn.DataType = System.Type.GetType("System.String");


            DataTable dtport = new DataTable();
            dtport = oplant.GetPortName(strgroup);
            GridTemplateColumn templateColumn1;
            if (dtport != null)
            {

                foreach (DataRow dr in dtport.Rows)
                {
                    string sPortName = "";
                    string sPortCode = "";
                    sPortName = dr["PortName"].ToString();
                    sPortCode = dr["PortCode"].ToString();


                    dtRakeLoad .Columns.Add(sPortName, typeof(string));
                    templateColumn1 = new GridTemplateColumn();

                    this.RadGrid1.MasterTableView.Columns.Add(templateColumn1);
                    templateColumn1.ItemTemplate = new TemplatePort(sPortCode);

                    templateColumn1.DataField = sPortName;
                    templateColumn1.UniqueName = sPortName;
                    templateColumn1.HeaderText = sPortName;
                    templateColumn1.DataType = System.Type.GetType("System.String");


                }
            }

            string templateColumnName2 = "UnAllot";
            GridTemplateColumn templateColumn2 = new GridTemplateColumn();
            dtRakeLoad.Columns.Add("UnAllot", typeof(string));
            templateColumn2.ItemTemplate = new MyTemplate3(templateColumnName2);            
            this.RadGrid1.MasterTableView.Columns.Add(templateColumn2);
            templateColumn2.UniqueName = "Unallot";
            templateColumn2.HeaderText = "UnAllot";
            templateColumn2.DataField = "UnAllot";
            templateColumn2.DataType = System.Type.GetType("System.String");

            string templateColumnName3 = "Rake";
            GridTemplateColumn templateColumn3 = new GridTemplateColumn();
            dtRakeLoad.Columns.Add("Rake", typeof(string));
            templateColumn3.ItemTemplate = new MyTemplate4(templateColumnName3);
            this.RadGrid1.MasterTableView.Columns.Add(templateColumn3);
            templateColumn3.DataField = "Rake";
            templateColumn3.UniqueName = "Rake";
            templateColumn3.HeaderText = "Rake";
            templateColumn3.DataField = "Rake";
            templateColumn3.DataType = System.Type.GetType("System.String");           
            RadGrid1.DataSource = dtRakeLoad;
            return dtRakeLoad;
}





chennaiah P
Top achievements
Rank 1
 asked on 06 Mar 2010
1 answer
111 views
Hi,

I have a page which checks three textboxes.
It all works great in my development IDE on the webserver.
However, when I access the page over the internet, I get an error.
It only happens when I have more than one text box also.
If I just have one text box, it works via the internet.

Error

Any help would be great.

Tim
Tim McDonnell
Top achievements
Rank 1
 answered on 05 Mar 2010
0 answers
232 views
Hi,
I've a user control in an aspx page.
In my aspx page, I do the following:

<

 

AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="m_radGrid">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="m_radGrid" LoadingPanelID="m_radAjaxLoadingPanel" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

<telerik:RadAjaxLoadingPanel ID="m_radAjaxLoadingPanel" runat="server" Skin="Default">

 

 

</telerik:RadAjaxLoadingPanel>

 


But the loading panel doesnot appear.

Note:="m_radGrid" is called from another usercontrol. so user control embedded within another user control. How do I make loading panel to appear?



Ayesha
Top achievements
Rank 1
 asked on 05 Mar 2010
9 answers
540 views
I found an odd behavior from the DatePicker in version 2008.3.1314.35

If I use the date format MM/yyyy, no matter what month I pick it always sets the date to the current month.

So if I select May 2009, it sets it to 12/2009.  If I select March 2010, it sets it to 12/2010.  Now if I change the format to MM/DD/yyyy it works as expected.

Here is an example of one of my datepickers

<telerik:RadDatePicker ID="TextBoxMonthEndDate" runat="server" Calendar-ShowRowHeaders="false" Skin="Vista">  
   <DatePopupButton ImageUrl="~/images/Calendar_scheduleHS.png" HoverImageUrl="~/images/Calendar_scheduleHS.png" /> 
   <DateInput DateFormat="MM/yyyy" runat="server" /> 
</telerik:RadDatePicker>   


Has this been fixed in more recent versions?
Jeremy Yoder
Top achievements
Rank 1
 answered on 05 Mar 2010
1 answer
222 views
I am trying to convert a DataList to a ListView.  The DataList has an ItemDataBoundEvent that I need to add to the ListView, what is the event argument for a list view?:

protected void dListItems_ItemDataBound(object sender, DataListItemEventArgs e)
{

}
Daniel
Telerik team
 answered on 05 Mar 2010
6 answers
307 views
Hi

this is shanker am doing project my requirement is rad grid filtered by rad combo box .when ever am click edit button and add new  the rad grid is cleared how to solve that  .

This is my code

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Facility.DataSource = studentremarks.org_view_facility_lookup();
                Facility.DataBind();
                
            }
        }
        public void getdata()
        {
            grdstudentremarks.DataSource = studentremarks.sch_view_sch_student_remark_list(RadcomFiscalyear.SelectedValue.GetInteger(), Radcomclass.SelectedValue.GetInteger());
            grdstudentremarks.DataBind();
        }
        protected void Facility_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadcomFiscalyear.DataSource = Feeschedulemanager.sch_view_fiscal_year_lookup(Facility.SelectedValue.GetInteger());
            RadcomFiscalyear.DataBind();
            Radcomclass.DataSource = studentremarks.sch_view_class_lookup(Facility.SelectedValue.GetInteger());
            Radcomclass.DataBind();
        }

        protected void Radcomclass_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            getdata();
        }

        protected void grdstudentremarks_DeleteCommand(object source, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            int? eventId = GetEventId(editedItem);
            if (eventId.HasValue)
            {

                try
                {
                    string status_text = String.Empty;
                    bool res = studentremarks.org_sproc_dml_org_person_remarks_del(eventId.Value, out status_text);
                    if (res)
                    {
                        DisplayMessage(false, "Fisacl_year deleted");
                    }
                    else
                    {
                        e.Canceled = true;
                        DisplayMessage(true, "Can't delete Fisacl_year. Reason: " + status_text);
                    }
                }
                catch (Exception ex)
                {
                    e.Canceled = true;
                    DisplayMessage(true, "Fisacl_year cannot be deleted. Reason: " + ex.Message);
                }
            }
            else
            {
                e.Canceled = true;
                DisplayMessage(true, "Such Fisacl_year does not exist");
            }
        }

        protected void grdstudentremarks_InsertCommand(object source, GridCommandEventArgs e)
        {
            int? faciltyid = LogonDetails.Instance.sys_lclvar_default_facility_id;

            GridEditableItem editedItem = e.Item as GridEditableItem;
            Dictionary<string, object> values = ParseEditValues(editedItem);
            string msg;
            if (ValidateFields(values, out msg))
            {
                try
                {
                    LogonDetails det = LogonDetails.Instance;
                    string status_text = String.Empty;
                    bool res = studentremarks.org_sproc_dml_org_person_remarks_ins(Convert.ToInt32(values["StudentName"])as int?,Convert.ToInt32(values["ReportedResource"])as int?,
                    values["RemarkDate"] as DateTime?,values["description"]as string ,(bool)values["BadRemark"], out status_text, (bool)values["Goodremark"]);
                    if (res)
                    {
                        DisplayMessage(false, "Fisacl_year inserted");
                    }
                    else
                    {
                        e.Canceled = true;
                        DisplayMessage(true, "Can't insert Fisacl_year. Reason: " + status_text);
                    }
                }
                catch (Exception ex)
                {
                    e.Canceled = true;
                    DisplayMessage(true, "Fisacl_year cannot be inserted. Reason: " + ex.Message);
                }
            }
            else
            {
                e.Canceled = true;
                DisplayMessage(true, msg);
            }
        }

        protected void grdstudentremarks_UpdateCommand(object source, GridCommandEventArgs e)
        {
            int? faciltyid = LogonDetails.Instance.sys_lclvar_default_facility_id;
            GridEditableItem editedItem = e.Item as GridEditableItem;
            Dictionary<string, object> values = ParseEditValues(editedItem);
            int? eventId = GetEventId(editedItem);
            if (eventId.HasValue)
            {
                try
                {
                    string status_text = String.Empty;
                    bool res = studentremarks.org_sproc_dml_org_person_remarks_upd(eventId.Value, Convert.ToInt32(values["StudentName"]) as int?, Convert.ToInt32(values["ReportedResource"]) as int?,
                    values["RemarkDate"] as DateTime?, values["description"] as string, (bool)values["BadRemark"], out status_text, (bool)values["Goodremark"]);
                    if (res)
                    {
                        DisplayMessage(false, "Fisacl_year updated");
                    }
                    else
                    {
                        e.Canceled = true;
                        DisplayMessage(true, "Can't update Fisacl_year. Reason: " + status_text);
                    }
                }
                catch (Exception ex)
                {
                    e.Canceled = true;
                    DisplayMessage(true, "Fisacl_year cannot be updated. Reason: " + ex.Message);
                }
            }
            else
            {
                e.Canceled = true;
                DisplayMessage(true, "Such Fisacl_year does not exist");
            }
        }

        protected void grdstudentremarks_PreRender(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //GridColumn editColumn = grdstudentremarks.MasterTableView.GetColumn("EditCommandColumn");
                //if (editColumn != null) { editColumn.Visible = CanUpdate; }
                GridColumn deleteColumn = grdstudentremarks.MasterTableView.GetColumn("DeleteCommandColumn");
                if (deleteColumn != null) { deleteColumn.Visible = CanDelete; }
                if (!CanInsert)
                {
                    HideInsertCol(grdstudentremarks);
                }
                getdata();
            }
        }

        protected override int GetScreenId()
        {
            return Screens.studentremarks;
        }
        private bool ValidateFields(Dictionary<string, object> values, out string msg)
        {
            msg = String.Empty;
            bool res = false;
            if (values != null)
            {
                res = true;
                if ((!values.ContainsKey("fiscal_year")) || (values["fiscal_year"] == null) || (string.IsNullOrEmpty(values["fiscal_year"].ToString())))
                {
                    msg = "Select Fiscalyear";
                    res = false;
                }
            }
            return res;
        }
        private int? GetEventId(GridItem item)
        {
            int? id = null;
            if (item != null)
            {
                if (item.ItemIndex >= 0)
                {
                    id = item.OwnerTableView.DataKeyValues[item.ItemIndex]["person_id"].ToString().GetInteger();
                }
            }
            return id;
        }
        private Dictionary<string, object> ParseEditValues(GridEditableItem editedItem)
        {
            Dictionary<string, object> dic = new Dictionary<string, object>();

            if (editedItem != null)
            {
                editedItem.OwnerTableView.ExtractValuesFromItem(dic, editedItem);
                RadComboBox StudentName = editedItem.FindControl("StudentName") as RadComboBox;
                if (StudentName != null)
                {
                    dic.Add("StudentName", StudentName.SelectedValue.GetInteger());
                }
                RadComboBox ReportedResource = editedItem.FindControl("ReportedResource") as RadComboBox;
                if (ReportedResource != null)
                {
                    dic.Add("ReportedResource", ReportedResource.SelectedValue.GetInteger());
                }
                RadDatePicker RemarkDate = editedItem.FindControl("RemarkDate") as RadDatePicker;
                if (RemarkDate != null)
                {
                    dic.Add("RemarkDate", RemarkDate.SelectedDate);
                }
                TextBox txtDescription = editedItem.FindControl("txtDescription") as TextBox;
                if (txtDescription != null)
                {
                    dic.Add("description", txtDescription.Text);
                }

                CheckBox Goodremark = editedItem.FindControl("Goodremark") as CheckBox;
                dic.Add("Goodremark", Goodremark.Checked);
                CheckBox BadRemark = editedItem.FindControl("BadRemark") as CheckBox;
                dic.Add("BadRemark", BadRemark.Checked);
            }
            return dic;
        }

        protected void grdstudentremarks_ItemDataBound(object sender, GridItemEventArgs e)
        {
            int? faciltyid = Facility.SelectedValue.GetInteger();

            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                int? eventId = GetEventId(e.Item);
                RadComboBox StudentName = e.Item.FindControl("StudentName") as RadComboBox;
                if (StudentName != null)
                {
                    StudentName.DataSource = studentremarks.sch_view_class_student_lookup(faciltyid,Radcomclass.SelectedValue.GetInteger(),RadcomFiscalyear.SelectedValue.GetInteger());
                    StudentName.DataBind();
                }
                RadComboBox ReportedResource = e.Item.FindControl("ReportedResource") as RadComboBox;
                if (ReportedResource != null)
                {
                    ReportedResource.DataSource = subjectmanager.org_view_department_lookup();
                    ReportedResource.DataBind();
                }
               


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



                        if (det != null)
                        {
                            
                            TextBox txtDescription = e.Item.FindControl("txtDescription") as TextBox;
                            if (txtDescription != null)
                            {
                                txtDescription.Text = det.description;
                            }
                            RadDatePicker RemarkDate = e.Item.FindControl("RemarkDate") as RadDatePicker;
                            if (RemarkDate != null)
                            {
                              
                                RemarkDate.SelectedDate = det.remark_date;
                            }
                            CheckBox Goodremark = e.Item.FindControl("Goodremark") as CheckBox;
                            {
                                if (Goodremark != null)
                                {
                                    Goodremark.Checked = det.good_remark;
                                }

                            }
                            CheckBox BadRemark = e.Item.FindControl("BadRemark") as CheckBox;
                            {
                                if (BadRemark != null)
                                {
                                    BadRemark.Checked = det.bad_remark;
                                }

                            }
                        }
                    }
                }
            }
        }


please how to solve that it,s argent 

thanks and regards
shanker.B
shanker bangari
Top achievements
Rank 1
 answered on 05 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?