Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views
Hi ,

I am treeview control.
I am adding nodes dynamically using following code.
Nodes are actually database column names.


RadTreeNode tnAttr = new RadTreeNode(attr.Name); // Here attr.Name is "Category<ID"
tnAttr.ToolTip = attr.LongDescription;
 
treeViewDimension.Nodes.Add(tnAttr);

In Internet Explorer 8 i am getting scriptresource error ,hence the node is not visible in treeview but it generating space .

while in Firefox it is working but text is cutting down to "Category".

This is hapening when we are sending node values contains "<".

Please suggest for same .We need to allow '<' character in treeview
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 22 Sep 2011
1 answer
122 views
Hello,
    I have a RadGrid with a check box column to select the row and I have used the code in this demo http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectrowwithcheckbox/defaultcs.aspx
    For some reason after selecting 4th row the RadGrid.SelectedItems resets to 0.I am populating a listbox based on the selected items in the radgrid but this does not work because of the above mentioned issue. I have noticed while debugging that the non public member "Capacity" is by default set to 4, not sure how to set/override it.
    For now I had to get around the problem by iterating to all the items in the Radgrid ,then use the FindControl to get the checkbox checked status and then populate the Listbox.This works so far but I feel its a workaround.
Not sure what I am missing.Any help is much appreciated.

Old code

 

((sender as CheckBox).NamingContainer as GridItem).Selected = (sender as CheckBox).Checked; 
 foreach (GridDataItem row in RadGrid1.SelectedItems) 
      RadlstOLDest.Items.Add(new RadListBoxItem(row["OrderLineId"].Text, row["OrderLineId"].Text)); 

 
New Code

foreach (GridDataItem row in RadGrid1.MasterTableView.Items) 
{
    if ((row.FindControl("CheckBox1") as CheckBox).Checked) 
    {
                RadlstOLDest.Items.Add(new RadListBoxItem(row["OrderLineId"].Text, row["OrderLineId"].Text)); 
                row.Selected = true
    }
}

Thanks,
Vikas

Mira
Telerik team
 answered on 22 Sep 2011
0 answers
117 views

I am Using a editform popup to display some hyperlinks. to position the popup I am using the clientevent

 

<

 

 

ClientEvents OnPopUpShowing="PopUpShowing" />

 


the Popupshowing method resides in another java script file. I am using the samescript as mentioned in http://www.telerik.com/help/aspnet-ajax/grid-center-popup-edit-form.html

but for some reason the

var

 

 

popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px")); is coming empty.

I am not sure why? can someone please help me in here.

what i am doubting is that i am having a usercontrol binded to the popup and it gets build up after the script is trigered. so is causing the height to be empty.

 

FireHolster
Top achievements
Rank 1
 asked on 22 Sep 2011
1 answer
91 views
Hello,

I have an sql server 2008 r2 time(0) data type field with format (hh:mm:ss) to a radgrid and i would like to export it to an excel file.

I use this code:

StyleElement timeStyle = new StyleElement("timeItemStyle");
timeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";
//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;
timeStyle.FontStyle.Color = System.Drawing.Color.Red;
e.Styles.Add(timeStyle);
 
StyleElement alternatingTimeStyle = new StyleElement("alternatingTimeItemStyle");
alternatingTimeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";
//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;
alternatingTimeStyle.FontStyle.Color = System.Drawing.Color.Red;
e.Styles.Add(alternatingTimeStyle);
 
but i can't see the time data at my excel file. Where is the error;

P.S.

The LongTime member of NumberFormatType enumerator is not suitable for my case, because my data are in hh:mm:ss format and not in hh:mm:ss:ff. 

Thank you very much.
Princy
Top achievements
Rank 2
 answered on 22 Sep 2011
2 answers
91 views
Hello,

I want to know how can I have the grid in edit mode (for all rows) when the page is loading?

Thank you for your help.


Donatien
Donatien
Top achievements
Rank 1
 answered on 22 Sep 2011
13 answers
1.1K+ views
I have two aplications that both use the RadGrid (version 2008.3.1314.35).  In one of the applications, I declare the grid in markup, and bind it to a data source.  columns are auto generated, and I set TableLayout to Auto.

In the other application, the grid is created at runtime in my code behind (from CreateChildControls).  Again, I set TableLayout to auto and use autogenerated columns from a bound data source. 

