Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
134 views
My requirements have changed in that I need to display calandar using scheduler with only avialable free slots. ie if 15:00 was booked it wouldnt be visible in the time slot area. I managed this fine with the rad time picker so have a time span list already working is their anyway i can use this same list to have the same affect.
Hristo Valyavicharski
Telerik team
 answered on 21 Mar 2016
4 answers
647 views

Hi,

We use a scheduler in our site which by default loads all the appointments for everyone on that given day.

We have a separate drop down which has user names. When a username is selected from the list, schedule for that user is loaded in the scheduler.

When the scheduler is empty , it loads well.

In some cases where the calendar is full with appointments, when i select a user from the drop down, I get the error given below. I get this error before it goes to  dropdown_selectedindexchange event.  Does this have anything to do with the view state? What fix is needed to get it working ?

 

'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException: Maximum request length exceeded.
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.FillInFormCollection()
   at System.Web.HttpRequest.get_Form()
   at System.Web.HttpRequest.get_HasForm()
   at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
   at System.Web.UI.Page.DeterminePostBackMode()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

Thanks,

Ravi

Ivan Danchev
Telerik team
 answered on 21 Mar 2016
0 answers
135 views

Below is my code

@{Html.Telerik().Window()
    .Name("SupportDetailCommentPopup")
    .Title("Comment")
    .Content(@<text>
        <form>
            <div class="popup-validation-summary" style="display: none;">
                <ul class="popup-validation-message-list"></ul>
            </div>
            <textarea id="SupportDetailCommentText" maxlength="255" style="width: 280px; height:100px" class="t-input ignoreForUnsavedChanges"></textarea>
            <ul class="editor-fields">
                <li>
                    @Html.Label("Updated By")
                    <div id="SupportDetailCommentLastUpdatedByText"></div>
                </li>
                <li>
                    @Html.Label("Last Updated Date")
                    <div id="SupportDetailCommentLastUpdatedDateText"></div>
                </li>
            </ul>

            <input type="button" value="Save" id="FundsAvailableForMonthPopUpSave" onclick="" class="t-button button-spacing" />
            <input type="button" value="Cancel" onclick="" class="t-button button-spacing" />
        </form>
    </text>)
    .Modal(true)
    .Visible(false)
    .Draggable(true)
    .ClientEvents(e => e.OnOpen("SupportDetailCommentPopUpOpen"))
    .Width(300);
}

  $(document).on("click", ".comment-style", function (e) {
            e.preventDefault();
            PopulateSupportDetailCommentPopUp(e);
            $("#SupportDetailCommentPopup").data('tWindow').open();//getting Exception on this line
        }); 

        function PopulateSupportDetailCommentPopUp(e)
        {
            var vm={CommentText:"test",LastUpdated:"SRJ",LastUpdatedDate:"March 21, 2016"};
            
            $("#SupportDetailCommentPopup").data('viewModel', vm);
            $('#SupportDetailCommentText').val(vm.CommentText);
            $("#SupportDetailCommentLastUpdatedByText").text(vm.LastUpdatedBy);
            $("#SupportDetailCommentLastUpdatedDateText").text(vm.LastUpdatedDate);
    
        }
sushil
Top achievements
Rank 1
 asked on 21 Mar 2016
1 answer
99 views

Hey

I am having a issue where my chart displays grey when I update it with new values.

When the page first loads I can see the grid (with no data), my x and y axis, legend, and the title. Once I bind data to it, the whole grid turns grey but I am still able to see everything else.

Internet Explorer also pops up a dialogue that tells me that a script on the page is causing my web browser to run slowly.

 

However I don't have this problem on my local computer, only on the computer I'm trying to deploy this on.

Attached is a picture of what the Chart looks like when I try to load data to it.

Danail Vasilev
Telerik team
 answered on 21 Mar 2016
4 answers
813 views
Hi,
I am using the NeedDataSource event to populate my grid from my DB & I use a custom popup form for editing. The edit form is driven by a link created using 'AutoGenerateEditColumn' and then handling the OnCommand event.

I would like to add my own button to the grid to popup another form so it could be either a 'custom' command (if such a thing exists) or I need to add a GridButtonColumn from code-behind.

I couldn't find an example of how to do this - any ideas?
Viktor Tachev
Telerik team
 answered on 21 Mar 2016
5 answers
155 views

Hi Team,

 

I'm using Telerik controls "RadControls for ASP.NET AJAX 2011.3 1305" , I developed a Rad Grid with modal popup,When I click on edit button ,a Modal Popup will launch with grid item editable, in my local environment it is working fine but the same thing is not working after deploying it into Development servers.

This issue is happening in IE, I'm using IE 11.

 

Thanks in Advance.

Viktor Tachev
Telerik team
 answered on 21 Mar 2016
1 answer
98 views

Hi,

Am binding the RadGrid from dynamic data table in codebehind. After insert or updates happen the grid is not binding.

Below the code for reference.

