Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
164 views
I would like to edit some of the code behind for the PageProperties dialog and am not sure how to go about it.

In my case, all the data for the pages has been stored in a database.  With the radEditor, I can retrieve the content and place it into the editor, but if I need to change the page title, meta tags, etc. I would need to use the PageProperties.  The problem is that I don't want the page property data written back to the content window. 

So, my thoughts were that if I can intercept the loading and saving of the PageProperties dialog, I could populate it with my data from the database and save it back.

Shawn
hacker
Top achievements
Rank 1
 answered on 31 Mar 2009
1 answer
73 views
Hi, after update my telerik version to Q1 2009 I get an error:
 void rgListMainGridBase_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        
        if (e.Item is GridPagerItem) 
        {            
            LinkButton GoToPageLinkButton = (LinkButton)e.Item.FindControl("GoToPageLinkButton"); 
            GoToPageLinkButton.Text = "Idź";            
        } 
"Unable to cast object of type 'System.Web.UI.WebControls.Button' to type 'System.Web.UI.WebControls.LinkButton'.".
How can I fix this?
Daniel
Telerik team
 answered on 31 Mar 2009
2 answers
169 views
We are doing a trial and had installed 2008Q3 and built an ASP 3.5 webpage with RadScriptManager, RadAdjaxLoadingPanel, RadGrid(Editable Master/Detail), with several different GridColumnTypes.  What is the simplest way for me to upgrade the project(without losing anything) to 2009Q1?  And then I want to uninstall 2008Q3 from my machine?

Thanks,
John.
John
Top achievements
Rank 1
 answered on 31 Mar 2009
2 answers
86 views
I just upgraded some projects to the Q12009 version of RadGrid, and I am noticing for the edit and delete columns(GridEditCommandColumn) when I have the ButtonType set to ImageButton the mouse pointer does not change to the finger pointer when moving over the edit and delete images in the grid.  In the the Q32008 version of the control, the mouse pointer would automatically change to the finger pointer when moved over those columns.  How do I get the new version to function like the previous version?
John
Top achievements
Rank 1
 answered on 31 Mar 2009
0 answers
101 views
I am using a TreeView control (Q1 2008) version, but when viewed in RTL the lines connecting the nodes in the TreeView are still going in the same direction as the LTR view ans so are pointing away from the node rather than at the node.  In other words, they are like this:-

        Node
 Node  |_

but they should be like this:-

        Node
 Node _|

Does any one have the same problem ?

David
Top achievements
Rank 1
 asked on 31 Mar 2009
5 answers
348 views
I have the following tables:

mytest table
mytest_id int identity pk
mytest_name nvarchar(50)
mytest_lookup_id int fk
mytest_key nvarchar(10)

lookup table
lookup_id int identity pk
lookup_desc nvarchar(50)

I have the following working in a sharepoint web part:

I can insert, edit, and delete records from the mytest table using radgrid.
I can select values from a combo box bound to one of the columns in the grid and the value is selected from the lookup table.

I need to add the following functionality:

When a new record is inserted into the table, I need to be able to programmatically assign a value stored as a property of the class into the mytest_key field of the newly inserted record.  In the following example, I would like to be able to assign the myvalue property value into the mytest_key field when a new record is inserted.  I attempted to use the grid.ItemInserted event but I am not sure how to go about assigning the value into the mytest_key grid column for the newly inserted record.

Here is the web part code:


using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using Telerik.Web.UI;


namespace WebPart7
{
    [Guid("656556bd-6adc-43a0-ad6a-4ddb8b5039c8")]
    public class WebPart7:System.Web.UI.WebControls.WebParts.WebPart
    {
        string cServer = "myserver";
        string cDB = "mydb";
        string myvalue = "test";
        
        public WebPart7()
        {
        }

        protected override void CreateChildControls()
        {
        base.CreateChildControls();

        // TODO: add custom rendering code here.
        // Label label = new Label();
        // label.Text = "Hello World";
        // this.Controls.Add(label);
        
        }

