Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
Hello guys.

I have 3 little questions. At this link you can see the "bar" with the "add new record" and the "refresh" buttons, and in the footer, the grid's page numbers. How can I customize the "add new record" and the "refresh" buttons, and delete the footer with page numbers?

Tx in advance.

Regards.
Schlurk
Top achievements
Rank 2
 answered on 23 Mar 2010
3 answers
79 views
Hi,
In one of the page we are using radgrid. we have grouping enabled based on one column. plus sign comes for that column.. when there is only one row for any particular value also, plus sign is shown for the column and group panel is shown.. how to avoid showing of plus sign when only row is there for particular value.  basically we want to show plus/minus signs only when number of rows for particular column is greater than one..
Thanks in advance


Pavlina
Telerik team
 answered on 23 Mar 2010
3 answers
148 views
Hello,
In the example located at http://demos.telerik.com/aspnet-ajax/upload/examples/additionalfields/defaultcs.aspx there are additional fields such as title and description.  I would like to know how I can access those fields in my C# code behind.  The example does not show how to do this in the example C# file.

For example...in the online example you access the field "Title" server side within the datalist using ((Telerik.Web.UI.UploadedFile)Container.DataItem).GetFieldValue("Title")

How would I do this in C#????

Thanks.

Stephen
Genady Sergeev
Telerik team
 answered on 23 Mar 2010
3 answers
204 views
Hi Telerik team.

I am using a RadListView with as ObjectDataSource and n-tier architecture
but I have a problem in the InsertTemplate.

The problem is that is not recovering data form
defined in InsertTemplate and therefore gives me this error:

ObjectDataSource 'ods' has no values to insert. Check that the 'values' Check that
the 'values' dictionary contains values.

It seems that not recover data of controls in the
InsertTemplate.

This occurs if I'm using 2010.1.309.35 version

On 2009.3.1208.35 version  works perfectly.

Previously I was working 2009.3.1208.35 version but upgraded to use RadFilter control.

Please could help me with this problem.

Thank you
Rosen
Telerik team
 answered on 23 Mar 2010
3 answers
68 views
Why was the radGrid simple skin graphics changed in Q1 2010?

The icons for "Add New Record" and "Refresh" along with items in the grid like Edit, Delete, Accept and cancel are now horrible colorless black icons.  I understand that this is the simple skin and we want the graphics to be simple, but that does not mean black! The old icons were very standard icons that people are accustomed to see.  They are now very difficult to see on a page.

This did not happen with other controls. RadEditor and RadFileExplorer still have the 2009 icons.

I do like the new square icons for confirm and cancel when editing a grid item, though.  I would just prefer some red and green in there as well.

Joel
Dimo
Telerik team
 answered on 23 Mar 2010
9 answers
128 views
I am trying to load 2 types of appointments: plan and schedule. The plan I am showing on the grid as colored time slots (background cells) while the schedule I am showing as regular appointments (blocks). I need to change the color of the time slots (background cells) depending on where the schedule (appointment blocks) is or is not. For example if the plan is from 2-4 than those rows are yellow. If I add an appointment from 2 to 6, then 4 to 6 now needs to be red.
Or if I add an appointment from 2-4 then no color is needed for the timeslots.

I am currently using the TimeSlotCreated function but TimeSlot only returns a Date, no time, while an Appointment returns the Date and Time.

Can anyone assist?
Peter
Telerik team
 answered on 23 Mar 2010
1 answer
98 views
Hi teleik Team

I'm using Rad Scheduler but I faced a problem when the page loaded it gives me the following runtime error message

Valid values are between 1 and 9666, inclusive.
Parameter name: year

the culture that Im using is "AR-SA"  and I set it for the scheduler correctly

the page culture is also "Ar-SA"

Enviroment

rad controls for asp.net ajax q3 2008.
Internet explorer 8.
Microsoft Vista Operating system and the date format is "hijri date".
Microsoft Sql Serve 2005.
asp.net with framework 3.5.

Thanks in advance

Hamdy
Top achievements
Rank 1
 answered on 23 Mar 2010
6 answers
692 views
Date time when the language from computer environment Arabic the control not work when click on the 12:00 AM (ص) or PM (م)
can you help me this problem

AM Mean (ص)    and  PM Mean   (Ù…)
see the image below