ASPX

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function RowDblClick(sender, eventArgs) {
sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
}
</script>
</telerik:RadCodeBlock>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<div>
<telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecorationZoneID="demo" DecoratedControls="All"
EnableRoundedCorners="false" />
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" GridLines="None" AllowPaging="true" PageSize="20"
AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
OnItemDeleted="RadGrid1_ItemDeleted" OnItemUpdated="RadGrid1_ItemUpdated" OnNeedDataSource="RadGrid1_NeedDataSource"
OnItemCommand="RadGrid1_ItemCommand" OnItemInserted="RadGrid1_ItemInserted" OnPreRender="RadGrid1_PreRender">
<MasterTableView CommandItemDisplay="Top" DataKeyNames="EmpID">
<Columns>
<telerik:GridEditCommandColumn>
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn HeaderText="Employee ID" DataField="EmpID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Employee Name" DataField="EmpName"></telerik:GridBoundColumn>
<telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete">
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings EditFormType="Template" >
<FormTemplate>
<table cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;">
<tr>
<td style="padding-left: 5px; width: 50%;" align="left">
<asp:Label ID="Label3" runat="server" CssClass="DisplayLabel" Text="Employee ID"></asp:Label> <br />
<asp:TextBox ID="TextBox1" runat="server" Width="90%" Text='<%# Bind("EmpID") %>'></asp:TextBox>
</td>
<td style="padding-left: 5px; width: 50%;" align="left">
<asp:Label ID="Label1" runat="server" CssClass="DisplayLabel" Text="Employee Name"></asp:Label> <br />
<asp:TextBox ID="TextBox2" runat="server" Width="90%" Text='<%# Bind("EmpName") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' CssClass="button"></asp:Button>&nbsp;
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="button"></asp:Button>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
</ClientSettings>
</telerik:RadGrid>

 

CS

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
public partial class TelerikGridview : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("EmpID");
dt.Columns.Add("EmpName");
DataRow dr;
dr = dt.NewRow();
dr["EmpID"] = "1";
dr["EmpName"] = "Akash";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["EmpID"] = "2";
dr["EmpName"] = "Babu";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["EmpID"] = "3";
dr["EmpName"] = "Charles";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["EmpID"] = "4";
dr["EmpName"] = "Dhulkar";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["EmpID"] = "5";
dr["EmpName"] = "Elizabeth";
dt.Rows.Add(dr);
Session["EmployeeDT"] = dt;
}
}
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
DataTable dtEmployee = (DataTable)Session["EmployeeDT"];
GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");
GridButtonColumn deleteColumn = (GridButtonColumn)RadGrid1.MasterTableView.GetColumn("DeleteColumn");
if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked
{
editColumn.Visible = false;
deleteColumn.Visible = false;
}
else if (e.CommandName == RadGrid.PerformInsertCommandName)
{
editColumn.Visible = false;
deleteColumn.Visible = false;
GridEditableItem editedItem = e.Item as GridEditableItem;
TextBox txtEmployeeID = editedItem.FindControl("TextBox1") as TextBox;
TextBox TXTEmployeeName = editedItem.FindControl("TextBox2") as TextBox;
DataRow dr;
dr = dtEmployee.NewRow();
dr["EmpID"] = txtEmployeeID.Text;
dr["EmpName"] = TXTEmployeeName.Text;
dtEmployee.Rows.Add(dr);
dtEmployee.AcceptChanges();
Session["dtLOB"] = dtEmployee;
}
else if (e.CommandName == RadGrid.EditCommandName)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
TextBox txtEmployeeID = editedItem.FindControl("TextBox1") as TextBox;
txtEmployeeID.Enabled = false;
}
else if (e.CommandName == RadGrid.UpdateCommandName)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
TextBox txtEmployeeID = editedItem.FindControl("TextBox1") as TextBox;
TextBox TXTEmployeeName = editedItem.FindControl("TextBox2") as TextBox;
foreach (GridDataItem item in RadGrid1.EditItems)
{
if (item.GetDataKeyValue("EmpID").ToString() == txtEmployeeID.Text)
{
for (int i = 0; i < dtEmployee.Rows.Count; i++)
{
if (dtEmployee.Rows[i]["EmpID"].ToString() == txtEmployeeID.Text)
{
dtEmployee.Rows[i]["EmpName"] = TXTEmployeeName.Text;
}
}
}
}

dtEmployee.AcceptChanges();
Session["dtLOB"] = dtEmployee;
}
else if (e.CommandName == RadGrid.RebindGridCommandName && e.Item.OwnerTableView.IsItemInserted)
{
e.Canceled = true;
}
else
{
if (!editColumn.Visible)
editColumn.Visible = true;
}
}
protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
{
if (e.Exception != null)
{
e.KeepInEditMode = true;
e.ExceptionHandled = true;
}
}
protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)
{
}
protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)
{
}
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//RadGrid1.EditIndexes.Add(0);
//RadGrid1.Rebind();
}
}
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
DataTable dt = new DataTable();
dt = (DataTable)Session["EmployeeDT"];
(sender as RadGrid).DataSource = dt;
}
}

 

Kindly help is there anything I missed out.

 

Regards,

Ganeshkumar

 

 

Konstantin Dikov
Telerik team
 answered on 21 Mar 2016
2 answers
97 views

I am having some display issues in the scheduler its courrupting the date when i switch to week view all other views are fineis theri any way of making the cell taller?.

 

 

Philip
Top achievements
Rank 1
 answered on 21 Mar 2016
1 answer
163 views

I am trying to copy/paste a delimited string into the AutoCompleteBox such as follows -  test@test.com;test2@test.com;test3@test.com

The expected behavior would be to tokenize all three of those entries; however, it only takes the last entry and removes the others.  Is there a way to get it to tokenize all 3?

Nencho
Telerik team
 answered on 21 Mar 2016
1 answer
141 views

Hi

 

How to load dropdownlist based on group for ex: 

 

ex:

India 

   Tamilnadu

   Andra

Srilanka 

  State1

  State2

 

In telerik dropdownlist

Nencho
Telerik team
 answered on 21 Mar 2016
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?