Hi!
I've got a strange issue. I have a grid without any HeaderStyle-Width.
If I set AllowColumnResize = false, every column of the grid is set to best size (button columns are narrow, columns with lots of text are wide). But obviously, I can't resize the columns.
If I set AllowColumnResize = true, every column get the same width. Button columns get far too wide, columns with a lot of text too narrow.
I'm using v 2016.3.914.45, I don't think it was a problem with the previous version.
<telerik:RadGrid ID="RadGridVare" runat="server" DataSourceID="DsVare" AllowSorting="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" GroupPanelPosition="Top" CellSpacing="-1" GridLines="Both"> <MasterTableView DataSourceID="DsVare" DataKeyNames="Vareid" AutoGenerateColumns="False" CommandItemDisplay="Top" NoMasterRecordsText="Ingen rader å vise"> <CommandItemSettings AddNewRecordText="Legg til ny vare" ShowRefreshButton="False" CancelChangesText="Avbryt endringer" RefreshText="Oppdater" SaveChangesText="Lagre endringer"></CommandItemSettings> <Columns> <telerik:GridEditCommandColumn EditText="Rediger" UpdateText="Oppdater" CancelText="Avbryt" ButtonType="FontIconButton"></telerik:GridEditCommandColumn> <telerik:GridTemplateColumn UniqueName="thumb" AllowFiltering="false" AllowSorting="false" ReadOnly="true" InsertVisiblityMode="AlwaysHidden"> <ItemTemplate> <telerik:RadBinaryImage ID="imgThumb" runat="server" CssClass="HandPointer" ImageUrl='<%# "~/ImageHandler.ashx?Thumb=true&Bildeid=0&Vareid=" + Eval("Vareid")%>' Width="110" /> <telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="imgThumb" ShowEvent="OnClick" Animation="Resize" Position="Center" RelativeTo="Element" ShowCallout="false" HideEvent="ManualClose"> <telerik:RadBinaryImage runat="server" ID="imgMedium" ImageUrl='<%# "~/ImageHandler.ashx?Thumb=false&Bildeid=0&Vareid=" + Eval("Vareid")%>' AutoAdjustImageControlSize="false" /> </telerik:RadToolTip> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="Vareid" FilterControlAltText="Filter Vareid column" HeaderText="Vareid" UniqueName="Vareid" DataType="System.Int32" SortExpression="Vareid" ReadOnly="true"></telerik:GridBoundColumn> <telerik:GridDropDownColumn DataField="Kategoriid" FilterControlAltText="Filter Kategoriid column" HeaderText="Kategori" SortExpression="Kategoriid" UniqueName="Kategoriid" DataSourceID="DsKategori" ListTextField="Navn" ListValueField="Kategoriid"></telerik:GridDropDownColumn> <telerik:GridDropDownColumn DataField="Lagerid" FilterControlAltText="Filter Lagerid column" HeaderText="Lager" SortExpression="Lagerid" UniqueName="Lagerid" DataSourceID="DsLager" ListTextField="Navn" ListValueField="Lagerid"></telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="Lokasjon" FilterControlAltText="Filter Lokasjon column" HeaderText="Lokasjon" SortExpression="Lokasjon" UniqueName="Lokasjon" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Navn" FilterControlAltText="Filter Navn column" HeaderText="Navn" SortExpression="Navn" UniqueName="Navn" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Elnummer" FilterControlAltText="Filter Elnummer column" HeaderText="Elnummer" SortExpression="Elnummer" UniqueName="Elnummer" MaxLength="20"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Merkeytelse" FilterControlAltText="Filter Merkeytelse column" HeaderText="Merkeytelse" SortExpression="Merkeytelse" UniqueName="Merkeytelse" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MerkespHS" FilterControlAltText="Filter MerkespHS column" HeaderText="MerkespHS" SortExpression="MerkespHS" UniqueName="MerkespHS" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MerkespLS" FilterControlAltText="Filter MerkespLS column" HeaderText="MerkespLS" SortExpression="MerkespLS" UniqueName="MerkespLS" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Typebetegnelse" FilterControlAltText="Filter Typebetegnelse column" HeaderText="Typebetegnelse" SortExpression="Typebetegnelse" UniqueName="Typebetegnelse" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Merkestrøm" FilterControlAltText="Filter Merkestrøm column" HeaderText="Merkestrøm" SortExpression="Merkestrøm" UniqueName="Merkestrøm" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Fabrikat" FilterControlAltText="Filter Fabrikat column" HeaderText="Fabrikat" SortExpression="Fabrikat" UniqueName="Fabrikat" MaxLength="50"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Merknad" FilterControlAltText="Filter Merknad column" HeaderText="Merknad" SortExpression="Merknad" UniqueName="Merknad" MaxLength="200"></telerik:GridBoundColumn> <telerik:GridDropDownColumn DataField="Levert" FilterControlAltText="Filter Levert column" HeaderText="Levert" SortExpression="Levert" UniqueName="Levert" DataSourceID="DsLevertStatus" ListTextField="Navn" ListValueField="LevertStatusid"></telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="LevertTekst" FilterControlAltText="Filter LevertTekst column" HeaderText="LevertTekst" SortExpression="LevertTekst" UniqueName="LevertTekst" MaxLength="100"></telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="FontIconButton" CommandName="Delete"></telerik:GridButtonColumn> </Columns> </MasterTableView> <ClientSettings> <Selecting AllowRowSelect="true" /> <Resizing AllowColumnResize="true" /> </ClientSettings> <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings></telerik:RadGrid>
Hi,
I got an issue with ImageGalleryTemplateItem that can not be found - my version is 2014.2.618.40.
Regards,
Duy
Hi Telerik Team,
I am using RadPageLayout to make pages responsive.Every page works fine except one case i.e When a Page is Opened in RadWindow. Actually it is detecting wrong Resolution/View port. I have read about Viewport breakpoints on http://docs.telerik.com/devtools/aspnet-ajax/controls/pagelayout/creating-responsive-design/viewport-breakpoints and it Says:
Device type Resolution
xs max-width: 360px
sm min-width: 361px / max-width: 768px
md min-width: 769px / max-width: 1024px
lg min-width: 1025px / max-width: 1280px lg
xl min-width: 1281px extra large resolutions
but It seems that RadWindow does not follow these above breakpoints. I have noticed the breakpoints (in case of RadWindow) as below:
Device type Resolution
xs max-width: 376px
sm min-width: 377px / max-width: 784px
md min-width: 785px / max-width: 1040px
lg min-width: 1041px / max-width: 1296px
xl min-width: 1297px
Is there a way to fix this issue ?
Thank you
Sunil
My requirement is on pageload since I've nothing to bind to radgrid I need to just show the grid headers with "Add new row" button".
1. When the user click the "Add new row' button a new row is created with 2 textboxes and 2 dropdown(binds data from the database) to the radgrid row.
2. Each row should have remove row button
3. at the radgrid footer I've the Button "save to db"
4. after adding the data to the new row(not saved yet to the db) i need to add more rows. When I click on "Add new row' button I lose all the data entered. Technically saying on postback losing all data. this part is where I need help on how to handle this.
Finally after adding all rows I save the data to database.
*************Thoughout this functionality I have no data to rebind the radgrid from the database**************************
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" MasterTableView-CommandItemSettings-ShowAddNewRecordButton="false" MasterTableView-CommandItemSettings-ShowRefreshButton="false" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand"> <MasterTableView Width="100%" HeaderStyle-Font-Bold="true" CommandItemStyle-Font-Bold="true" DataKeyNames="IsAdd,CourseID" CommandItemDisplay="Top" CommandItemStyle-HorizontalAlign="Right"> <CommandItemTemplate> <asp:Button ID="IsAdd" Font-Size="Small" Font-Bold="true" CommandName="InitInsert" Text ="Add Course" runat="server" /> </CommandItemTemplate> <Columns> <telerik:GridTemplateColumn UniqueName="CourseID" HeaderText="Course #" DataField="CourseID"> <ItemTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="CourseDept" HeaderText="Course dept" DataField="DeptID"> <ItemTemplate> <asp:DropDownList ID="DeptDropDown" DataField="DeptID" DataTextField="DeptName" runat="server" AutoPostBack="false"></asp:DropDownList> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="LocationName" HeaderText="Course Location" DataField="LocationID"> <ItemTemplate> <asp:DropDownList ID="locationDropDown" DataTextField="locationName" runat="server" AutoPostBack="false"></asp:DropDownList> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Remarks"> <ItemTemplate> <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Remove Row" CommandName="Delete" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:Button ID="savebtn" runat="server" Font-Bold="true" Text="Save the course"/>aspx.csprotected void Page_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); if (!IsPostBack) { dt.Columns.Add("CourseID"); dt.Columns.Add("Name"); dt.Columns.Add("IsAdd"); Session["dt"] = dt; } } protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { RadGrid1.DataSource = (DataTable)Session["dt"]; } protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { Button btn = new Button(); if (e.Item is GridDataItem) { GridDataItem item = e.Item as GridDataItem; TextBox TextBox1 = item.FindControl("TextBox1") as TextBox; Button Button1 = item.FindControl("Button1") as Button; (I've deptdropdown and locationdropdown binded here) TextBox TextBox4 = item.FindControl("TextBox4") as TextBox; bool isAdd = Convert.ToBoolean(item.GetDataKeyValue("IsAdd")); if (isAdd) { TextBox1.Visible = LocationDropDown.Visible = DeptDropDown.Visible = TextBox4.Visible = true; btn.Visible = true; RadGrid1.DataSource = Session["dt"]; } } } protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.InitInsertCommandName) { DataTable dt = (DataTable)Session["dt"]; dt.Rows.Add(0, string.Empty, true); RadGrid1.MasterTableView.IsItemInserted = false; e.Canceled = true; RadGrid1.Rebind(); } } }KIndly help me solve this. Provided the code below.
Affected version: 2016.2.504.45
Steps to reproduce:
1) Create a RadGrid with a GridCalculatedColumn
2) Follow the first steps outlined in the documentation to put all rows in edit mode by calling Rebind() during prerender
Link: http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/data-editing/put-all-items-in-edit-mode
3) Crash
Solution:
Follow the second steps outlined in the documentation to put all rows in edit mode via OnItemCreated