 protected override void OnInit(EventArgs e)
{
   base.OnInit(e);
   Page.ClientScript.RegisterStartupScript(typeof(WebPart7), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
   if (this.Page.Form != null)
   {
       string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
       if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
       {
           this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
       }
   }
}

void Grid_ItemInserted(object source, GridInsertedEventArgs e)
{
// I would like to be able to assign the value stored in the myvalue property to the mytest_key field of the newly inserted record.
}

 protected override void OnLoad(EventArgs e)
{
   base.OnLoad(e);
   Panel panel = new Panel();
   panel.ID = "Panel1";
   panel.EnableViewState = true;
   this.Controls.Add(panel);

   string lcConnString;
   string lcCommand;
   SqlDataSource SqlDataSource1;
   lcConnString = "Data Source=" + this.cServer + ";Initial Catalog=" + this.cDB + ";Integrated Security=SSPI;";
   lcCommand = "SELECT mytest_id, mytest_name, mytest_lookup_id, mytest_key FROM mytest";
   SqlDataSource1 = new SqlDataSource(lcConnString,lcCommand);
   SqlDataSource1.UpdateCommand = "UPDATE mytest SET mytest_name = @mytest_name, mytest_lookup_id = @mytest_lookup_id, mytest_key = @mytest_key WHERE (mytest_id = @mytest_id)";
   SqlDataSource1.DeleteCommand="DELETE FROM mytest WHERE (mytest_id = @mytest_id)";
   SqlDataSource1.InsertCommand="INSERT INTO mytest(mytest_name, mytest_lookup_id, mytest_key) VALUES (@mytest_name, @mytest_lookup_id, @mytest_key)";
   SqlDataSource1.ID = "sqlds1";

   string lcConnString2;
   string lcCommand2;
   lcConnString2 = "Data Source=" + this.cServer + ";Initial Catalog=" + this.cDB + ";Integrated Security=SSPI;";
   lcCommand2 = "SELECT lookup_id, lookup_desc FROM lookup";
   SqlDataSource SqlDataSource2 = new SqlDataSource(lcConnString2,lcCommand2);
   SqlDataSource2.ID = "sqlds2";

   RadGrid grid = new RadGrid();
   grid.ID = "RadGrid1";
   grid.AutoGenerateColumns = false;
   grid.AllowAutomaticDeletes = true;
   grid.AllowAutomaticInserts = true;
   grid.AllowAutomaticUpdates = true;
   grid.DataSourceID = SqlDataSource1.ID;
   grid.Width = 400;
   
   GridBoundColumn mycolumn1 = new GridBoundColumn();
   mycolumn1.HeaderText = "mytest_name";
   mycolumn1.DataField = "mytest_name";
   mycolumn1.SortExpression="mytest_name";
   mycolumn1.UniqueName="mytest_name";
   grid.MasterTableView.Columns.Add(mycolumn1);

   string[] mydatakeynames;
   mydatakeynames = new string[1];
   mydatakeynames[0] = "mytest_id";

   grid.MasterTableView.DataKeyNames = mydatakeynames;
   grid.MasterTableView.EditMode = GridEditMode.PopUp;
   grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;

   GridDropDownColumn mycolumn2 = new GridDropDownColumn();
   mycolumn2.HeaderText = "Lookup";
   mycolumn2.DataField = "mytest_lookup_id";
   mycolumn2.ListValueField = "lookup_id";
   mycolumn2.ListTextField = "lookup_desc";
   mycolumn2.DataSourceID = SqlDataSource2.ID;
   grid.MasterTableView.Columns.Add(mycolumn2);

   GridBoundColumn mycolumn3 = new GridBoundColumn();
   mycolumn3.HeaderText = "mytest_key";
   mycolumn3.DataField = "mytest_key";
   mycolumn3.SortExpression="mytest_key";
   mycolumn3.UniqueName="mytest_key";
   grid.MasterTableView.Columns.Add(mycolumn3);


   GridEditCommandColumn mycolumn4 = new GridEditCommandColumn();
   grid.MasterTableView.Columns.Add(mycolumn4);

   GridButtonColumn mycolumn5 = new GridButtonColumn();
   mycolumn5.HeaderText = "Delete";
   mycolumn5.UniqueName = "DelCol";
   mycolumn5.CommandName = "Delete";
   mycolumn5.Text = "Delete";
   mycolumn5.ConfirmText = "Delete?";
   grid.MasterTableView.Columns.Add(mycolumn5);   
 
   grid.ItemInserted += new GridInsertedEventHandler(Grid_ItemInserted);

   panel.Controls.Add(SqlDataSource1);
   panel.Controls.Add(SqlDataSource2);
   panel.Controls.Add(grid);

   RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);
   if (ajaxManager == null)
   {
       ajaxManager = new RadAjaxManager();
       ajaxManager.ID = "RadAjaxManager1";
       Controls.Add(ajaxManager);
       this.Page.Items.Add(typeof(RadAjaxManager), ajaxManager);
   }
   ajaxManager.AjaxSettings.AddAjaxSetting(grid, panel);
}
}
}
SIT
Top achievements
Rank 1
 answered on 31 Mar 2009
3 answers
141 views
Hello,
I am using Radcombobox and Radtextbox in a web page. I set the same value for widths. But they don't look like they have the same size. Combobox is smaller a few pixels than textbox. I would appreatiate it a lot if you could help me as soon as possible.
Kind Regards,
Aytaç Utku TOPAL
Dimo
Telerik team
 answered on 31 Mar 2009
2 answers
174 views
Bonjour,

I would like to add a label/button/... in the CommandItem to expand or collapse the whole hierarchy of my grid. This operation is easy to do server-side but I have to do it on client-side. Is it possible ?

Thanks you.

Amicalement,

Laurent.



Pavlina
Telerik team
 answered on 31 Mar 2009
14 answers
249 views

I have just downloaded and installed the 2008.2 826 version of the RadControls. I use the RadCombox in many places on my website, and have ShowToggleImage set to false on nearly all instances.

When I put the new version into the application the ToggleImage is being displayed, as if the ShowToggleImage attribute is not working.

Is this a bug, or have I missed something?


Alex Gyoshev
Telerik team
 answered on 31 Mar 2009
13 answers
187 views
Hi everyone,

I found a potential issue with RowHoverStyle on a grid. Actually, I have a grid with a EnableRowhoverStyle="true" and the RowHoverStyle defined. Everythings work well except Row style doesn't apply when my mouse is over a table in a template column.

It is pretty closed from the selection problem there was is the 2008.1.415 version. My version is 2008.1.515.35.

Are there any workaround ? Is my developpment way correct ?

Regards,
Sebastien.



NEX
Top achievements
Rank 1
 answered on 31 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?