Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 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
793 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
151 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
96 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
95 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
156 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
138 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
1 answer
190 views

Hi

 

How to select Multiple option dropdownlist in telerik control any one guide me.

 

http://demos.telerik.com/aspnet-mvc/multiselect/serverfiltering

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

As you can see in the attached image, the edges of the list of records are not border radius format. The examples in the online demo instead and there are no particular settings to make the object. How can I fix?

How can I fix? here is the html code

 

<telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="400px"
    ShowSearchButton="false"
    RenderMode="Lightweight">
    <DropDownSettings Height="300" Width="400" />
    <WebServiceSettings Path="Index.aspx" Method="GetResults"/>
</telerik:RadSearchBox>

Also how can I enter the search button in the search button?

 

Fabio Cirillo
Top achievements
Rank 1
 asked on 20 Mar 2016
12 answers
1.4K+ views
I was getting performance issues, and I finally managed to trace it back to the code in ItemDataBound(). For some reason, every record was being databound four times. So I grew curious.

I created a new project, threw a radgrid on it along with a SQLDataSource that ran a simple 53-record SELECT stored proc. In ItemDataBound() I set:

Debug.WriteLine("ItemDataBound");

Then I did the same with a basic GridView. In RowDataBound(), I set:

Debug.WriteLine("RowDataBound");


When ItemDataBound ran, it came up with 108 lines (106 for the records 1 for the header, and one for the footer). When I ran RowDataBound(), it came up with 55 lines (not sure where the extra one is coming from. Possibly a footer that's not visible?)

So why is it running twice? (Or in my case, four times?)

ETA: Results from those debug lines with e.Item.ItemIndex/e.Row.RowIndex added:

-1 ItemDataBound
0 ItemDataBound
0 ItemDataBound
1 ItemDataBound
1 ItemDataBound
2 ItemDataBound
2 ItemDataBound
3 ItemDataBound
3 ItemDataBound
4 ItemDataBound
4 ItemDataBound
5 ItemDataBound
5 ItemDataBound
6 ItemDataBound
6 ItemDataBound
7 ItemDataBound
7 ItemDataBound
8 ItemDataBound
8 ItemDataBound
9 ItemDataBound
9 ItemDataBound
10 ItemDataBound
10 ItemDataBound
11 ItemDataBound
11 ItemDataBound
12 ItemDataBound
12 ItemDataBound
13 ItemDataBound
13 ItemDataBound
14 ItemDataBound
14 ItemDataBound
15 ItemDataBound
15 ItemDataBound
16 ItemDataBound
16 ItemDataBound
17 ItemDataBound
17 ItemDataBound
18 ItemDataBound
18 ItemDataBound
19 ItemDataBound
19 ItemDataBound
20 ItemDataBound
20 ItemDataBound
21 ItemDataBound
21 ItemDataBound
22 ItemDataBound
22 ItemDataBound
23 ItemDataBound
23 ItemDataBound
24 ItemDataBound
24 ItemDataBound
25 ItemDataBound
25 ItemDataBound
26 ItemDataBound
26 ItemDataBound
27 ItemDataBound
27 ItemDataBound
28 ItemDataBound
28 ItemDataBound
29 ItemDataBound
29 ItemDataBound
30 ItemDataBound
30 ItemDataBound
31 ItemDataBound
31 ItemDataBound
32 ItemDataBound
32 ItemDataBound
33 ItemDataBound
33 ItemDataBound
34 ItemDataBound
34 ItemDataBound
35 ItemDataBound
35 ItemDataBound
36 ItemDataBound
36 ItemDataBound
37 ItemDataBound
37 ItemDataBound
38 ItemDataBound
38 ItemDataBound
39 ItemDataBound
39 ItemDataBound
40 ItemDataBound
40 ItemDataBound
41 ItemDataBound
41 ItemDataBound
42 ItemDataBound
42 ItemDataBound
43 ItemDataBound
43 ItemDataBound
44 ItemDataBound
44 ItemDataBound
45 ItemDataBound
45 ItemDataBound
46 ItemDataBound
46 ItemDataBound
47 ItemDataBound
47 ItemDataBound
48 ItemDataBound
48 ItemDataBound
49 ItemDataBound
49 ItemDataBound
50 ItemDataBound
50 ItemDataBound
51 ItemDataBound
51 ItemDataBound
52 ItemDataBound
52 ItemDataBound
-1 ItemDataBound



-1 RowDataBound
0 RowDataBound
1 RowDataBound
2 RowDataBound
3 RowDataBound
4 RowDataBound
5 RowDataBound
6 RowDataBound
7 RowDataBound
8 RowDataBound
9 RowDataBound
10 RowDataBound
11 RowDataBound
12 RowDataBound
13 RowDataBound
14 RowDataBound
15 RowDataBound
16 RowDataBound
17 RowDataBound
18 RowDataBound
19 RowDataBound
20 RowDataBound
21 RowDataBound
22 RowDataBound
23 RowDataBound
24 RowDataBound
25 RowDataBound
26 RowDataBound
27 RowDataBound
28 RowDataBound
29 RowDataBound
30 RowDataBound
31 RowDataBound
32 RowDataBound
33 RowDataBound
34 RowDataBound
35 RowDataBound
36 RowDataBound
37 RowDataBound
38 RowDataBound
39 RowDataBound
40 RowDataBound
41 RowDataBound
42 RowDataBound
43 RowDataBound
44 RowDataBound
45 RowDataBound
46 RowDataBound
47 RowDataBound
48 RowDataBound
49 RowDataBound
50 RowDataBound
51 RowDataBound
52 RowDataBound
-1 RowDataBound

Loki
Top achievements
Rank 1
 answered on 19 Mar 2016
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?