Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi, how do I remove the border around the root items on the MetroTouch skin? Also, I can't seem to change the forecolor of the menu. The white font is not visible on my custom gradient background.
Shinu
Top achievements
Rank 2
 answered on 04 Feb 2013
10 answers
336 views
Hello,
       I am using radgrid and it is ajaxified by RadAjaxManager.I am using the exporttoexcel command item for exporting selected records from grid.After exporting the selected records I want to delete them from the grid.They are getting deleted from the DB but the grid is not getting refreshed.The grid.Rebind() is not working.Please guide me regarding this.

Thanks & Regards,
Manaswinee
Daniel
Telerik team
 answered on 04 Feb 2013
1 answer
62 views
Dear Reader,

Thanks for the reply. One more question.

I have HTML tags in my cell of RadGrid along with other data in my RadGrid

For eg. My one of the cell in radgrid contains this value "<html><tr><td>1 row</td></tr>\r\n<tr><td>1 row</td></tr> \r\n</html>".

Now when I call RadGrid.ExportToExcel() method. This data is not getting exported to Excel. All the rows above this cell are getting exported but this row and the rows following this row is not getting exported.

Please help !!!
Daniel
Telerik team
 answered on 04 Feb 2013
3 answers
475 views
Hi, I have the following GridTemplateColumn.  I want to set the width of the CompanyName column to 150px.  I have all the settings I thought I needed but it will won't wrap text? 

<telerik:GridTemplateColumn HeaderStyle-Width="150px"  ItemStyle-Width="150px" ItemStyle-Wrap="true" >
                <ItemTemplate>         
                    <table>
                        <tr>
                            <td style="border:none !important;"><asp:CheckBox ID="CheckBox1" runat="server"  /></td>
                            <td style="border:none !important;"><%# Eval("CompanyName") %></td>
                        </tr>
                    </table>     
                </ItemTemplate>
</telerik:GridTemplateColumn>

Thanks, Dave
Maria Ilieva
Telerik team
 answered on 04 Feb 2013
8 answers
662 views
Hi I am trying to hid / show the footer when a user expands or collapses and item in the grid view, how can I achieve this 

ok so I now have this code


if (gvTakeoff.Items.Expanded == false)
           {
                
               gvTakeoff.MasterTableView.ShowFooter = false;
 
           }
           else
           {
               gvTakeoff.MasterTableView.ShowFooter = true;
           }

if (gvTakeoff.Items[0].Expanded == false)
           {
 
               gvTakeoff.MasterTableView.ShowFooter = false;
 
           }
           else
           {
               gvTakeoff.MasterTableView.ShowFooter = true;
           }
this is only checking the first item in the grid I would like it to test if any items are expanded

I would like it to check if any items are expanded if they are hide the footer, if the item is collapsed then show the footer

thanks

M
Maria Ilieva
Telerik team
 answered on 04 Feb 2013
1 answer
96 views
For my application, I would like to define the structure in an XML file.  I would like the grid to be hierarchical (easily defined in the XML structure) - however, I would like to have a complex layout.

I would like to achieve a NestedViewTemplate (for having a custom panel with HTML layout, or another feature such as the Telerik tab controls within my grid layout)

Is it possible to define something like this and load via XML?  I have the above working without the XML, but I cannot find how to achieve a NestedViewTemplate that is defined in XML.
Radoslav
Telerik team
 answered on 04 Feb 2013
1 answer
109 views
I have a combobox with 5,000+ results - the behavior should be if the user clicks the drop down the first 10 (pre-loaded) should be displayed if the user types it should perform a search/autocomplete and scrolling should be virtual - I don't want to load all 5,000+ results at one time.

Using Q2 2011. I checked out the demos and wasn't sure if this is something the combobox does out of the box or will it require custom code.
Princy
Top achievements
Rank 2
 answered on 04 Feb 2013
0 answers
96 views
Hi All,

I have a radlist box with check boxes options which displays data from Database and when some one selects the data that data is getting stored in the database. (This part is done)

When the User clicks the Back Button I need to show the radlist box with the Data that the user previously selected (How can I do that??)
I need to check the check boxes with the values from the database.
Sima
Top achievements
Rank 1
 asked on 03 Feb 2013
1 answer
72 views
I am not sure why its complicated or maybe im misunderstanding.

I have a custom datasource.
I programmatically add columns and then on ItemDataBound, I get the currentItem and bind the values from the custom object (currentItem) to the columns in the current row being bound. Great.

But now, I want to retrieve the values (potentially modified values) on an "Update" Command.
So I have an OnItemCommand and it does fire.
However, when trying to retrieve the value, I only get an empty HTML space even though the value is there.

Any ideas where I am going wrong?

