Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
28 views
Hi,  The issue I'm having is the in IE6, the select drop downs within my page are coming through the tool tip, when the tool tip should be the most foreground item. 

Cheers,

Davoc
Svetlina Anati
Telerik team
 answered on 20 Dec 2010
2 answers
65 views
I am having a problem setting the filter item border. The header and all other item's border is getting set whereas Filter Row items are not.
Can anyone help with this.?
I have attached the screenshot.
I have set the Filter-Item Style under rad grid and MasterTableView Tags. But that doesnt seem to work.
Thanks and Regards,
Niraj Khose
Niraj
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
61 views
I want to remove this line below you can see at picture, how I can do it and I want to set this close button hard by with maximize icon
see picture
Georgi Tunev
Telerik team
 answered on 20 Dec 2010
1 answer
88 views
Hi Forum,
Please assist, I am creating the Radgrid programmatically and want to add Radcombox as a filtering item to it. 
 No Clue, and I've tried everything I can find. 
I want the design output like the attached file.

Bali.

 here is sample code i am using.

     rdGrd = new RadGrid();
            rdGrd.AutoGenerateColumns = false;
            rdGrd.AllowPaging = true;           
            rdGrd.AllowSorting = true;
            rdGrd.AllowFilteringByColumn = true;     

            rdGrd.Width = Unit.Pixel(600);
            rdGrd.EnableAJAX = true;
            rdGrd.EnableAJAXLoadingTemplate = true;
            rdGrd.Skin = "None";
                      
            rdGrd.NeedDataSource += new GridNeedDataSourceEventHandler(rdGrd_NeedDataSource);
            rdGrd.ItemDataBound += new GridItemEventHandler(rdGrd_ItemDataBound);
            rdGrd.PageSize = 25;
            rdGrd.ID = "grd";

  GridBoundColumn boundColumn1 = new GridBoundColumn();
                boundColumn1.DataField = "FirmName";
                boundColumn1.UniqueName = "Firm";
                boundColumn1.HeaderText = "Firm";
                boundColumn1.AllowFiltering = true;                
                boundColumn1.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                boundColumn1.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                boundColumn1.ItemStyle.VerticalAlign = VerticalAlign.Top;

  GridTemplateColumn templateColumnRank = new GridTemplateColumn();
                templateColumnRank.AllowFiltering = false;
                templateColumnRank.HeaderTemplate = new NColHeaderTemplate(120, "Rank", "cont3", "2009, 2008", "LeaderRank, LeaderRankM1", "cont4, cont5");
                templateColumnRank.ItemTemplate = new NColItemTemplate(120, "LeaderRank, LeaderRankM1", "cont1, cont2");

  HOW CAN I ADD A RADCOBOBOX HERE AS A FILTERING ITEM

  rdGrd.MasterTableView.Columns.Add(templateColumnRank);
                rdGrd.MasterTableView.Columns.Add(boundColumn1);
  
     this.Controls.Add(rdGrd);

 

