Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
376 views

I am having an issue trying to make a RadGrid responsive using CSS.  When the browser width is wide, the 6 columns are all visible.  When the user shrinks the browser width, at a certain point two of the columns disappear as they should -- but at the same time a new column shows up that doesn't even have a header visible.  It's very strange.  Any help would be most appreciated. The basic grid is defined in the .aspx as:

<telerik:RadGrid ID="RadGrid1" runat="server" Width="99.7%" AutoGenerateColumns="false" AllowPaging="false" OnItemDataBound="RadGrid1_ItemDataBound"></telerik:RadGrid>

The columns to the grid are defined in the code behind as:

 

GridHyperLinkColumn hypercolumn = null;
GridBoundColumn boundcolumn = null;
RadGrid1.EnableViewState = false;
InitGrid(ref RadGrid1);
RadGrid1.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
RadGrid1.MasterTableView.DataKeyNames = new string[] { "FAQ" };
 
string templateColumnName = "Edit";
GridTemplateColumn templateColumn = new GridTemplateColumn();
templateColumn.ItemTemplate = new MyTemplate(templateColumnName);
templateColumn.AllowFiltering = false;
templateColumn.HeaderText = "Edit";
RadGrid1.MasterTableView.Columns.Add(templateColumn);
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQPublic";
boundcolumn.DataField = "FAQPublic";
boundcolumn.HeaderText = "Public?";
boundcolumn.HeaderStyle.CssClass = "mediumgridcol";
boundcolumn.ItemStyle.CssClass = "mediumgridcol";
boundcolumn.AllowFiltering = false;
boundcolumn.Visible = true;
boundcolumn = null;
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQIntranet";
boundcolumn.DataField = "FAQIntranet";
boundcolumn.HeaderText = "Intranet?";
boundcolumn.HeaderStyle.CssClass = "mediumgridcol";
boundcolumn.ItemStyle.CssClass = "mediumgridcol";
boundcolumn.AllowFiltering = false;
boundcolumn.Visible = true;
boundcolumn = null;
 
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQTopic";
boundcolumn.DataField = "FAQTopic";
boundcolumn.FilterControlWidth = Unit.Pixel(50);
boundcolumn.HeaderText = "Topic";
boundcolumn.Visible = true;
boundcolumn = null;
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQQuestion";
boundcolumn.DataField = "FAQQuestion";
boundcolumn.HeaderText = "Question";
boundcolumn.FilterControlWidth = Unit.Pixel(50);
boundcolumn.Visible = true;
boundcolumn = null;
 
templateColumnName = "Delete";
templateColumn = new GridTemplateColumn();
templateColumn.ItemTemplate = new MyTemplate2(templateColumnName);
templateColumn.AllowFiltering = false;
templateColumn.HeaderText = "Delete";
RadGrid1.MasterTableView.Columns.Add(templateColumn);

 

I have attached two (2) screen captures -- the first when it is wide, the second after the user shrinks the window.  Any assistance would be most appreciated.  I am running on Windows 10, this project is in Visual Studio 2013.

Thanks in advance.

 

Kostadin
Telerik team
 answered on 25 Nov 2015
3 answers
137 views
As the calendar to mark the necessary number as selected?
 
 
Viktor Tachev
Telerik team
 answered on 25 Nov 2015
1 answer
570 views

Hi Team,

I am having the radListView. I want to export the data to excel from the Listview.

 Please help how to do this.

 

I am having the List View in the grid format. Now I want export like how we are doing this from the RadGrid.

rgTaskHistory.ExportSettings.IgnorePaging = true;
rgTaskHistory.ExportSettings.ExportOnlyData = true;
rgTaskHistory.MasterTableView.ExportToExcel();

 http://demos.telerik.com/aspnet-ajax/listview/examples/appearancestyling/predefinedlayouts/defaultcs.aspx

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
1 answer
345 views

When the user empties a value a numeric text box, the grid doesn't save changes and the changed field stays with a red dot in the corner.

In this scenario I would like the row to be saved with a null value for the numeric field. Is that possible?

 

<telerik:RadGrid
            ID="RadGrid1"
            runat="server"
            AutoGenerateColumns="False"
            CssClass="grid"
            GroupPanelPosition="Top" Skin="Silk"
            AllowFilteringByColumn="True" AlternatingItemStyle-Wrap="False" AlternatingItemStyle-BackColor="#B8B1B4" ItemStyle-Wrap="false"
            AllowSorting="True" Height="650px" Width="100%" AllowPaging="True" PageSize="2000" AutoGenerateDeleteColumn="True" DataSourceID="LinqYonisLogs" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" OnBatchEditCommand="RadGrid1_BatchEditCommand">

<AlternatingItemStyle Wrap="False" BackColor="#B8B1B4"></AlternatingItemStyle>

        <MasterTableView DataSourceID="LinqYonisLogs" CommandItemDisplay="TopAndBottom" DataKeyNames="CustomerCode, MQS_Code" EditMode="Batch">
            <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
            <Columns>
                <telerik:GridBoundColumn DataField="CustomerCode" ReadOnly="true" FilterControlAltText="Filter CustomerCode column" HeaderText="Customer Code" SortExpression="CustomerCode" UniqueName="CustomerCode">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MQS_Code" ReadOnly="true" FilterControlWidth="55px" FilterControlAltText="Filter MQS_Code column" HeaderText="MQS Code" SortExpression="MQS_Code" UniqueName="MQS_Code">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="QuotedPrice" DataType="System.Decimal" FilterControlAltText="Filter QuotedPrice column" HeaderText="Quoted Price" SortExpression="QuotedPrice" UniqueName="QuotedPrice">
                    <EditItemTemplate>
                        <telerik:RadNumericTextBox ID="rdteQuotedPrice" runat="server" DbValue='<%# Eval("QuotedPrice") %>'>
                            <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="false" />
                        </telerik:RadNumericTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="QuotedPriceLabel" runat="server" Text='<%# Eval("QuotedPrice") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Action" FilterControlAltText="Filter Action column" HeaderText="Action" SortExpression="Action" UniqueName="Action">
                </telerik:GridBoundColumn>

            </Columns>