protected void radGridMenus_OnItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem currentRow = e.Item as GridDataItem;
            if (currentRow != null)
            {
                switch (e.CommandName.ToLower().Trim())
                {
                    case "update":
                            // currentRow["MenuID"].Value - here it is   Not sure why?
                        break;
                    default:
                        break;
                }
            }
        }


Full code:

        protected void Page_Init(object sender, EventArgs e)
        {
            this.DoSetDefaultMenuColumns();
        }
 
        private void DoSetDefaultMenuColumns()
        {
            // lets create the columns.
            GridBoundColumn menuIDColumn = new GridBoundColumn();
            menuIDColumn.HeaderText = "Menu ID";
            menuIDColumn.DataField = "MenuID";
 
            GridBoundColumn menuNameColumn = new GridBoundColumn();
            menuNameColumn.HeaderText = "Menu Name";
            menuNameColumn.DataField = "MenuName";
 
            GridDropDownColumn menuOrderColumn = new GridDropDownColumn();
            menuOrderColumn.HeaderText = "Menu Order ID";
            menuOrderColumn.DataField = "MenuOrderID";
 
            GridDropDownColumn parentIDColumn = new GridDropDownColumn();
            parentIDColumn.HeaderText = "Parent ID";
            parentIDColumn.DataField = "ParentID";
 
            GridCheckBoxColumn isAdminColumn = new GridCheckBoxColumn();
            isAdminColumn.HeaderText = "Is Admin";
            isAdminColumn.DataField = "IsAdmin";
 
            GridBoundColumn pageURLColumn = new GridBoundColumn();
            pageURLColumn.HeaderText = "Page URL";
            pageURLColumn.DataField = "PageURL";
 
            GridCheckBoxColumn employeeAccessColumn = new GridCheckBoxColumn();
            employeeAccessColumn.HeaderText = "Employee Access";
            employeeAccessColumn.DataField = "EmployeeAccess";
 
            GridCheckBoxColumn customerAccessColumn = new GridCheckBoxColumn();
            customerAccessColumn.HeaderText = "Customer Access";
            customerAccessColumn.DataField = "CustomerAccess";
 
            GridButtonColumn updateColumn = new GridButtonColumn();
            updateColumn.ButtonType = GridButtonColumnType.LinkButton;
            updateColumn.HeaderText = "Update";
            updateColumn.Text = "Update Menu Item";
            updateColumn.UniqueName = "UpdateMenuItem";
            updateColumn.CommandName = "Update";
            updateColumn.ItemStyle.ForeColor = Color.Blue;
             
            this.radGridMenus.MasterTableView.Columns.Add(menuIDColumn);
            this.radGridMenus.MasterTableView.Columns.Add(menuNameColumn);
            this.radGridMenus.MasterTableView.Columns.Add(menuOrderColumn);
            this.radGridMenus.MasterTableView.Columns.Add(parentIDColumn);
            this.radGridMenus.MasterTableView.Columns.Add(pageURLColumn);
            this.radGridMenus.MasterTableView.Columns.Add(isAdminColumn);
            this.radGridMenus.MasterTableView.Columns.Add(employeeAccessColumn);
            this.radGridMenus.MasterTableView.Columns.Add(customerAccessColumn);
            this.radGridMenus.MasterTableView.Columns.Add(updateColumn);
        }
 
protected void radGridMenus_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                this.radGridMenus.DataSource = this.CurrentMenuItemsView; // List<T>
            }
        }
 
 protected void radGridMenus_OnItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem currentRow = e.Item as GridDataItem;
            if (currentRow != null)
            {
                switch (e.CommandName.ToLower().Trim())
                {
                    case "update":
 
                        break;
                    default:
                        break;
                }
            }
        }
 
        protected void radGridMenus_OnItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem currentItem = e.Item as GridDataItem;
                var currentMenu = currentItem.DataItem as MProSoftwareMenus;
                if (currentMenu != null)
                {
                    if (currentMenu.ParentID.HasValue)
                    {
                        currentItem["ParentID"].Text = currentMenu.ParentID.Value.ToString();
                    }
 
                    if (currentMenu.MenuOrderID.HasValue)
                    {
                        currentItem["MenuOrderID"].Text = currentMenu.MenuOrderID.Value.ToString();
                    }
                        
                    ((CheckBox)currentItem["IsAdmin"].Controls[0]).Checked = currentMenu.IsAdmin.GetValueOrDefault(false);
 
                    ((LinkButton)currentItem["UpdateMenuItem"].Controls[0]).CommandArgument = currentMenu.MenuID.ToString();
 
                }
            }
        }














Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Feb 2013
1 answer
105 views
Hello,
I wanna remove expand/collapse property when no child items in hierarchical grid.I wanna remove particular cell expand/collapse only
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Feb 2013
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?