Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
279 views
Hi Telrik Team

is it Possible to Convert RadGrid Data to XML? i think there is no inbuild method to Export Into XML in rad grid.
please guide me to achieve this.

thanks

Regards
Kathir
Schlurk
Top achievements
Rank 2
 answered on 08 Sep 2009
3 answers
262 views
Happy Labor Day All,

I have RADControls for ASP.net Ajax (October 2008 build) and I'm just now dusting off this toolchest.  I have a site using ASP.net 3.5 on a shared web hosting account that employs Master Pages - one for the public portion of the site, and one for the private portion of the site.

Question:  I'm familiar with RadScriptManager from previous releases (ASP.net pre-Ajax), but not as familiar with RadAjaxManager.  Is RadAjaxManager the replacement for RadScriptManager?  That is, can I use just RadAjaxManager on my master page and not RadScriptManager?  Or, are they two different items serving different purposes? 

Thanks much for your help and insight.  Your assistance is appreciated!
Will
Top achievements
Rank 1
 answered on 08 Sep 2009
14 answers
1.0K+ views

This is an intermittent problem.  Sometimes the captcha image renders as a grey box showing no letters/numbers.  This is only occurring on our load balanced site.

Our Setup:

  • Two Window 2k3 Servers
  • Both servers are storing session within the ASPState database
  • Users bounce between server A and server B per every page request

Behaviors:

  • If I hit the two web servers directly, repeatedly requesting the captcha page - no error occurs
  • When I hit the two web servers using the load balancers, the captcha renders a solid grey box - say 40% of the requests.
  • It does not appear to matter which server the load balancer directs my request, as both web servers will sometimes not render the captcha correctly.
  • When the image does show, I have been unsuccessful thus far as to pass the validation test.


Any help/suggestions are appreciated.  Thanks
Tim

Joe
Top achievements
Rank 2
 answered on 08 Sep 2009
2 answers
154 views
Hello,

I need some help to finalize my radgrid implementation, being unable after hours of try to have desired fonctionalities.
Here are my hyposthesis:
- the grid is displayed in a pagewiew from a tabstrip/multipage having a 100% width,
- I have 30 k to 200K rows to display,
- each row contains a variable number of columns, depending of initial sql request: 3 to 30, each column must have a different display width, some need only 30px but some other 300px,
- user should be able to adapt column width clientside,
- Columns are autogenerated from datatable but I use Radgrid_ColumnCreated to fix each initial row display parameter, header width and wrap for header and content, some columns are DateTime some integer, Guid or string,
- row size should not be extended to more than one line, so for some columns, I use content wrap false,
- I use paging and need vertical scrolling because using a 200 row page size necessitate scrolling in a 20 row display window
- I have suppressed MaterTable viewstate to limit page size (displaying a radChart in the other Tab)
- I use the RadGrid needdatasource handler to generate an adapted table to the requet,

Here is my grid declaration
    <Telerik:RadPageView ID="PageView2" runat="server">  
        <div id='Zone2' style="float:left; position: relative; min-height:400px; min-width:980px; width:100%;">  
            <div id='ExportDiv' runat="server" style="float:left; width: 100%;" > 
                <asp:ImageButton ID="BtnExport2Excel" SkinID='Export2Excel' AlternateText="" runat="server" style="float:left;" /> 
                <asp:ImageButton ID="BtnExport2Word" SkinID='Export2Word' AlternateText="" runat="server" style="float:left;" /> 
            </div> 
            <Telerik:RadGrid ID="RadGrid1" runat="server" PageSize='20' AllowPaging="True"  AllowSorting="True" GridLines="None" ShowStatusBar='true' > 
                <MasterTableView TableLayout='Fixed' > 
                    <Columns> 
                    <Telerik:GridClientSelectColumn UniqueName='SelectColumn'  HeaderStyle-Width="30px"/>  
                   </Columns> 
                </MasterTableView> 
                <ClientSettings > 
                    <Selecting AllowRowSelect="True" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> 
                    <Resizing ResizeGridOnColumnResize="true" AllowColumnResize="True" ClipCellContentOnResize="true" /> 
                </ClientSettings> 
                <PagerStyle Mode= "NextPrevAndNumeric" /> 
            </Telerik:RadGrid> 
        </div> 
    </Telerik:RadPageView> 
 