<PagerStyle AlwaysVisible="True"></PagerStyle>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="True" AllowKeyboardNavigation="True">
            <KeyboardNavigationSettings AllowActiveRowCycle="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false" />
            <Resizing AllowColumnResize="True" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>

<ItemStyle Wrap="False"></ItemStyle>

        <PagerStyle AlwaysVisible="True" />
        </telerik:RadGrid>

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
19 answers
1.1K+ views
Hello Everyone,

     I'm using radgrid with the detail table.
    I need to change the expand-collapse button of the radgrid to

SingleMinus.gifSingleMinus.gif,

SinglePlus.gifSinglePlus.gif    so that the users can easily identify that the detail table is there.

Please give a solution, i'm providing the users to change the theme too. So the change should be applicable when applying different themes.

Thanks In Advance
 Unni
 
Eyup
Telerik team
 answered on 25 Nov 2015
2 answers
147 views

Hi,

My grid is databound using NeedDataSource and I localize my column names in the Pre-Render event. When I enable ShowGroupPanel to allow users to drag columns for grouping, the name that appears in the group box and in the grouping row titles is not the localized name. I have searched the column properties but I can't see anything obvious for this - what do I need to set in order to get the names displaying correctly?

Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 25 Nov 2015
6 answers
926 views

  We have discovered an issue when expanding RadGrid DetailTable in case the Browser Link of VS 2013 is enabled. The issue is actually a generic internal problem in the VS feature and affects the RadGrid control with the following error:

“JavaScript runtime error: Syntax error, unrecognized expression: unsupported pseudo: 0_0”

  The issue is known bug in jQuery which is internally used in the Browser Link functionality. When selecting elements which contains ":" in its id, jQuery does not return element. The reason for the problem is that jQuery has some predefined pseudo-selectors and “:00” for example is not a valid selector.

  The Browser Link script tries to find our detail tables elements by its id (the detail table id contains ":"), jQuery does not return element and the Browser Link scripts throws an error that the character sequence is not recognized.

  As this issue is still not fixed in the latest version of jQuery the only workaround for now is to disable the Browser Link feature in VS 2013.

Maria Ilieva
Telerik team
 answered on 25 Nov 2015
1 answer
98 views

Hi,

     Now I am looking into this demo

     http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/commanditem/defaultcs.aspx

     First, I edit the second row in the gird, then delete the first row. I found after the first row was deleted. The original second row(now it is the first row after deleting) lost "in edit" state. And the original third row(now it changed to the second row) got the "in edit" state.

     Is it a software defect? And is there any solution now?\

Thanks.

Zhang Rui

Eyup
Telerik team
 answered on 25 Nov 2015
1 answer
125 views

Hello everybody

 

I'm working currently on a application that uses telerik for all controls except some special type called "bowserfield", is like an inputbox with autocomplete. I need to use this control mandatory.

 

 My problem starts when I try to use this control inside a itemtemplate and want to get the row in this customcontrol onclick event. I have the row number in RANK1 control, could I use this inputbox to get the row number? I could use ONCLICK in server side, but I dont know how to get the radgrid sender reference. ALso notice that I dont have the row selected when the event is launched from this control.

 

 

My case:

 

 <telerik:GridTemplateColumn HeaderText="BB" HeaderStyle-Width="15%" UniqueName="cv" > 
                                  <ItemTemplate> 
                                  <asp:hiddenfield  runat="server" id="KEY1" Value='<%# Bind("ID") %>'  ></asp:hiddenfield> 
                                  <asp:hiddenfield  runat="server" id="RANK1" Value='<%# Bind("rank") %>'  ></asp:hiddenfield> 
                                  <et:bowsefield runat="server" id="DocID" bowsername="document" OnChange="Save($(this),'1')"/>
               </ItemTemplate> 
</telerik:GridTemplateColumn> 

 

 

 

 <script type="text/javascript">

 function Save(sender, args)
    {
        if (sender != null) {
            var grid = $find('<%= RadGrid1.ClientID %>'); 
            var MasterTable = grid.get_masterTableView();
            var tableEl = MasterTable.get_element();

            var DocX
            var idX

            if (args == '1')
            {
               
                var textBox = sender[0].$telerik.findElement(tableEl, "DocID"); ----> GIVES ME ALWAYS ROW 1 :(
            }
            ...
        }
    }

</script>

 

I think that a solution could be use this control only in edit mode, but is possible to do without it? Thanks a lot.-

 

 

 

 

 

Eyup
Telerik team
 answered on 25 Nov 2015
3 answers
175 views

Using the MetroTouch skin in version 2015.3.1111.45 - In lightweight RenderMode - if you click directly on the text of a button it does not fire the click even - you must click somewhere else on the button.  

 

If you set RenderMode="Classic" the issue is resolved.

Danail Vasilev
Telerik team
 answered on 24 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?