Hi,
How to change the Navigation Bar color incl. callout and border in 2019.2?
This seems to be changed compared to 2019.1...
Thanks for your answer.
Marc
Hi
I have a tree view list which connects to a datasource and saves which nodes have been checked into a grid. When I load the page again I want to be able to take what is in the grid and check the corresponding nodes again. This is the code I have wrote so far, when the page loads it reads the datatable and checks the parent and child nodes which match the data. However it is checking all of the child nodes even though not all of the nodes appear in the datatable, how can I check the parent node in an intermediate state?
DataTable Branches = new DataTable();
DataSourceSelectArguments args = new DataSourceSelectArguments();
DataView view = (DataView)sdsCampaignBranch.Select(args);
if (view != null)
Branches = view.ToTable();
tvBranches.DataBind();
foreach (RadTreeNode parent in tvBranches.Nodes)
{
foreach (RadTreeNode child in parent.Nodes)
{
for (int j = 0; j < Branches.Rows.Count; j++)
{
if (parent.Attributes["ItemValue"].ToString() == Branches.Rows[j][0].ToString().Trim())
{
parent.Checked = true;
}
if (child.Attributes["ItemValue"].ToString() == Branches.Rows[j][1].ToString().Trim())
{
child.Checked = true;
}
}
}
}
Hi,
I've got my students using the editor as a full page HTML website maker.
I have 2 edit modes - design & html
All is good but I wondered if it was possible to have the edit modes in the toolbar at the top as well as at the bottom.
I can create a custom tool but not sure of the commands for design and html.
+ Is it possible to have the edit modes floating?
Thanks guys,
Jon
I am trying to add "Comment" column in the grid which will display "chars remaining" as user types as well as limit max characters allowed in the textbox.
something like showed here: http://www.aspnet101.com/2009/01/limit-characters-in-multiline-textbox/
My grid looks like this:
<telerik:RadGrid RenderMode="Lightweight" AutoGenerateColumns="false" MasterTableView-DataKeyNames="AttachmentID" OnNeedDataSource="GridView1_NeedDataSource" AllowAutomaticUpdates="true" ID="GridView1" AllowSorting="True" runat="server" >
<MasterTableView AllowSorting="true">
<Columns>
<telerik:GridBoundColumn DataField="AttachmentID" UniqueName="AttachmentID" Visible="false" />
<telerik:GridBoundColumn AllowSorting="true" DataField="CurriculamYear" UniqueName="CurriculamYear" HeaderText="Curriculum Year"/>
<telerik:GridHyperLinkColumn AllowSorting="true" DataNavigateUrlFields="Path" DataNavigateUrlFormatString="{0}" DataTextField="Name" UniqueName="Name" HeaderText="Document Type"/>
<telerik:GridBoundColumn AllowSorting="true" DataField="FileName" UniqueName="FileName" HeaderText="File Name"/>
<telerik:GridBoundColumn AllowSorting="true" DataField="CreateDate" UniqueName="CreateDate" HeaderText="Upload Date and Time"/>
<telerik:GridTemplateColumn HeaderText="Comments" UniqueName="Comments">
<ItemTemplate>
<asp:TextBox ID="txtMessage1" TextMode="MultiLine" Text='<%# Bind("Comments") %>' Width="300px" Rows="3" MaxLength="500" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
As per this https://www.telerik.com/forums/add-delete-button-to-each-row-in-radgrid I am trying to add a delete button onto the radgrid using GridButtonColumn.
I have followed through the sample that uses programmatic databinding using PageMethods webservices and am finding that when I get an ItemCommand postback server side the data item and the data key values are blank. I have specified to use DataKeyValues and ClientDataKeyValues but everything on the server is empty.
I have turned my attention to doing things client side instead and am trying to get the CommandArgument of the item which I can then use in the OnCommand javascript function. I have tried using <%#Eval("GUID")%> but I get errors. The link above suggests using a LinkButton instead.
My question is this, if I use a LinkButton and presumably style that with a delete image, how do I add the rad window confirmation to that button?
<
telerik:RadListBox
ID
=
"RLB_References"
runat
=
"server"
Width
=
"360px"
TransferToID
=
"RLB_SelectedReference"
AutoPostBackOnTransfer
=
"True"
AllowTransfer
=
"True"
OnTransferred
=
"RLB_References_Transferred"
>
<
HeaderTemplate
>
<
table
>
<
tr
>
<
td
width
=
"80px"
>Titre</
td
>
<
td
width
=
"80px"
>Référence</
td
>
<
td
width
=
"80px"
>Taille</
td
>
<
td
width
=
"80px"
>Coloris</
td
>
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
>
<
tr
>
<
td
width
=
"90px"
>
<%# DataBinder.Eval(Container.DataItem, "Titre") %>
</
td
>
<
td
width
=
"90px"
>
<%# DataBinder.Eval(Container.DataItem, "Reference") %>
</
td
>
<
td
width
=
"90px"
>
<%# DataBinder.Eval(Container.DataItem, "Taille") %>
</
td
>
<
td
width
=
"90px"
>
<%# DataBinder.Eval(Container.DataItem, "Coloris") %>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadListBox
>
<
telerik:RadListBox
ID
=
"RLB_SelectedReference"
runat
=
"server"
Width
=
"400px"
>
<
HeaderTemplate
>
<
table
>
<
tr
>
<
td
width
=
"80px"
>Titre</
td
>
<
td
width
=
"80px"
>Référence</
td
>
<
td
width
=
"80px"
>Taille</
td
>
<
td
width
=
"80px"
>Coloris</
td
>
<
td
width
=
"80px"
>Quantité</
td
>
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
>
<
tr
>
<
td
width
=
"80px"
>
<%# DataBinder.Eval(Container.DataItem, "Titre") %>
</
td
>
<
td
width
=
"80px"
>
<%# DataBinder.Eval(Container.DataItem, "Reference") %>
</
td
>
<
td
width
=
"80px"
>
<%# DataBinder.Eval(Container.DataItem, "Taille") %>
</
td
>
<
td
width
=
"80px"
>
<%# DataBinder.Eval(Container.DataItem, "Coloris") %>
</
td
>
<
td
width
=
"80px"
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"QuantityTextBox"
Width
=
"50px"
MinValue
=
"1"
ShowSpinButtons
=
"true"
Value
=
"1"
NumberFormat-DecimalDigits
=
"0"
>
</
telerik:RadNumericTextBox
>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadListBox
>
private
string
GetArticleTitle(
int
nodeId)
{
return
"title";
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
{
List<tbl_references> references =
null
;
using
(ReferenceContainer context =
new
ReferenceContainer())
{
references = context.tbl_references.ToList();
}
var datasource = from r
in
references
let reference = r.Reference
let taille = r.Taille
let coloris = r.Coloris
let titre = GetArticleTitle(r.ArticleNodeId)
select
new
{
Reference = reference,
Taille = taille,
Coloris = coloris,
Titre = titre
};
RLB_References.DataSource = datasource;
RLB_References.DataBind();
}
}
protected
void
RLB_References_Transferred(
object
sender, Telerik.Web.UI.RadListBoxTransferredEventArgs e)
{
foreach
(RadListBoxItem item
in
e.Items)
{
item.DataBind();
}
}
I'd like to use the telerik radgrid control to generate an excel export of data, however, I don't want to display the grid on the web page. Is there a way to do this?
Thanks in advance.
if (e.Item is GridGroupHeaderItem ) |
{ |
GridGroupHeaderItem item = e.Item as GridGroupHeaderItem; |
if ( item.GroupIndex.LastIndexOf("_") == 1) |
{ |
DataRowView groupDataRow = (DataRowView)e.Item.DataItem; |
CheckBox check = new CheckBox(); |
check.AutoPostBack = false; |
check.ID = "foo"; |
check.Text = this._headerTextForEmployeeName + " FirstName - LastName"; |
check.CheckedChanged += new EventHandler(check_CheckedChanged); |
item.DataCell.Controls.Add(check); |
} |
} |
Hello,
i want to use RadGrid in asp.net with dynamical columns with different widths. There is no autosizing like autofit. I tried it with javascript. It works but it isnt a good solution. I tried here with some functions, but nothing happens on sizing. Only text will be changed. Visible unvisible is also not working. I think telerik is in grid a very bad solution.
in page:
<telerik:RadGrid ID="rgrdSuche" runat="server" Culture="de-DE" OnColumnCreated="rgrdSuche_ColumnCreated" OnSortCommand="rgrdSuche_SortCommand">
<MasterTableView AutoGenerateColumns="true" AllowFilteringByColumn="false">
</MasterTableView>
</telerik:RadGrid>
i tried with the event itemdatabound, but nothing happened:
protected void rgrdSuche_ItemDataBound(object sender, GridItemEventArgs e)
{
try
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem headerItem = e.Item as GridHeaderItem;
for (int i = 0; i < headerItem.Cells.Count; i++)
{
switch (headerItem.Cells[i].Text.Replace(" ", ""))
{
case "Comment":
headerItem.Cells[i].Text = "Comment-Text";
headerItem.Cells[i].Width = Unit.Pixel(400);
break;
default:
break;
...
and event via ColumnCreated will not work also:
protected void rgrdSuche_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
switch (e.Column.UniqueName)
{
case "Comment":
e.Column.Visible = false;
e.Column.HeaderText = "Comment-Text";
e.Column.HeaderStyle.Width = Unit.Pixel(400);
e.Column.FilterControlWidth = Unit.Pixel(400);
break;