and in codebehind in Page_Load
            RadGrid1.AllowCustomPaging                                      =   true;  
                RadGrid1.ShowGroupPanel                                     =   false;  
                RadGrid1.AllowFilteringByColumn                             =   false;   
                RadGrid1.ClientSettings.AllowDragToGroup                    =   false;  
                RadGrid1.ClientSettings.Scrolling.EnableVirtualScrollPaging =   false;  
 
+ in OnInit RadGrid1.MasterTableView.EnableViewState = false;

With all this I am unable to reach the desired effect:

1) The column size I fix in Column_Created are not all respected, for exemple I use this code for a GridDateTime column named stractivitytime

        void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)  
        {  
            if ( !(e.Column is GridEditableColumn) )  
                return;  
            string colName                  =   e.Column.HeaderText; //default  
                          
            if ( e.Column is GridBoundColumn )  
            {  
                colName                     =   ((GridBoundColumn)e.Column).DataField.ToLower();  
                // clipping on values ??? , avoid typecode because we need to transform it on ItemGridDataBound  
                //if ( ( colName != MNSTR.strtypecode ) || ( colName != MNSTR.strcrmuserid) ||  ( colName != MNSTR.strcrmitemid) )  
                //    ((GridBoundColumn)e.Column).DataFormatString = "<nobr>{0}</nobr>";     
            }  
            else if (e.Column is GridCheckBoxColumn)  
                colName = ((GridCheckBoxColumn)e.Column).DataField.ToLower();  
            else if (e.Column is GridTemplateColumn)  
                colName = ((GridTemplateColumn)e.Column).DataField.ToLower();  
            else if (e.Column is GridDropDownColumn)  
                colName = ((GridDropDownColumn)e.Column).DataField.ToLower();  
              
            string newName                      =   string.Empty;  
            bool display                        =   true;  
            switch (colName)  
            {  
                case MNSTR.strid:  
                    newName                     =   LocalizeHelper.Localize(MNSTR.id, "Id");  
                    display                     =   Settings[MNSTR.id].ToBool();  
                    e.Column.HeaderStyle.Width  =   new Unit("50px");  
                    break;  
                case MNSTR.stractivitytime:  
                    newName                     =   LocalizeHelper.Localize(MNSTR.activitytime, "Activity Time");  
                    e.Column.HeaderStyle.Width  =   new Unit("200px");  
                    e.Column.ItemStyle.Wrap     =   false;  
                    display                     =   true;  
                    break;  
etc. 
with this code I get a 30px column size for stractivitytime column for witch I need a 200px size.
Some text column get their desired width, I found no rules for this size attribution.
I tested in IE8 and FireFix 3.x

2) resizing of columns doesn't work: when I move the column header right side I obtain a dimension box giving a size, but when I release it, the column size is quite not changed ( I increase it to 300px and get a 32px result on mouse release ?????)
I tried to play with parameters in Column.Header.Style or Column.ItemStyle  like wrap and width with no results.


Is it possible to have the desired effects:
- paging
- scrolling vertically and horizontally
- fixing each start column width/wrapping and allowing users to change width



Thanks for help.

CS

Schlurk
Top achievements
Rank 2
 answered on 08 Sep 2009
2 answers
141 views
Hello,

Is it possible for the scheduler control to operate in somekind of resource mode where the Resources
are on the vertical axis and hours are on the horizontal axis.

Thanks in advance,

Jaap Groenendaal
HaiTek
Top achievements
Rank 1
 answered on 08 Sep 2009
4 answers
101 views
I have Tables Customer and Two nested Table(Order and OrderDetais). the problem is i have to
add the detail table (GridTableView) if the item is expanded
so far i solve the Customer To display the Order Table but when i try to expand
Order table to display The OrderDetails it wont show up how do i do this

Note: GridTableView will must be added only/during item expand

Customer
  Order
    OrderDetails       
 protected void RadGrid1_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) 
    { 
        if (e.DetailTableView.DataSourceID == "") 
        { 
 
            SqlDataSource2.SelectParameters["CustomerID"].DefaultValue = e.DetailTableView.ParentItem.GetDataKeyValue("CustomerID").ToString(); 
            e.DetailTableView.DataSource = SqlDataSource2; 
            GridTableView tableViewOrders = new GridTableView(RadGrid1); 
             
            tableViewOrders.DataSource = SqlDataSource3; 
            tableViewOrders.Width = Unit.Percentage(100); 
            tableViewOrders.AutoGenerateColumns = true; 
            tableViewOrders.DataKeyNames = new string[] { "OrderID" }; 
            tableViewOrders.HierarchyLoadMode = GridChildLoadMode.ServerOnDemand; 
            GridRelationFields relationFields = new GridRelationFields(); 
             
            relationFields.MasterKeyField = "OrderID"; 
            relationFields.DetailKeyField = "OrderID"; 
            tableViewOrders.ParentTableRelation.Add(relationFields); 
             
            e.DetailTableView.DetailTables.Add(tableViewOrders); 
            e.DetailTableView.ID = "NestedOrder"; 
             
        } 
         
    } 
 <asp:SqlDataSource ID="SqlDataSource1" 
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
            ProviderName="System.Data.SqlClient" 
            SelectCommand="SELECT * FROM Customers" runat="server"></asp:SqlDataSource> 
