Telerik Forums
UI for ASP.NET AJAX Forum
20 answers
1.1K+ views
I implemented MultiColumn Headers on my radGrid, very cool!

Exporting to Excel however is not doing so great. It only takes the lowest level headers, but with column span of the top level, causing all sorts of wierdness....

Any suggestions on how to export the grid as is, meaning all levels of the headers and data?
Attila Antal
Telerik team
 answered on 05 Mar 2019
7 answers
738 views

I have two RadListBoxes I am able to drag and drop items between the two without problems, but I have one specific RadlistItem that when I add it to the other listbox I want to remove the existing list items in the code behind, but so far it keeps giving and error like Outside Index or something similar when I try to remove those list Items.  Any help or Ideas would be appreciated.

 

Thanks,

Peter Milchev
Telerik team
 answered on 05 Mar 2019
4 answers
416 views

hi,

just like james in this thread, I need to mark certain rows according to a condition.
every time the user opens and watch an idea, the row of the watched idea should be in lightblue.
that for itself works great.
My problem is, that when I click a row it gets lightblue, but then- when I  click another row, the previous row change color to white.
How can I keep the condition working for alternating item style too?

that my code :

<telerik:RadGrid Skin="innovation" EnableEmbeddedSkins="false" ID="RadGrid1" 
              dir="rtl" HeaderStyle-ForeColor="White" AllowFilteringByColumn="True"  
    AllowSorting="True" AllowPaging="True"  BorderColor="#74ABAE" BackColor="White"
    BorderWidth="2px" runat="server" HeaderStyle-Font-Size="Small"  ItemStyle-Font-Size="Small"
    AlternatingItemStyle-Font-Size="Small" ItemStyle-BackColor="White" ItemStyle-ForeColor="Black"
     PageSize="7" AutoGenerateColumns="False" PagerStyle-Font-Size="Small" 
     AlternatingItemStyle-ForeColor="Black"
   Culture="Hebrew" GridLines="Vertical" Width="666px" 
      style="margin-right: 30px">
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Black">
    </HeaderContextMenu>
        <ItemStyle BackColor="White" Font-Size="Small" ForeColor="Black" />
    <PagerStyle mode="NumericPages" ShowPagerText="false"></PagerStyle>
    <MasterTableView>
    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
           <Columns>
                 <telerik:GridBoundColumn CurrentFilterFunction="Contains"
                     DataField="IDEA_CODE" UniqueName="IDEA_CODE" HeaderText="ideanum"
                      AutoPostBackOnFilter="true" DataType="System.Int32"
                    </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="LINK" DataField="LINK" HeaderText="" 
                    DataType="System.String" Display="false"
                    </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="ROWNUM" HeaderText="#" Visible="false"
                 AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.Int32">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SENDER_ID" HeaderText="id"
                UniqueName="SENDER_ID" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.String">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FULLNAME" HeaderText="namef"
                AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.String">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SUBJECT" HeaderText="sub"
                AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.String">
                </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="DESCRIPTION" HeaderText="status"
                 AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.String">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SEND_DATE" HeaderText="sdate"
                AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    DataType="System.DateTime" DataFormatString="{0:dd/MM/yy}">
                </telerik:GridBoundColumn>                 
                  <telerik:GridImageColumn HeaderText="comments" UniqueName="FBIMG">
                </telerik:GridImageColumn>    
         
     </Columns>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
        <HeaderStyle Width="20px">
        </HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
        <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <EditFormSettings>
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
        </MasterTableView>
              <SelectedItemStyle BackColor="LightBlue" />
        <HeaderStyle ForeColor="White"></HeaderStyle>
               <ClientSettings>
               <Selecting AllowRowSelect="true" />
               <ClientEvents OnRowSelected="OpenIdea" />                   
                </ClientSettings>
        <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
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 = CType(e.Item, GridDataItem)
                Dim idea_code As Integer = CInt(item("IDEA_CODE").Text)
                If (StoredProcedures.Is_Watched_Idea(idea_code, userID) = True) Then 'if the ideas was watched then
                    item.BackColor = Drawing.Color.LightBlue 'color the row
                     End If
….
End sub

by the way- I tried disable alternating row in client settings but all I got is a transparent back color for the alternative rows.

can anyone help with that?
kind regards, Dana
yasmin Ahmad
Top achievements
Rank 2
 answered on 05 Mar 2019
