Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
388 views
I am creating a RadGrid in C# and adding it to a placeholder.

RadGrid RadGrid1 = new RadGrid();
RadGrid1.ID = "RadGrid1";
// Add the RadGrid instance to the controls
this.PlaceHolder1.Controls.Add(RadGrid1);
 
RadGrid1.DataSourceID = "SqlDataSource1";
RadGrid1.MasterTableView.DataKeyNames = new string[] { "Jobnumber" };
RadGrid1.Skin = "Default";
RadGrid1.Width = Unit.Percentage(100);
RadGrid1.PageSize = 15;
RadGrid1.AllowPaging = true;
RadGrid1.AllowSorting = true;
RadGrid1.AllowFilteringByColumn = true;
RadGrid1.AutoGenerateColumns = false;
RadGrid1.GridLines = GridLines.Both;
RadGrid1.ItemCommand += new GridCommandEventHandler(RadGrid1_ItemCommand);
 
//Add columns
 
GridBoundColumn boundColumn;
 
foreach (DataRow dr in dt.Rows)
{
    //Add column
 
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = dr["DataField"].ToString().Trim();     // Initalize the DataField value.
            boundColumn.HeaderText = dr["HeaderText"].ToString().Trim();   // Initialize the HeaderText field value.
            boundColumn.HtmlEncode = false;
            boundColumn.ReadOnly = true;
            boundColumn.SortExpression = dr["SortExpression"].ToString().Trim();
            boundColumn.HeaderStyle.CssClass = "headerstyle";
            if (dr["align"].ToString().Trim().ToUpper().Equals("RIGHT"))
                boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
            if (dr["align"].ToString().Trim().ToUpper().Equals("LEFT"))
                boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
            if (dr["align"].ToString().Trim().ToUpper().Equals("CENTER"))
                boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
 
            if (dr["width"].ToString().Length == 0)
                boundColumn.HeaderStyle.Width = 100;
            else
                boundColumn.HeaderStyle.Width = Convert.ToInt32(dr["width"].ToString().Trim());
 
            RadGrid1.MasterTableView.Columns.Add(boundColumn);
 }

<asp:PlaceHolder ID="PlaceHolder1" runat="server" />

The problem I am having is accessing the RadGrid in my other functions.

   protected void btn1AusePrint_Command(GridCommandEventArgs e)
    {
        RadGrid Grid1 = (RadGrid)PlaceHolder1.FindControl("RadGrid1");
 
       Grid1.PageSize = 1;                           // Set to one record per page when displaying document
 :
:
}

I get the following error on "Grid1.PageSize = 1;" when I build the solution

Error    1    'System.Web.UI.ControlCollection' does not contain a definition for 'Grid1' and no extension method 'Grid1' accepting a first argument of type 'System.Web.UI.ControlCollection' could be found (are you missing a using directive or an assembly reference?)   
Pat
Top achievements
Rank 1
 answered on 04 May 2011
5 answers
118 views
Hi,

I'm using the Outlook skin and the date in the month header is gray against blue background. So it's very hard to read it.
A screen shot image is attached. How do I change the font color to some light color such as "White"? Thanks.

Han
KJRB
Top achievements
Rank 1
 answered on 04 May 2011
9 answers
230 views
Hello guys!

When loading panel opens on Internet explorer 7 it's image doesn't show up. Does anyone knows why?

I'm attaching an image showing the problem.

The image is displayed properly on all other browsers: Opera, Firefox, Chrome and Safari. Only IE7 (a.k.a. crappy browser) does this.

Thanks!

Cezar
Archana
Top achievements
Rank 1
 answered on 04 May 2011
1 answer
183 views
Hi,

We've enabled RadCompression on a website that also uses an other 3rd party component which does it's own compression on it's response to AJAX requests to it's httphandler.
Because this component's gzip compression happens before the RadCompression the RadCompression causes the output to be double compressed.
When looking at the response header for this request it has a 'Content-Encoding' value of: 'gzip, gzip'. This causes the response to be dropped by browsers.

How should we handle this situation? We are not able to turn the other component's compression off.
Martin
Telerik team
 answered on 04 May 2011
1 answer
156 views
Hi,

I'm trying to achieve something very complex and i hope you can help me with it.

Imagine there is an ActiveX control which outputs file name and paths (like C:\testDir\testFile.txt) when executed. Once i capture the OCX event, i would like to set this path information to RadAsyncUpload control without using the Browse button.

I have completed OCX part, captured the path information and event on client, i just don't know how to set the value to RadAsynctUpload control present on the page. Is this possible in any way so that once i give the filename, it will start uploading automatically ?

I am using Q1.2010 NET35

Best Regards,

Ozan GUNCELER
Peter Filipov
Telerik team
 answered on 04 May 2011
1 answer
63 views
I need to create my menu with columns for some of the parent menu items, so the format has to be like this

item1                                       item2                                      item3
item1               item2               item1              item2                item
item3               item4               item3              item3                item
item5               item6                                                              item


and so on, I'm using the sitemapdatasource to populate my data, so can I achieve this format using radmenu 
Kate
Telerik team
 answered on 04 May 2011
1 answer
238 views
Hi

I am developing a stacked bar chart.  My datasource structure is

Month    value    GroupColumn
March    3            A            
March    1            B
March    2            C
April       4            A            
April       5            B
April       7            C

In my stacked bar chart, by default  A is displaying in the bottom of the chart and then B and C. I want to re-order the position, it should appear order C, then B and A.

Regards
Arima
Evgenia
Telerik team
 answered on 04 May 2011
2 answers
53 views
Hello,

I have a grid control with 4 groupheaders. The order is ascending or descending for them. Pl see attached image. I want present then in very specific order other than ascending and descending.

How to set order for the group headers ?
Maria Ilieva
Telerik team
 answered on 04 May 2011
1 answer
50 views
Hello,

I want to change the icon of raddock command. I am using skin sitefinity. To maintain cosistancy i wish to change it and pass it throgh CSS.

I am creating raddocks dynamically.
dock.Commands.Add(New DockCloseCommand())
dock.CommandsAutoPostBack = True

Here how to set css for the newly added close command ?
Pero
Telerik team
 answered on 04 May 2011
1 answer
68 views
Hello,

I have raddock with user controls embeded in them. If user refreshes the web browser or postback event then itemcontent image should have animation indicating page load is in progress.

Plz see attached image.
Pero
Telerik team
 answered on 04 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?