<asp:SqlDataSource ID="SqlDataSource2" 
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
            ProviderName="System.Data.SqlClient" 
            SelectCommand="SELECT * FROM Orders Where CustomerID = @CustomerID" runat="server"> 
            <SelectParameters> 
                <asp:Parameter Name="CustomerID" Type="string" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 
<asp:SqlDataSource ID="SqlDataSource3" 
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
            ProviderName="System.Data.SqlClient" 
            SelectCommand="SELECT * FROM [Order Details] where OrderID = @OrderID" runat="server"> 
            <SelectParameters> 
                <asp:Parameter Name="OrderID" Type="Int32" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 


   <telerik:RadGrid id="RadGrid1" DataSourceID="SqlDataSource1"   
             ShowStatusBar="true" runat="server" AllowPaging="True"  
        AllowSorting="True" AllowAutomaticUpdates="True"  
        OnItemCommand="RadGrid1_ItemCommand" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"> 
                <MasterTableView PageSize="10" DataKeyNames="CustomerID"> 
                
           <DetailTables> 
                <telerik:GridTableView></telerik:GridTableView> 
               
            </DetailTables> 
            
<ExpandCollapseColumn Visible="True"></ExpandCollapseColumn> 
        </MasterTableView> 
             
 
         
    <ClientSettings EnableRowHoverStyle="true"> 
     
    <Selecting AllowRowSelect="true" /> 
    <ClientEvents OnRowDblClick="RowDblClick" /> 
   </ClientSettings> 
    </telerik:RadGrid> 

Martin
Telerik team
 answered on 08 Sep 2009
1 answer
136 views

I have radgrid and a textbox with a button above that radgrid. I want to search items in the grid with the text entered in textbox.
My radgrid has mutiple rows but only one column.

Is it possible with clientside code?
Pavlina
Telerik team
 answered on 08 Sep 2009
1 answer
74 views
Hi team,

In my application i m using telerik hierarchial grid in which child level on add/edit calling usercontrols with textbox .
In which able to enter 10(existing) to 20 (current) . but 20 is not getting reflect still shows 10 only through debug also tried but no chance can anybody give idea

Advanced thanks for any help...
Pavlina
Telerik team
 answered on 08 Sep 2009
3 answers
253 views
Hi - how do I programatically disable (hide) the close and collapse buttons on a dock?

I need only administrators to have that option.

Thanks
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 08 Sep 2009
2 answers
202 views
Hello,

I implemented a button to change size of a RadChart, doing a RadAjaxManager ajaxRequest, handling it in an handler, setting the RadChart width and height and rebuiding the radChart.
No success, I trace everything seems Ok the no size change on the client.

Thanks for help on this.

Some other pb, even adding the radajaxmanager in its own ajaxsettings, doing the jaxrequest doesn't shows the ajaxpanel as for normal ajax requests ???

CS
Giuseppe
Telerik team
 answered on 08 Sep 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?