3 answers
390 views

How can I disable RadDropDownTree node based on nodeid?

I want to disable the first and second node in the tree based on the database nodeid 1 and 2

Peter Milchev
Telerik team
 answered on 04 Mar 2019
4 answers
631 views
I have a RadGrid that contains a GridTableView in the DetailTables, as such:

<telerik:RadGrid ID="RelatedProductsGrid" runat="server" Width="95%" ShowStatusBar="true"
            AutoGenerateColumns="False" PageSize="20" AllowSorting="False" AllowMultiRowSelection="False"
            AllowPaging="True">
            <pagerstyle mode="NextPrevAndNumeric"></pagerstyle>
            <mastertableview width="100%" datakeynames="PartId" allowmulticolumnsorting="False">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="PartId" Name="RelatedProducts" Width="100%">
                <Columns>

...

<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                        <ItemTemplate>
                            <telerik:RadButton ID="RemoveRelatedProductButton" runat="server" CommandName="Delete">
                            </telerik:RadButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>

So, the above button, "RemoveRelatedProductButton" shows up allright, but whenever I press it - nothing happens.

I have this in the code behind:

_relatedProductsGrid = FindControl("RelatedProductsGrid") as RadGrid;
_relatedProductsGrid.ItemCommand += RelatedProductsGrid_ItemCommand;

And finally:

protected void RelatedProductsGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "Delete")

etc.

However, this method never fires. What do I need to do?
Tonya
Top achievements
Rank 1
 answered on 04 Mar 2019
4 answers
1.4K+ views
How implement "OnClientClicked" to GridButtonColumn?
Travis Richardson
Top achievements
Rank 1
 answered on 04 Mar 2019
1 answer
651 views

When I upgrade an existing project to a newer version the Upgrade Wizard Log shows success but I get this error:

https://drive.google.com/open?id=1l1KqfmqRnsCgWJ5O5LeBDCH_fpjDoiRr

Also if I bring up the Launch Toolbox Configurator and then click "Finish" button, I get the same error.

I do NOT run VS 2015 "As Admin" for many reason I don't want to get into, so please don't suggest that ;)  

Cheers, Rob.

Rumen
Telerik team
 answered on 04 Mar 2019
5 answers
284 views
Hi All

I have an ASP.NET datalist which is displaying data in the form of a repeated list.

I have set the RepeatColumns to 6, so that I have the data displayed repeatedly in 6 columns.

Is there a telerik control that can do this, ie repeat the data in columns?

I tried using a RadGrid but cannot get the data to display in 6 columns.

Any help is very much appreciated.

Thanks

Johann  
Rumen
Telerik team
 answered on 04 Mar 2019
5 answers
363 views
There are only two settings I can set from the aspx file for the AddNewRecord Button of a radgrid (when it's visible).

CommandItemSettings-AddNewRecordText
CommandItemSettings-AddNewRecordImageUrl

...but this is not enough.


Is there a way to control the appearance of the add button with css?



I can do this for the edit button (for example) of each row by:

      Dim ImgBtn As ImageButton = DirectCast(e.Item.FindControl("EditCommandColumn"), ImageButton)
      ImgBtn.CssClass = "editbutton"

...in the itemCreated event.

Thanks
Marin Bratanov
Telerik team
 answered on 04 Mar 2019
12 answers
530 views
Hi,

I can successfully delete rows from my TreeList but I need to show the user a popup confirmation box first. I have searched extensively for a solution and cannot find anything.

My code for removing a row is listed below:

protected void OnSettingsTreeListDeleteCommand(object sender, TreeListCommandEventArgs e)
{
    TreeListDataItem treeListDataItem = e.Item as TreeListDataItem;
    TableRow tableRow = e.Item as TableRow;
    if (treeListDataItem != null && tableRow != null)
    {
        string name = tableRow.Cells[3].Text;
        string id = treeListDataItem.GetDataKeyValue("Id").ToString();
        SettingsTreeListDataTable.Rows.RemoveAt(Convert.ToInt32(id));
        PropertyType.GetPropertyType(typeof(Brand)).RemoveSetting(name);
    }
}

I guess I need some kind of java script popup.

Thanks

SurfRat.

Marin Bratanov
Telerik team
 answered on 04 Mar 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?