Hi ,
I need a help regarding RadTreeView , where i would like wrap of Text value to next line according to fix size of text
Aspx Code
<td valign="top" style="border: solid 1px #000000" class="style2">
<div id="scroll1" style="overflow: auto; height: 825px;width: 480px;">
<telerik:RadTreeView ID="rtvCardFileCatEntries" runat="server" OnNodeClick="rtvCardFileCatEntries_NodeClick"
OnNodeExpand="rtvCardFileCatEntries_NodeExpand" Skin="Telerik">
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation>
<ExpandAnimation Duration="100"></ExpandAnimation>
</telerik:RadTreeView>
</div>
</td>
code-Cs page
rotected void rtvCardFileCatEntries_NodeClick(object sender, RadTreeNodeEventArgs e)
{
//If the click came from a Card file category
if (e.Node.Level == 1)
{
Guid selectedCardFileEntryId = Guid.Empty;
try
{
selectedCardFileEntryId = new Guid(e.Node.Value);
}
catch
{
}
if (selectedCardFileEntryId != Guid.Empty)
{
EntryEntity cardFileEntry = new EntryEntity(selectedCardFileEntryId);
ltCardFileEntryHtml.Text = cardFileEntry.EntryHtml; -- Here Text is coming
}
}
}
protected void rtvCardFileCatEntries_NodeExpand(object sender, RadTreeNodeEventArgs e)
{
Guid selectedCardFileCategoryId = Guid.Empty;
try
{
selectedCardFileCategoryId = new Guid(e.Node.Value);
}
catch
{
}
if (selectedCardFileCategoryId != Guid.Empty)
{
Collection cardFileEntries = GetCardFileEntries(selectedCardFileCategoryId);
e.Node.Nodes.Clear();
foreach (EntryEntity cardFileEntry in cardFileEntries)
{
RadTreeNode node = new RadTreeNode();
node.Text = cardFileEntry.Description;---Here Text is coming
node.Value = cardFileEntry.CardFileEntryId.ToString();
e.Node.Nodes.Add(node);
}
}
}
in UI --on click on button i am getting
eg:
Non-Commission Agencies
Wisconsin Department
of Agriculture, Trade and Consumer Protection Agency
Now my requirement to change this above text to
Non-Commission Agencies --Parent -on click of this (for parent also length of text 50 should come to next line)
Wisconsin Department of Agriculture,---rest text should come on next line(new line)-(length of text 50 should come to next line)
Trade and Consumer Protection Agency
what are possibilities please advise me .
Thanks in Advance
Hello I hope you can help me.
I am using Telerik RadHtmlChart, I need to remove from the x axis Saturdays and Sundays. What I mean, I need that the distance between friday and Monday be the same as Monday to Tuesday, my data will return only information for day weeks not for weekend.
It's possible?
Thank you very much in advance.

Hello I hope you can help me.
I am using Telerik RadHtmlChart, I need to remove from the x axis Saturdays and Sundays. What I mean, I need that the distance between friday and Monday be the same as Monday to Tuesday, my data will return only information for day weeks not for weekend.
It's possible?
Thank you very much in advance.