I set my various properties the same for both apps (scrolling enabled, auto layout, nowrap, etc).

The first application, that declares the grid in markup, is fine - the columns automatically size the the data in them, and if horizontal scolling is required, it does that.

The second application creates all columns of equal width even though I have:

grid.MasterTableView.TableLayout =

GridTableLayout.Auto;

I am at wits end as to why the markup based one would work but the one created from code behind does not honor the auto table layout.  I have noticed that the page source between the two has some differences. 

1) In the working (markup based) app, the <div> for the GridHeader has style="overflow: hidden; width: 100%", whereas in the code-behind based app the <div> for the GridHeader has style="overflow: hidden; padding-right: 17px;".  I don;t know if that width: 100% in the header is making the difference, but I can't figure how to force it in the code behind based app to test it out.

2) In the working app, the ctl00_Header <div> has a width in it's style setting whereas in the code-behind based one there is not.

3) In the working app, the header has a colgroup that looks like this:

 

            <colgroup>
                <col width="316"/>
                <col width="403"/>
                <col width="146"/>
                <col width="98"/>
            </colgroup>

whereas in the code-behind based app it clooks like this:

            <colgroup>
                <col width="20"/>
                <col/>
                <col/>
                <col/>
                <col/>
            </colgroup>

Note that one significant difference between the two aps is that the code-behind based app also uses a detail table (so the first visible column, corresponding the the first column in the colgroup above, is the expand/collapse icon for the detail table.)

Any ideas for what might cause a non-markup based app to not honor the TableLayout set to Auto would be aprciated.

-Ed Hinton

Pavlina
Telerik team
 answered on 22 Sep 2011
1 answer
85 views

http://www.telerik.com/help/aspnet-ajax/radbutton-use-navigate-url-with-standard-button-type.html

splitString[3] is undefined



Dobromir
Telerik team
 answered on 22 Sep 2011
1 answer
82 views
When I set the SelectedTabIndex on Page Load it does only work the first time the page is loaded. On the following postbacks it is not correctly handled.
However, if I add the same logic in the OnPreRender, it works correctly.

Is this by design? or is it a bug?
Kate
Telerik team
 answered on 22 Sep 2011
2 answers
106 views
Hi,

This week I test free trial Telerik ASP.NET Q2 2010 on visual studio 2008.
I have to create a custom skin, that is very important for my business. With embedded skin all is ok but when I tried to use custom skin from visual style builder, problems begins. In this thread I joined in attachment the result on firefox (same on IE) and my custom skin is based on forest original skin with no modification.

Big green place in the display is rad editor!

Thanks to look at my code.


My aspx page ;

<%@ Page Language="C#" AutoEventWireup="true" Theme="MySkin" CodeBehind="Default.aspx.cs"  Inherits="Mailing._Default" ValidateRequest="False"  MaintainScrollPositionOnPostback="true"%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Mailing OneTec</title>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
</head>

<body >
<div id="divGeneral" >

    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="All"</telerik:RadFormDecorator>

 
    
    
    <div id="divContent" >
            <h1>Mailing OneTec</h1>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------


My config file;

<appSettings>
    <add key="SmtpServeur" value="10.10.74.1" />
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
    <add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />
    <add key="Telerik.Skin" value="MySkin" />

  </appSettings>
Jyolsna
Top achievements
Rank 1
 answered on 22 Sep 2011
1 answer
217 views

Hi,
Could anyone please tell me - How to get the following  dynamically in code behind (i was able to set values for these ...)
    1. RadGrid's each row height (Row height of each row in MasterTableView)
    2. Height of MasterTableView .

Why I need this:
One column in my radgrid is description. It can grow to huge size. I cant parse and give tool tip as I need to print and export(it exports/prints only the data on the grid)
So I gave scrolling to grid even though pagination is there .
Since the description can grow and shrink the following code inside DataBound Event is also not working

   
        if (gridItems < 4)

            {

                grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(gridItems * 28);

            }

So I tried instead of hard coded "28", the following

if (grid.MasterTableView.Height.Value >= 150)

       {

           grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(150);

       }

       else

       {

           grid.ClientSettings.Scrolling.ScrollHeight = grid.MasterTableView.Height;

       }



But grid.MasterTableView.Height is always 0.0   :(

 

Pavlina
Telerik team
 answered on 22 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?