Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
437 views
Hi,

I have a grid with auto generated columns like this .
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" ShowFooter="True"
               DataSourceID="SqlDataSource1" GridLines="None">
               <headercontextmenu>
               </headercontextmenu>
               <clientsettings>
                   <Scrolling AllowScroll="True" UseStaticHeaders="True" />
               </clientsettings>
               <mastertableview datasourceid="SqlDataSource1">
                   <CommandItemSettings ExportToPdfText="Export to PDF" />
                   <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                       <HeaderStyle Width="20px" />
                   </RowIndicatorColumn>
                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                       <HeaderStyle Width="20px" />
                   </ExpandCollapseColumn>
                   <EditFormSettings>
                       <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                       </EditColumn>
                   </EditFormSettings>
               </mastertableview>
               <filtermenu enableimagesprites="False">
               </filtermenu>
           </telerik:RadGrid>

I have total 20 columns in display. I would like to change 18  boundcolumns to hyperlink columns ..


I know how to change one boundcolumn  to hyperlink column like this ..

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
        Try
             If TypeOf e.Item Is GridDataItem Then
                Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
                Dim hl As New HyperLink()
                hl.NavigateUrl = "Default.aspx?id=1"
                hl.Text = item("TaskReasonCategory").Text
                item("TaskReasonCategory").Controls.Add(hl)
            End If
 
        Catch ex As Exception
            Throw ex
        End Try
    End Sub


From above code is only for one column "TaskReasonCategory",i,.e hard coded.. But how to change 18 columns without mentioning item("ColumnName").

Please help me on this ...

Thank you in advance..
Madhu Palakurthi
Top achievements
Rank 1
 answered on 04 Feb 2013
2 answers
125 views

how to find treelist nestedlevel count in
See the image that example have four level that i want to find in itemdatabound

protected void RadTreeListWork_ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
        {
            if (e.Item is TreeListDataItem)
            {
                TreeListDataItem item = (TreeListDataItem)e.Item;


Thanks Advance,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 04 Feb 2013
1 answer
96 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
327 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
55 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
465 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
643 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
93 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
106 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
93 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?