Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
97 views
Steps to reproduce :

2) Checkbox “Use Tool  Provider” checked and “Apply settings” is clicked
3) Go to the second editor , click on Insert Table Icon 

There should be valid Table Wizard link in the dropdown menu. Instead there is disabled  “Insert Row Above” link. 

How can i fix it ?

Nik
Top achievements
Rank 1
 answered on 14 Aug 2009
4 answers
210 views

 

 

Hello i need to create from 1 to many new RadGrids based on the selection of an item/s from a static RadGrid, ie create a new "on the fly" RadGrid for every row item selected from a static RadGrid. I thought that by giving each new RadGrid a new RadGrid.ID, see below, that it might create a new RadGrid and that a new RadGrid would appear under the previously created RadGrids, ie appending new RadGrids under the previous created "otf" RadGrids. But i think i'm getting the understanding that i would need to create all of the potential new "otf" RadGrids in advance and manage the visibiliy of each one as needed. For example i would have to create a list of RadGrids in advance like RadGrid radgrid1; RadGrid radgrid2; RadGrid radgrid3; ......ect. Or is there a way to actually create a new RadGrid really genuinely from scratch on the fly?  

private
void DefineGridStructure2()

 

{

 

string txt = "TABLE1";

 

CustomQuery.

GetInfoSchema gis = new CustomQuery.GetInfoSchema();

 

 

string cs = "Data Source=DEVSQL.fhfb.gov;Initial Catalog=CustomQuery;Integrated Security=True";

 

 

DataTable dt = gis.GetTableInfo(cs, txt);

 

 

 

RadGrid grid = new RadGrid();

 

 

string sgridID="grid"+lblMessage.Text;

 

grid.ID = sgridID;

grid.AutoGenerateColumns =

true;

 

grid.DataSource = dt;

grid.DataBind();

Master.FindControl(

"mainContain").Controls.Add(grid);

 

 

string chktxt = lblMessage.Text;

 

}

Bob
Top achievements
Rank 1
 answered on 14 Aug 2009
2 answers
109 views
Ok this may sound really easy but I'm having a hard time figuring it out, basically I have a Grid with an ID and text column, simple add/edit/delete functionality is what I'm looking for.  Because of company standards I cannot use an Object or SQL data source, I'm using MVP and need to bubble the events.

I've got the item_command event firing fine but I'm looking for a way to invoke Telerik's "Automatic" edit form on the server side, does anyone have any ideas? 

As a side note, when I do setup a datasource, automatic operations are fine, I'm just looking for a way to invoke automatic operations without a data source.

I'll post in some aspx and code behind so you can see sort of what I'm trying to do:


<

 

telerik:RadGrid runat="server" ID="radViews" AutoGenerateDeleteColumn="True"

 

 

AutoGenerateEditColumn="True" GridLines="None" AllowAutomaticUpdates="true"

 

 

Skin="Office2007" OnItemCommand="radViews_ItemCommand" >

 

  <

 

HeaderContextMenu EnableTheming="True">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</

 

HeaderContextMenu>

 

<

 

MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top">

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"

 

 

SortExpression="ID" UniqueName="ID">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Text" HeaderText="Text"

 

 

SortExpression="Text" UniqueName="Text">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

</

 

MasterTableView>

 

<

 

FilterMenu EnableTheming="True">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</

 

FilterMenu>

 

 

</telerik:RadGrid>

 

protected

 

void radViews_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

 

{

 

if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked

 

 

 

 

{

    e.Canceled =

true;

 

 

    //Prepare an IDictionary with the predefined values

 

 

 

 

    System.Collections.Specialized.

ListDictionary newValues = new System.Collections.Specialized.ListDictionary();

 

    newValues[

"Tag"] = user.UserName;

 

 

    
    //Insert the item and rebind

 

 

 

 

    e.Item.OwnerTableView.InsertItem(newValues);

}

 

// Pass to MVP

 

 

 

 

 

if (e.CommandName == RadGrid.DeleteCommandName)

 

    {

 

        this.OnDeleteView(this, e);

 

    }

 

if (e.CommandName == RadGrid.EditCommandName)

 

    {

 

        "Go Go Gadget editable Grid!!!!"    

 

 

 

 

    }

 

}

 


