Hello,
I am using ASP NET AJAX Gantt contro with database provider. I have created a table according to documentation here: http://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/data-binding/database-structure
It is a readonly control, only for display purposes, but I would like to filter rows in that table according to user selection (year selection is possible). I have just added a where clause:
'where [Start] between @startInterval and @endInterval
and [End] between @startInterval and @endInterval'
Even when I can see on Sqldatasource selectedEvent the affected rows >0 and fits the exact number of rows query should return, Gantt diagram displays empty.
If I remove the where clause, diagram displays perfectly.
Is there anything I am not taking into account?
Thank you in advance
Hi,
I'm new to using Telerik controls. I want to use the radEditor on an ASP.Net web page. I created a SQL table named AC_ToolText and a column named Description to save the value entered on my web page. But I can't find an example of how to interact with the SQL database.
So I want to do the following:
1. Allow user to enter rich text and then save to my table.
2. If the user calls my web page, I want to fetch the value from my Description column and display in the RadEditor.
3. The user can change or add to the text and save again if necessary.
Can someone provide an example of how to do the above? Thanks in advance.
Hi,
I have an Update and Cancel button on my form template.
It seems unnecessary to incur a server call just to close the form when the user clicks on Cancel.
Ideally I want to call some client side code that will cause the form to be closed.
Here's the FormTemplate declaration:
<EditFormSettings InsertCaption="New Input" CaptionFormatString="Editing Input" CaptionDataField="BriefName" PopUpSettings-Modal="true" EditFormType="Template" PopUpSettings-ShowCaptionInEditForm="false"> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> <FormTemplate> <div class="container-fluid"> <div class="row row-margin-bottom"> <div class="col-xs-12"> <asp:Label ID="lblReadOnly" runat="server" Text="** READ ONLY **" class="readOnly" Visible='<%# !(bool) Session["EditProcess"] %>'></asp:Label> <div class="form-group"> <label>Name</label> <span id="lblReqName" runat="server" class="requiredField" visible='<%# (bool) Session["EditProcess"] %>'></span> <asp:RequiredFieldValidator runat="server" ID="valName" ControlToValidate="txtName" CssClass="bg-danger text-danger _validator" ErrorMessage="ooops... a name is required" Enabled='<%# (bool) Session["EditProcess"] %>'></asp:RequiredFieldValidator><br /> <telerik:RadTextBox ID="txtName" MaxLength='<%# (int) Session["MaxSingleLineSize"] %>' runat="server" Text='<%# Bind("Name") %>' Width="50%" InputType="Text" ToolTip="Provide a brief and meaningful name for this Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="0"> </telerik:RadTextBox> </div> <div class="form-group"> <label>Description</label> <span id="lblReqDesc" runat="server" class="requiredField" visible='<%# (bool) Session["EditProcess"] %>'></span> <asp:RequiredFieldValidator runat="server" ID="valDesc" ControlToValidate="txtDesc" CssClass="bg-danger text-danger _validator" ErrorMessage="ooops.. a description is required" Enabled='<%# (bool) Session["EditProcess"] %>'> </asp:RequiredFieldValidator><br /> <telerik:RadTextBox ID="txtDesc" MaxLength='<%# (int) Session["MaxMultiLineSize"] %>' runat="server" Text='<%# Bind("Description") %>' Width="100%" Rows="4" InputType="Text" TextMode="MultiLine" Resize="Both" Wrap="True" data-toggle="tooltip" data-placement="top" title="Provide a detailed description for this Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="1"> </telerik:RadTextBox> </div> <div class="form-group"> <label>Supplier</label><br /> <telerik:RadTextBox ID="txtSupplier" MaxLength='<%# (int) Session["MaxMultiLineSize"] %>' runat="server" Text='<%# Bind("Supplier") %>' Width="100%" InputType="Text" Rows="2" TextMode="MultiLine" Resize="Both" Wrap="True" ToolTip="Identify one or more sources for this particular Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="2"> </telerik:RadTextBox> </div> <div class="checkbox"> <label> <asp:CheckBox ID="chkTrigger" runat="server" AutoPostBack="false" Checked='<%# Bind("IsTrigger") %>' ToolTip="Check if this Input acts as a trigger to initiate a task within the process" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="3"></asp:CheckBox> <span data-toggle="tooltip" data-placement="right" title="Check if this Input acts as a trigger to initiate a task within the process">Trigger</span> </label> </div> <div class="checkbox"> <label> <asp:CheckBox ID="chkCommon" runat="server" AutoPostBack="false" Checked='<%# Bind("Common_Flag") %>' ToolTip="Check if this Input is suitable for use in other processes" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="4"></asp:CheckBox> <span data-toggle="tooltip" data-placement="right" title="Check if this Input is suitable for use in other processes">Common</span> </label> </div> <div class="form-group"> <telerik:RadNumericTextBox ID="numListOrder" runat="server" Text='<%# Bind("ListOrder") %>' Visible="false"> </telerik:RadNumericTextBox> </div> </div> </div> <div class="row row-margin-bottom"> <div class="col-xs-12"> <telerik:RadButton ID="btnAddUpdate" runat="server" Text='<%# ((bool) DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Create" : "Update" %>' Visible='<%# (bool) Session["EditProcess"] %>' CommandName='<%# ((bool) DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'> </telerik:RadButton> <telerik:RadButton ID="btnCancel" runat="server" Text='<%# ((bool) Session["EditProcess"]) ? "Cancel" : "Close" %>' CausesValidation="False" CommandName="Cancel"> </telerik:RadButton> </div> </div> </div> </FormTemplate> <PopUpSettings Width="90%" KeepInScreenBounds="True" Modal="True" ScrollBars="Auto"></PopUpSettings></EditFormSettings>
Thanks for any suggestions.
Jim
Hi,
I need to create a line chart with markers which displays the percentage of code reviews completed in each sprint. The X axis denotes the sprints whereas the y axis denotes the percentage.
Based on the demos I found out that there are legends being displayed. But I do not need to display a legend as I am displaying a trend. How can I achieve this?
I have attached the screenshot from excel.
I have a RadGrid created dynamically in code behind and when I try to export to Excel I get the following error:
We found a problem with this formula. Try clicking Insert Function on the Formulas tab to fix it.\n\nNot trying to type a formula? When the first character is an equal (=) or minus (-) sign, RadSpreadsheet thinks it is a formula. For example, when you type =1+1 the cell shows 2.Here is the export code:
protected void ibtnExportToExcel_Click(object sender, ImageClickEventArgs e) { rgWorkItems.DataSource = Session["GridTable"]; rgWorkItems.Rebind(); rgWorkItems.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx; rgWorkItems.ExportSettings.IgnorePaging = true; rgWorkItems.ExportSettings.ExportOnlyData = true; rgWorkItems.ExportSettings.OpenInNewWindow = true; rgWorkItems.MasterTableView.ExportToExcel(); }I do not have any of the data that starts with = in my grid.
If I change the ExportToExcel to ExportToCSV it works just fine.
How can I resolve this?
Hii Admin,
My Telerik Basic(RadTextbox, RadComboBox) Works properly in All Browser except Safari Mobile Browser(Iphone, Ipad), So What should i Do.
Please Suggest Solution ..
My Telerik Version 2013.1.417.35
Thanks in advance.
Hi,
Buttons associated with the listbox are disabled. Attached a screen shot. Am i missing any setting here?
<telerik:RadListBox runat="server" ID="rlbItemSource" AllowTransfer="true" AllowTransferOnDoubleClick="true" TransferToID="rlbItemTarget" height="150px" Width="200px" TransferMode="Move" SelectionMode="Multiple" > <ButtonSettings ShowTransferAll="true" ShowTransfer="true" ShowReorder="false" /></telerik:RadListBox><telerik:RadListBox runat="server" ID="rlbItemTarget" height="150px" Width="200px" TransferToID="rlbItemSource" ><ButtonSettings ShowReorder="false" /> </telerik:RadListBox>
Thanks in Advance
So, I was implementing this:
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Filtering/filter-by-listtextfield-for-griddropdowncolumn
But then as I was implementing it, I realized that this was overly complicating the issue.
It has you add a hidden gridboundcolumn and then pass the values between the hidden column and the drop down in events and re-fire the filter.
Instead, you can just add the extra gridboundcolumn, but do not hide it - let it be the display column in the grid. But set readonly=true so it does not display in the edit form.
Then simply set display=false for your griddropdowncolumn. It will not display in the grid, but will still show in the edit/insert forms.
This removes the need for any event wiring between the two controls. It simply "works".
It also lets the filter control display the correct types of filters (IE text filters options vs. numeric filter options) without further hacking.
Simpler is better right?
protected override void OnInit(EventArgs e) { rcbCustomer.HeaderTemplate = new HeaderTemplate(); rcbCustomer.ItemTemplate = new HeaderItemTemplate(); base.OnInit(e); } public class HeaderTemplate : ITemplate { public void InstantiateIn(Control container) { HtmlTable table = new HtmlTable(); HtmlTableRow row = new HtmlTableRow(); HtmlTableCell cell = new HtmlTableCell(); cell.InnerText = "客户编号"; cell.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell); HtmlTableCell cell1 = new HtmlTableCell(); cell1.InnerText = "客户名称"; cell1.Width = Unit.Pixel(160).ToString(); row.Controls.Add(cell1); HtmlTableCell cell2 = new HtmlTableCell(); cell2.InnerText = "主联系人"; cell2.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell2); HtmlTableCell cell3 = new HtmlTableCell(); cell3.InnerText = "类型"; cell3.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell3); HtmlTableCell cell4 = new HtmlTableCell(); cell4.InnerText = "商务人员"; cell3.Width = Unit.Pixel(90).ToString(); row.Controls.Add(cell4); table.Controls.Add(row); container.Controls.Add(table); } }public class HeaderTemplate : ITemplate { public void InstantiateIn(Control container) { HtmlTable table = new HtmlTable(); HtmlTableRow row = new HtmlTableRow(); HtmlTableCell cell = new HtmlTableCell(); cell.InnerText = "客户编号"; cell.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell); HtmlTableCell cell1 = new HtmlTableCell(); cell1.InnerText = "客户名称"; cell1.Width = Unit.Pixel(160).ToString(); row.Controls.Add(cell1); HtmlTableCell cell2 = new HtmlTableCell(); cell2.InnerText = "主联系人"; cell2.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell2); HtmlTableCell cell3 = new HtmlTableCell(); cell3.InnerText = "类型"; cell3.Width = Unit.Pixel(100).ToString(); row.Controls.Add(cell3); HtmlTableCell cell4 = new HtmlTableCell(); cell4.InnerText = "商务人员"; cell3.Width = Unit.Pixel(90).ToString(); row.Controls.Add(cell4); table.Controls.Add(row); container.Controls.Add(table); } }<telerik:RadComboBox ID="rcbCustomer" runat="server" Width="100%" AllowCustomText="true" Text="" OnClientItemsRequesting="ClientCustomerItemRequesting" HighlightTemplatedItems="true" DropDownWidth="550px" ExpandAnimation-Duration="100" CollapseAnimation-Duration="100" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedCustomer" EnableLoadOnDemand="true" AutoPostBack="true" OnItemsRequested="rcbCustomer_ItemsRequested" Height="200px"> <HeaderTemplate> <ul class="Item"> <li class="col2">客户名称</li> <li class="col3">主联系人</li> <li class="col4">客户类型</li> </ul> </HeaderTemplate> <ItemTemplate> <ul class="Item"> <li class="col2"> <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"CusName\"]").ToString())%> </li> <li class="col3"> <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"LinkmanName\"]").ToString())%> </li> <li class="col4"> <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"CusTypeName\"]").ToString())%> </li> </ul> </ItemTemplate> <FooterTemplate> <div> <b>更多请输入助记码查询.</b> </div> </FooterTemplate> </telerik:RadComboBox> Customer cus = new Customer(); cus.CusName = "全部"; cus.CustomerID = -1; cus.LinkmanName = string.Empty; cus.CusCode = string.Empty; cus.CusTypeName = string.Empty; cus.SaleManName = string.Empty; list.Insert(0, cus); foreach (Customer customer in list) { RadComboBoxItem item = new RadComboBoxItem(); item.Value = customer.CustomerID.ToString(); if (isSupplier == 1) { item.Text = customer.CusName; } else { item.Text = customer.LinkmanName; } item.Attributes.Add("CusCode", customer.CusCode); if (isSupplier == 1) { item.Attributes.Add("CusName", customer.CusName); } else { item.Attributes.Add("CusName", customer.LinkmanName); } item.Attributes.Add("LinkmanName", customer.LinkmanName); item.Attributes.Add("CusTypeName", customer.CusTypeName); item.Attributes.Add("LinkmanMobile", customer.LinkmanMobile); if (customer.SaleManName == null) { item.Attributes.Add("SaleManName", ""); } else { item.Attributes.Add("SaleManName", customer.SaleManName); } comboBox.Items.Add(item); } comboBox.DataBind();