public class NColHeaderTemplate : ITemplate
    {
        protected LiteralControl lControl0;
        private int iColumnWidth;
        private int nColHeader;
        private string sTopLevelColumnName;
        private string sTopLevelColumnNameUniqueID;
        private string[] sNBottomColumnName;
        private string[] sNBottomColSortCommandArgument;
        private string[] sNBottomColumnNameUniqueID;
        private string sCellHorizontalAlign;

        public NColHeaderTemplate(int ColumnWidth, string TopLevelColumnName, string TopLevelColumnNameUniqueID, string NBottomColumnName, string NBottomColSortCommandArgument, string NBottomColumnNameUniqueID)
        {
            iColumnWidth = ColumnWidth;
            sTopLevelColumnName = TopLevelColumnName.Trim();
            sTopLevelColumnNameUniqueID = TopLevelColumnNameUniqueID.Trim();
            sNBottomColumnName = NBottomColumnName.Split(Convert.ToChar(","));
            sNBottomColSortCommandArgument = NBottomColSortCommandArgument.Split(Convert.ToChar(","));
            sNBottomColumnNameUniqueID = NBottomColumnNameUniqueID.Split(Convert.ToChar(","));
            //ColHeaderParam = nColHeaderParam.Split(Convert.ToChar(","));
            nColHeader = sNBottomColumnName.Length;
            sCellHorizontalAlign = "Center";
        }

       
        public void InstantiateIn(System.Web.UI.Control container)
        {
            lControl0 = new LiteralControl();
            lControl0.ID = sTopLevelColumnNameUniqueID;
            lControl0.Text = sTopLevelColumnName;

            Table table = new Table();
            table.Width = Unit.Pixel(iColumnWidth);

            TableRow row1 = new TableRow();
            TableRow row2 = new TableRow();

            TableCell cell11 = new TableCell();
           
            cell11.Controls.Add(lControl0);
            cell11.ColumnSpan = nColHeader;

            row1.Cells.Add(cell11);
            table.Rows.Add(row1);

            for (int i = 0; i < nColHeader; i++)
            {

                LinkButton lbControl = new LinkButton();
                lbControl.ID = sNBottomColumnNameUniqueID[i].ToString().Trim();
                lbControl.Text = sNBottomColumnName[i].ToString().Trim();
                lbControl.CommandName = "Sort";
                lbControl.CommandArgument = sNBottomColSortCommandArgument[i].ToString().Trim();

                TableCell cell = new TableCell();
                cell.HorizontalAlign = HorizontalAlign.Center
               
                cell.Controls.Add(lbControl);
                cell.Width = iColumnWidth / nColHeader;
                row2.Cells.Add(cell);

            }

            table.Rows.Add(row2);
            container.Controls.Add(table);
        }
    }

    public class NColItemTemplate : ITemplate
    {

        //protected LiteralControl lControl;
        protected HyperLink lControl;
        private int iColumnWidth;
        private int nColItem;
        private string[] sNBottomDataColumnName;
        private string[] sNBottomDataControlUniqueID;
        private string sBottomDataColumnName;
        private string sCellHorizontalAlign;
       

        public NColItemTemplate(int ColumnWidth, string NBottomDataColumnName, string NBottomDataControlUniqueID)
        {
            sNBottomDataColumnName = NBottomDataColumnName.Split(Convert.ToChar(","));
            sNBottomDataControlUniqueID = NBottomDataControlUniqueID.Split(Convert.ToChar(","));
            nColItem = sNBottomDataColumnName.Length;
            iColumnWidth = ColumnWidth;
            sCellHorizontalAlign = "Center";
        }
       
        public void InstantiateIn(System.Web.UI.Control container)
        {
            Table table = new Table();
            table.Width = Unit.Pixel(iColumnWidth);

            TableRow row1 = new TableRow();
            for (int i = 0; i < nColItem; i++)
            {
                //lControl = new LiteralControl();
                lControl = new HyperLink();
                lControl.ID = sNBottomDataControlUniqueID[i].Trim();
                lControl.Text = sNBottomDataColumnName[i].ToString().Trim();
                lControl.DataBinding += new EventHandler(lControl_DataBinding);

                TableCell cell = new TableCell();
                cell.HorizontalAlign = HorizontalAlign.Center;
                cell.VerticalAlign = VerticalAlign.Top;
               

                cell.Width = iColumnWidth / nColItem;
                cell.Controls.Add(lControl);
                row1.Cells.Add(cell);
            }
            table.Rows.Add(row1);
            container.Controls.Add(table);
            container.Controls.Add(new LiteralControl("<br />"));
        }
        public void lControl_DataBinding(object sender, EventArgs e)
        {
           // LiteralControl l = (LiteralControl)sender;
            HyperLink l = (HyperLink)sender;
            GridDataItem container = (GridDataItem)l.NamingContainer;
            sBottomDataColumnName = l.Text.Trim();
            l.Text = ((DataRowView)container.DataItem)[sBottomDataColumnName].ToString();
            l.Target = "_blank";
            l.NavigateUrl = "http://www.google.com/search?hl=en&q=" + ((DataRowView)container.DataItem)[sBottomDataColumnName].ToString() + "&btnG=Google+Search";

        }

 

    }

Maria Ilieva
Telerik team
 answered on 20 Dec 2010