Hamdy
Top achievements
Rank 1
 answered on 23 Mar 2010
1 answer
176 views
Hi

I have a RadToolbar and a RadEditor on the same page. The toolbar has a dropdown in it. If I click on the dropdown button and the dropdown displays, and then click directly into the RadEditor, the dropdown remains open instead of automatically collapsing. Is there any way to force it to collapse?
Yana
Telerik team
 answered on 23 Mar 2010
1 answer
91 views
I am adding rows as columns after getting value from dropdown, i page is posted back i am not able to getting the textboxes in template columns, after selecting dropdown value storing in to the session and redirecting to the same page. if do like that ,columns keep on adding when page is posted back every time. can u provide me any solutions..


protected void Page_Init(object sender, EventArgs e)
        {

            string strPlant = string.Empty;
            

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

                // Session["PlantVal"] = null;

                //strPlant = cPlantGroup.SelectedValue;

                if (strPlant != null && strPlant.Trim().Length > 0)
                {
                    DefineGridStructure(strPlant);
                }
            }
            
        }
        public DataTable DefineGridStructure(string strPlant)
        {
            dtRaleLoad = new DataTable();

            //RadGrid1.MasterTableView.AutoGenerateColumns = true;
            //RadGrid1.MasterTableView.EnableColumnsViewState = true;

            Plants oplant = new Plants();
            GridBoundColumn boundColumn = new GridBoundColumn();
            dtRaleLoad.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 = "";
                    //sPlantName = dr["PlantName1"].ToString();                        
                    sPlantCode = dr["PlantCode"].ToString();
                    dtRaleLoad.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();
            dtRaleLoad.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();


                    dtRaleLoad.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();
            dtRaleLoad.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();
            dtRaleLoad.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");

            Session["Rake"] = dtRaleLoad;
            RadGrid1.DataSource = dtRaleLoad;
            return dtRaleLoad;

        }
        private class MyTemplate1 : ITemplate
        {
            protected TextBox txtTotal;
            private string colname1;
            public MyTemplate1(string cName)
            {
                colname1 = cName;
                txtTotal = new TextBox();
                txtTotal.ID = colname1;
                txtTotal.Visible = true;
                System.Web.UI.Control container1 = new System.Web.UI.Control();
                container1.Controls.Add(txtTotal);

            }


            public void InstantiateIn(Control container)
            {
                txtTotal = new TextBox();
                //txtTotal.ReadOnly = true;
                txtTotal.ID = colname1;
                container.Controls.Add(txtTotal);

            }


        }
        private class MyTemplate2 : ITemplate
        {
            protected TextBox txtPort;
            private string colname2;
            public MyTemplate2(string cName)
            {

                colname2 = cName;
                txtPort = new TextBox();
                txtPort.ID = colname2;
                txtPort.Visible = true;
                System.Web.UI.Control container3 = new System.Web.UI.Control();
                container3.Controls.Add(txtPort);

            }

            public void InstantiateIn(System.Web.UI.Control container)
            {
                txtPort = new TextBox();
                txtPort.ID = colname2;
                container.Controls.Add(txtPort);
            }
        }

        private class MyTemplate3 : ITemplate
        {
            protected TextBox txtUnAllot;
            private string colname3;
            public MyTemplate3(string cName)
            {

                colname3 = cName;
                txtUnAllot = new TextBox();
                txtUnAllot.ID = colname3;
                System.Web.UI.Control container4 = new System.Web.UI.Control();
                container4.Controls.Add(txtUnAllot);

            }

            public void InstantiateIn(System.Web.UI.Control container)
            {
                txtUnAllot = new TextBox();
                txtUnAllot.ID = colname3;
                container.Controls.Add(txtUnAllot);
            }
        }

        private class MyTemplate4 : ITemplate
        {
            protected TextBox txtRake;
            private string colname4;
            public MyTemplate4(string cName)
            {

                colname4 = cName;
                txtRake = new TextBox();
                txtRake.ID = colname4;
                System.Web.UI.Control container2 = new System.Web.UI.Control();
                container2.Controls.Add(txtRake);

            }

            public void InstantiateIn(System.Web.UI.Control container)
            {
                txtRake = new TextBox();
                txtRake.ID = colname4;
                container.Controls.Add(txtRake);
            }


        }
Iana Tsolova
Telerik team
 answered on 23 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?