Brandon Slezak
Top achievements
Rank 2
 answered on 14 Aug 2009
6 answers
259 views
Hi,
    From what I have read researching this issue, it seems that simply using the RadMenu BackColor as you do in other controls is not straightforward.
    I have read things talking about setting it programmatically, childmenu items, etc.
    I just want to be sure there is nothing I am overlooking to simply use the RadMenu BackColor="Color" property ?
    This is my code .....
  <telerik:RadMenu OnClientMouseOut="Mmouseout" OnClientMouseOver="Mmouseover" OnItemClick="RadMenu1_OnItemClick" 
                                    OnClientItemClicked="RadMenu1_OnClientItemClicked" ID="RadMenuLine" ExpandAnimation-Type="InOutBack" 
                                    CollapseAnimation-Type="InQuad" BorderColor="Brown" 
                                      Skin="WebBlue" runat="server" Font-Size="Small" 
                                     Width="100%" commandName="MenuCommand"  > 
                                       <Items> 
                                        <telerik:RadMenuItem GroupSettings-ExpandDirection="Up" runat="server" Text="View" 
                                            BackColor="Yellow" ForeColor="Brown" Font-Bold="true"  Style="font-weight: bold">  
                                            <Items> 
                                                <telerik:RadMenuItem runat="server" Text="Detail" CssClass="MenuItemLeft" BackColor="Yellow" 
                                                    ForeColor="Blue">  
                                                </telerik:RadMenuItem> 
                                                <telerik:RadMenuItem runat="server" Text="Summary" ForeColor="Blue">  
                                                </telerik:RadMenuItem> 
                                                <telerik:RadMenuItem runat="server" Text="Print" NavigateUrl="~/mybodyscience/MBS_Reports/iqReport_Display.aspx" 
                                                    BackColor="Yellow" ForeColor="Blue" Target="_blank">  
                                                </telerik:RadMenuItem> 
                                            </Items> 
                                        </telerik:RadMenuItem> 
                                        <telerik:RadMenuItem runat="server" Text="Add Equipment" commandName="MAddCommand" 
                                          BackColor="Yellow" ForeColor="Brown" Font-Bold="true" > 
                                        </telerik:RadMenuItem> 
                                        <telerik:RadMenuItem runat="server" Text="Refresh"    
                                            BackColor="Yellow" ForeColor="Brown" Font-Bold="true" > 
                                        </telerik:RadMenuItem> 
                                        <telerik:RadMenuItem runat="server" id="Mhelp" Text="Help" commandName="MhelpCommand" 
                                            BackColor="Yellow" ForeColor="Brown" Font-Bold="true" Value="88">  
                                        </telerik:RadMenuItem> 
                                    </Items> 
                                </telerik:RadMenu> 

Thanks for your time ....
IQworks
Top achievements
Rank 1
 answered on 14 Aug 2009
8 answers
216 views
I would like some help in achieving the following functionality:

When user clicks the Maximize command, call a function once the window has been resized.

Currently, using the OnClient Command, the event is fired before the window is actually maximized therefore I am unable to generate new content based on the new size.

Additionally, the OnClientResize event is not triggered when a Maximize is executed.

Any help is greatly appreciated and needed!

Telmo


Brian Kowald
Top achievements
Rank 1
 answered on 14 Aug 2009
1 answer
140 views
Hi All,

I am using RadControl Q1 2009 control.

I am using RadEditor, and radTreeview control.

I want to drop the theeview node to radeditor on selected position.

In currently it drop the data on to first line of rad editor.
But i want to drop it on selected cursor position.

How can i dow this?


My code for droping is below.

 

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
     editor.setFocus(); 
       editor.pasteHtml("test"); 
 
 
 }

I have tried the the one more code

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
    editor.setFocus(); 
    editor.setActive(); 
    var rng = editor.getSelection().getRange(); 
    rng.moveToPoint(294, 322); 
    rng.expand("word"); 
    rng.select(); 
     editor.pasteHtml("test")
}


