Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
177 views
Dear,

I want to bind the RADGrid with ObjectDatasource. One of the properties of the object is a BusinessAreaKey. Hence my object only have Key (e.g 'FIN' for fianancial Services). I have to show the user 'Financial Services' as buiness area instead of key 'FIN'. I have stored all the business Areas in xml file as Key-value pairs. So I read the xml data in objectDataSource as BusinessAreas.
I am using GridDropdownColumn to show the business areas. In RADGrid1_ItemDatabound() event, I am binding the column with the list of available business Areas with the check that item is an EditItem.
Problem that I am facing is: When RADGrid is initially loaded, I don't see the data in BunessAreas column. But when I click to update any row, business areas in all the rows below shows me correct values as expected.

protected

void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)

{

 

 

 

BLL.DealflowCompany dfCompany = null;

string idString ="";

if (e.Item.ItemType== GridItemType.EditItem)

{

 

GridEditableItem editedItem = e.Item as GridEditableItem;

GridEditManager editMan = editedItem.EditManager;

GridDropDownListColumnEditor editor =

editMan.GetColumnEditor("BusinessAreaKey") as GridDropDownListColumnEditor;

 

try{// Exception for new Item

 

idString = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString();

if (!string.IsNullOrEmpty(idString))

{

dfCompany = BLL.DealflowCompany.FromID(Convert.ToInt32(idString));

editor.DropDownListControl.SelectedValue = dfCompany.BusinessAreaKey;

}

}

catch{}

 

if(editor!=null)

{

editor.DataSource = LBOffice.Website.Language.GetBusinessAreas(Session["language_path"].ToString());

editor.DataTextField="Area";

editor.DataValueField = "Key";

editor.DataBind();

if(dfCompany!=null)

editor.SelectedValue = dfCompany.BusinessAreaKey;

 

}

 

 

 

 

}


I will appreciate if you can help me in resolving this issue.

Thanks.

Radoslav
Telerik team
 answered on 13 May 2010
1 answer
132 views
Do you have some Chart control which can accept 3-dimensional data (x,y,z) not only displays data in 2D dimensions (X and Y axis)?  If it does, could you please give me some sample code in C#.

Thanks ahead!

Sam
Schlurk
Top achievements
Rank 2
 answered on 13 May 2010
2 answers
92 views
has anyone experienced this? i have radcombo 2.8.6. i was on framework 2.0 using ajax control toolkit tab and update panels with the radcombo - worked fine.
i've upgrading my site to framework 3.5, upgraded the AjaxControlToolkit as well - now the radCombo's do not behave correctly. the first change i make to any radcombo on the page, after that, none of the rad combo's will drop down.

i'm wondering if i have to upgrade my radcombo??

thanks for any help!

Mary
MVeranis
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
166 views
Hi, I have a page with a Radtoolbar, this toolbar have a RadToolBarDropDown, basically I need to expand the RadToolBarDropDown when the page is visited for first time, but I can't see some property or method on C# or Javascript to allow me to expand the menu. Is it possible?

Thank you.
Princy
Top achievements
Rank 2
 answered on 13 May 2010
1 answer
131 views
HI,

I have a radtreeview in asp.net

I am dynamically building the radtreenodes and adding to the Radtreeview.

and I am dynamically adding the radgrid control to some of the node of the radtreeview.

plz find the below code
 protected void createtreenodes()
        {
            RadTreeNode tNode1 = null;
            RadTreeNodeCollection tnc = null;
                rdTrNewBusiness.Nodes.Clear();
                DataSet dsNode = new DataSet();
                dsNode.ReadXml(Server.MapPath("~/XMLs/NewPolicyLinks.xml"));
                dt = new DataTable();
                dt = dsNode.Tables[0];

              
                for (int j = 0; j < dt.Rows.Count; j++)
                {
                    tNode1 = new RadTreeNode();
                    tNode1.Text = dt.Rows[j]["Name"].ToString();
                    rdTrNewBusiness.Nodes.Add(tNode1);

                    tNode1.ExpandMode = TreeNodeExpandMode.ServerSide;

                    if (tNode1.Text == "POLICY")
                    {
                        BindPolicy(tNode1);
                    }
                    else if (tNode1.Text == "ENTITIES")
                    {
                        NodeTxt = BindGrids(tNode1, tNode1.Text, "~/XMLs/EntitiesInfo.xml");
                        tNode1.Text = "ENTITIES" + " (" + NodeTxt + ")";

                        if (!object.Equals(Session["Node"], null))
                        {
                            if (Session["Node"].ToString().Trim().Length > 0)
                            {
                                tNode1.Expanded = true;
                            }
                        }
                    }
                    else if (tNode1.Text == "COVERAGE")
                    {
                        BindCoverage(tNode1);
                    }
                    else if (tNode1.Text == "VEHICLES")
                    {
                        NodeTxt = BindGrids(tNode1, tNode1.Text, "~/XMLs/Vehicle.xml");
                        tNode1.Text = "VEHICLES" + " (" + NodeTxt + ")";

                    }
                    else if (tNode1.Text == "DRIVERS")
                    {
                        NodeTxt = BindGrids(tNode1, tNode1.Text, "~/XMLs/DriversInfo.xml");
                        tNode1.Text = "DRIVERS" + " (" + NodeTxt + ")";

                    }
                    else if (tNode1.Text == "HISTORY")
                    {
                        NodeTxt = BindGrids(tNode1, tNode1.Text, "~/XMLs/CarrierInfo.xml");
                        tNode1.Text = "HISTORY" + " (" + NodeTxt + ")";
                    }

                    else if (tNode1.Text == "RATE")
                    {
                        BindRate(tNode1);
                    }
                }
               tnc  = new RadTreeNodeCollection(rdTrNewBusiness);
                tnc.Add(tNode1);
                Cache["Tree"] = tnc;
                dsNode = null;
            }


The problem is when we are clicking on any grid row (which is dynamically constructed radgrid), all the tree nodes are in collapse mode, i want the node which is expanded with the grid to maintain the same state.

could any one plz help me how to maintain the state of the radtreeview which is dynamically created in postbacks.
Princy
Top achievements
Rank 2
 answered on 13 May 2010
9 answers
288 views
Hello,

I am using asp.net DropDownList and RadFormDecorator on form ,
I am unable to set dropDownList height or enable to set scroll bars. 

Here is my test code,

 <telerik:RadFormDecorator runat="server" ID="rad" DecoratedControls="All"/> 
        <asp:DropDownList ID="ddlTest" runat="server"
        <asp:ListItem Text="11212122"></asp:ListItem> 
        <asp:ListItem Text="1121fd122"></asp:ListItem> 
        <asp:ListItem Text="1121fs122"></asp:ListItem> 
        <asp:ListItem Text="1121sdf22"></asp:ListItem> 
        <asp:ListItem Text="1121f2122"></asp:ListItem> 
        <asp:ListItem Text="1121f2122"></asp:ListItem> 
        <asp:ListItem Text="112121df"></asp:ListItem> 
        <asp:ListItem Text="11212d22"></asp:ListItem> 
        <asp:ListItem Text="112df122"></asp:ListItem> 
        <asp:ListItem Text="112sgh22"></asp:ListItem> 
        <asp:ListItem Text="1121gh22"></asp:ListItem> 
        <asp:ListItem Text="112er122"></asp:ListItem> 
        <asp:ListItem Text="11er2122"></asp:ListItem> 
        <asp:ListItem Text="11er2122"></asp:ListItem> 
        <asp:ListItem Text="112erer2"></asp:ListItem> 
        <asp:ListItem Text="11212e22"></asp:ListItem> 
        <asp:ListItem Text="11e1e122"></asp:ListItem> 
        <asp:ListItem Text="112e2h22"></asp:ListItem> 
        <asp:ListItem Text="11e1h122"></asp:ListItem> 
        <asp:ListItem Text="1121h122"></asp:ListItem> 
        <asp:ListItem Text="1121e122"></asp:ListItem> 
        <asp:ListItem Text="11w1h122"></asp:ListItem> 
        <asp:ListItem Text="112h2122"></asp:ListItem> 
        <asp:ListItem Text="1121e122"></asp:ListItem> 
        <asp:ListItem Text="11sh2122"></asp:ListItem> 
        <asp:ListItem Text="11212122"></asp:ListItem> 
        <asp:ListItem Text="112f2122"></asp:ListItem> 
        <asp:ListItem Text="11212fg2"></asp:ListItem> 
        <asp:ListItem Text="1121dfg2"></asp:ListItem> 
        <asp:ListItem Text="11212122"></asp:ListItem> 
        <asp:ListItem Text="1dfg2122"></asp:ListItem> 
        <asp:ListItem Text="1121dfg2"></asp:ListItem> 
        <asp:ListItem Text="1121d122"></asp:ListItem> 
        </asp:DropDownList>  


Can you please tell me how do I set height of  DropDownList or enable scrollbars.

I am using telerik Q2 2009 released.

Thanks,
Amol Wable
Georgi Tunev
Telerik team
 answered on 13 May 2010
3 answers
168 views

http://demos.telerik.com/aspnet-ajax/input/examples/common/orderform/defaultcs.aspx

On that page try paste some text into any textbox and then lose focus (click somewhere) and then again set focus on textbox. The text disappear! Why is that happening and how to avoid that?

It happens in FF and Opera. In IE 8 not.

Dimo
Telerik team
 answered on 13 May 2010
1 answer
80 views
I am developing a website and i need to deploy the soltion to different servers. I have added a custom dialog to the editor. No problem there. But everytime i make changes to the mosseditortools.js file i have to copy this file by hand to the various servers to the right location. Is there a way that i can let the editor look for a costum lacation for the mosseditortools.js file, preferably in the sharepoint 12 hyve. I read in the documentation that for instance the location of the toolfile.xml can be customized, is that also possible for the mosseditortools.js file so i can included it in my automated deployment?

Kind regards
Stanimir
Telerik team
 answered on 13 May 2010
1 answer
114 views
We have integrated the RadEditor with MOSS 2007.  The image manager is configured to load images from a specific list in the site but only shows 'Filename' and 'Size'.  Can this be changed to include additional columns in the underlying list?  Sometime images aren't name appropriately and it would be nice to have a 'Name' displayed as well.  See attached screen shot.

Thanks
Stanimir
Telerik team
 answered on 13 May 2010
4 answers
742 views
I am trying to remove the editing interfaces when a user is not allowed to edit the RadGrid contents. The grid has a master table view with 2 detail tables at the same level. In the grid's PreRender event, I use the following code to hide the edit and delete columns, but only the Master View's columns are hidden when the page is first rendered. Clicking the master grid's Refresh Data button then hides the detail tables' columns even if this code is prevented from re-running, so it seems the setting has been made, but not used during the first render. I have similar code in the ItemCreated event which sets the GridCommandItem display to None. That also displays correctly for the master table on the initial page render, but only takes affect for the detail tables after the Refresh Data. How can I hide the columns and command items during the first page rendering. I am using Telerik version 2010.1.415.35.

protected void RadGridSubjectArea_PreRender(object sender, EventArgs e)  
    {  
        Trace.Write("Event", this.ToString() + ": " + "RadGridSubjectArea_PreRender");  
        RadGrid grid = (RadGrid)sender;  
 
        bool editAllowed = this.isEditAllowed;  
        grid.AllowAutomaticInserts = editAllowed;   //Added safety since controls should be hidden  
        grid.AllowAutomaticDeletes = editAllowed;  
        grid.AllowAutomaticUpdates = editAllowed;  
 
        GridTableView view = grid.MasterTableView;  //Top-level view  
        //Set editability of this view and child views at any level  
        this.GridTableHierarchySetEditability(view, editAllowed);  
 
        //Try to force the display to refresh?
        //Clicking master grid's Refresh Data hides the columns even if this code is NOT re-run,
        // so it seems the setting has been made, but not used during the first render?
        //grid.Rebind();    //This prevents clicking Refresh Data from working.  
    }  
 
    protected void GridTableHierarchySetEditability(GridTableView view, bool editAllowed)  
    {  
        Trace.Write("Event", this.ToString() + ": " + "GridTableHierarchySetEditability");  
        //Recursively set editability for this table view and all its children.  
        //Unnecessary since we hide command buttons, but this is further protection.  
        view.AllowAutomaticInserts = editAllowed;  
        view.AllowAutomaticDeletes = editAllowed;  
        view.AllowAutomaticUpdates = editAllowed;  
 
        //Show or hide command columns (generally edit or delete)  
        foreach (GridColumn col in view.Columns)  
        {  
            if (col.ColumnType == "GridEditCommandColumn" || col.ColumnType == "GridButtonColumn")  
            {  
                col.Visible = editAllowed;  
            }  
        }  
 
        //Process any child tables  
        foreach (GridTableView child in view.DetailTables)  
        {  
            this.GridTableHierarchySetEditability(child, editAllowed);  
        }  
    }  
 
<BR> 

 


 

 

Paul
Top achievements
Rank 1
 answered on 13 May 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?