1 answer
81 views
Hey, i am using Rad Grid containing a column of type string having its AllowFilter="true".
I am facing a weird situation, when i try to write in the filter a specific value (it is the first value for that column in the grid), copy and pasted from grid values on that column and click contains.
The filter returns "no records to be displayed".
Although, if i tried it with any other value also contained in the grid it works fine.
i don't know why this is happening? 
Pavlina
Telerik team
 answered on 20 Dec 2010
1 answer
118 views
Hi,

I have radgrid. which have 170 record. but i have using paging and 15 record per page. when i give code into itemCommand

Radgrid1.items.Count =15 . how to get total count for this grid.

Thanks,
Dhamu.
Princy
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
64 views
In my table I have columns named Ques, Answer, ID, etc. If I want to display these question answers on my page using RadTreeView, how do I implement this ? Like I want the parent node in the TreeView to be the question and child node should be the answer. Any sample code for that in here ?
Nikolay Tsenkov
Telerik team
 answered on 20 Dec 2010
3 answers
194 views
Hello,

i am using a RadPanelbar in WebApplication to select a control to load, here is my code:

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.FindControl("RadPanelBar1") != null)
        {
          if ((RadPanelBar1.SelectedItem != null))
            {
                choiceActivity(RadPanelBar1.SelectedItem.Value);
            }
            else if (Page.FindControl("RadChart1") == null)
            {
                choiceActivity("cockpit");
            }
        }
    }
 
    public void MessageboxAnzeigen(string Inhalt)
    {
        string Script = "<script type=\"text/javascript\">alert('" + Inhalt + "')</script>";
        RegisterClientScriptBlock("WindowOpener", Script);
    }
 
    public void openActivity(String controlName)
    {
        RadAjaxPanel1.Controls.Clear();
        UserControl userControl = (UserControl)this.LoadControl(controlName);
        userControl.ID = "myUC";
        this.RadAjaxPanel1.Controls.Add(userControl);
    }
    protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e)
    {
        choiceActivity(e.Item.Value);   
    }
 
    protected void choiceActivity(String itemValue)
    {
        if (Page.FindControl("myUC") == null)
        {
            switch (itemValue)
            {
                case "stammdaten":
                    openActivity("Stammdaten.ascx");
                    break;
 
                case "kundenverwaltung":
                    openActivity("StammdatenCockpit.ascx");
                    break;
                     
                case "abrechnung":
                    openActivity("abrechnung.ascx");
                    break;
 
                case "tarife":
                    openActivity("tarife.ascx");
                    break;
 
                case "cockpit":
                    openActivity("cockpit.ascx");
                    break;
            }
        }
    }
    protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
    {
 
    }
}

In VS it works fine, but deployed on the Server (IIS 7 on Win 2008 R2) it only shows the "cockpit" control and i can't unterstand what could be the different between VS und and the Server. The RadPanelbar seems to loose his state by every click (if i open a item its closed after the automatic reload of the page).

Thank you for any help.

UPDATE: I added a RadMenu and have exactly the same problem.

UPDATE 2: I enabled "PersistStateInCookie" and now the Panelbar keeps expandend after the reload but it still doesn't add the control to the RadAjaxPanel.

Best regards
Patrick
Patrick Gruhn
Top achievements
Rank 1
 answered on 20 Dec 2010
0 answers
76 views
Hi,
I am binding treeview with EF. Datavalue field is NAME and DataTextField value is CATID?When i select note and want to get the value of the selected treeview node in combobox it does not shows me the value.but i use combo.text it gives me the NAME of the treeview..How can i get selected treeview value in combobox?I trided combo.selectedvalue but its not working.
Teoman
Top achievements
Rank 1
 asked on 20 Dec 2010
6 answers
132 views
Dear Sirs!
For RadGrid I want to change some item's attrfibutes. For example, border color width and style if some condition is true.
In ItemDataBound item I write:

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem it = e.Item as GridDataItem;

 

 

try

 

{

 

if (it["track_type"].Text.Trim() == "0")

 

{

it.BorderColor = System.Drawing.

Color.Red;

 

}

}

 

catch { }

 

}

this not works but the it.BackColor = System.Drawing.Color.Red work OK.
What I did wrong?
May be I need to override Grid's Style of my skin?

Thank you very much in advance.

Boris


 

Veli
Telerik team
 answered on 20 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?