But it also not work it gives error as '"Incompatible markup pointers for this opertion'



 
  


Thanks,
Rumen
Telerik team
 answered on 14 Aug 2009
0 answers
136 views
Hi team,

I have build one Rotator programaticaly implemented as Todd Anglin blog sample with ItemTemplate as Itemplate implementation. My problem is that my item template is rended as "Text" <%# Container.DataItem %> in place to be evaluated. Could you suggest some solution to be able to evaluate the content inside my rotator using codebehind.

C# as codebehind 
... 
Rot.ItemWidth = Unit.Pixel(300); 
Rot.ItemHeight = Unit.Pixel(200); 
Rot.ItemTemplate =new RotatorTemplate() ; 
... 
public class RotatorTemplate : ITemplate 
{ 
    #region ITemplate Membres 
    public void InstantiateIn(System.Web.UI.Control container) 
    { 
        LiteralControl lc1 = new LiteralControl("<%# Container.DataItem %>"); 
        container.Controls.Add(lc1);  

    } 
    #endregion 
}                
 
In my case i use one List<string> item that work perfect in static code as
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>

Many thanks, Romi

Pierre
Top achievements
Rank 1
 asked on 14 Aug 2009
1 answer
93 views
Hi all,

i hope i can describe this properly:

We create an ImageManager for an editor in Codebehind like this:

DialogDefinition imageManager4Editor = new DialogDefinition(typeof(ImageManagerDialog), ImageManagerParameters); 
imageManager4Editor.ClientCallbackFunction = "ImageManagerFunction"; 
imageManager4Editor.Width = Unit.Pixel(694); 
imageManager4Editor.Height = Unit.Pixel(440); 
DialogOpener1.DialogDefinitions.Add("ImageManager4Editor", imageManager4Editor); 
 

Then the ImageManager CallbackFunction which returns the values for the image looks like this:

function ImageManagerFunction(sender, args)   
{   
    var commandName = args.get_commandName();    
                 
    var value = args.get_value(); 
    var src = value.src; // works 
    var height = value.height; // works 
    var width = value.width; // works 
    var border = value.? //  
    ... 
     
}     

Now, we would need the names of all other properties, which the properties-tab of the ImageManager holds, at least: border-color, border-width, image-alignment, margin.

Is there a list, reference or soemthing like that with the names of these properties?

Thanks in advance
Felix
Rumen
Telerik team
 answered on 14 Aug 2009
1 answer
121 views
Hi,

I have one RadDockzone and i added the controls to  the doczone dynamically (through Code behind). How i can able to place the Expand/Collapse button on the top right of the Dock zone. I can able to get the close button but the Expand/Collapse button is not comming when the Dockzone is loaded.

NB: The controls inside the RadDockzone are created dynamically.

Can any one help me to solve this Issue.

Thanks & Regards,
Sushanth Mathew.


 

Pero
Telerik team
 answered on 14 Aug 2009
3 answers
141 views
Just wondering if this is a known bug or not. Setting the width programmatically:
      
rgAuthorizations.Columns.FindByDataField("HExports").HeaderStyle.Width = New Unit(20, UnitType.Point) 

I get the following exception:

System.SystemException: Unknown length unit 'ptpx' 
  at Telerik.Web.Apoc.ApocDriver.FireApocError(String message) 
  at Telerik.Web.Apoc.DataTypes.FixedLength.Convert(Double dvalue, String unit) 
  at Telerik.Web.Apoc.DataTypes.FixedLength..ctor(Double numUnits, String units) 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parsePrimaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseUnaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseMultiplicativeExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseAdditiveExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseProperty() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parse(String expr, PropertyInfo propInfo) 
  at Telerik.Web.Apoc.Fo.PropertyMaker.Make(PropertyList propertyList, String value, FObj fo) 
  at Telerik.Web.Apoc.Fo.PropertyListBuilder.MakeList(String ns, String elementName, Attributes attributes, FObj parentFO) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.StartElement(String uri, String localName, Attributes attlist) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)  

I have tried it with Points and EMs as my units.
JP Shilton
Top achievements
Rank 1
 answered on 14 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?