Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
681 views
Hi All,

Below is my code.Please see the screen shot for my issue

<

 

radG:RadGrid AllowMultiRowSelection="true" ID="RadGrid1" runat="server" GridLines="None"

 

 

AutoGenerateColumns="False" Skin="Outlook" Width="100%" AllowPaging="True" PageSize="50"

 

 

AllowFilteringByColumn="true" AllowSorting="true"

 

 

OnItemDataBound="RadGrid1_ItemDataBound1"

 

 

OnItemCommand="RadGrid1_ItemDataBound1" OnDeleteCommand="RadGrid1_DeleteCommand"

 

 

OnPageIndexChanged="RadGrid1_PageIndexChanged" EnableHeaderContextMenu="true"

 

 

AllowCustomPaging="false"

 

 

OnPreRender="RadGrid1_PreRender" ItemStyle-Wrap="false" AlternatingItemStyle-Wrap="false" >

 

 

<ExportSettings HideStructureColumns="true" />

 

 

<MasterTableView CommandItemDisplay="Bottom" DataKeyNames="emp_code" TableLayout="Auto" Width="100%" >

 

 

<PagerStyle Mode="Advanced" AlwaysVisible="true" />

 

 

<FilterItemStyle HorizontalAlign="left" />

 

 

<HeaderStyle ForeColor="Navy" />

 

 

 

 

<CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" />

 

 

 

<AlternatingItemStyle BackColor="#E5E5E5" Height="20px" />

 

 

<CommandItemTemplate>

 

 

<div>

 

 

<asp:Image ID="Image1" ImageUrl="../frames/images/toolbar/AddRecord.gif" runat="Server" />

 

 

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/employee/AddEditEmployee.aspx"

 

 

Font-Underline="true">Add New Employee</asp:HyperLink>

 

 

</div>

 

 

</CommandItemTemplate>

 

 

<Columns>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="EmpCode" HeaderImageUrl="../frames/images/EMPLOYEE/Grid- employee.png"

 

 

HeaderText="Emp Code" CurrentFilterFunction="StartsWith" DataField="emp_code"

 

 

Display="false">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">

 

 

<ItemTemplate>

 

 

<asp:Image ID="Image2" ImageUrl="../frames/images/EMPLOYEE/Grid- employee.png" runat="Server" />

 

 

</ItemTemplate>

 

<%

-- <HeaderStyle Width="30px" />--%>

 

 

<HeaderStyle Width="3%" />

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridTemplateColumn ShowFilterIcon="False" AllowFiltering="False" UniqueName="TemplateColumnEC"

 

 

Display="false" HeaderText="Code" SortExpression="emp_code">

 

 

<ItemTemplate>

 

 

<asp:HyperLink runat="server" Text='<%# "DPT"+ DataBinder.Eval(Container.DataItem,"emp_code").ToString()%>'

 

 

NavigateUrl='<%# "AddEditEmployee.aspx?empcode=" + DataBinder.Eval (Container.DataItem,"emp_code").ToString()%>'

 

 

ID="empcode" />

 

 

</ItemTemplate>

 

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridTemplateColumn>

 

<%

-- <radG:GridTemplateColumn UniqueName="TCEmpName" HeaderText="Employee Name" SortExpression="emp_name" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

<ItemTemplate>

<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"emp_name").ToString()%>'

NavigateUrl='<%# "AddEditEmployee.aspx?empcode=" + DataBinder.Eval (Container.DataItem,"emp_code").ToString()%>'

ID="empname" />

</ItemTemplate>

<HeaderStyle HorizontalAlign="left" />

</radG:GridTemplateColumn>--

 

%>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="emp_name" HeaderText="Employee Name"

 

 

DataField="emp_name" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

<%

-- <HeaderStyle Width="300px" />--%>

 

 

<HeaderStyle Width="25%" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="emp_type" HeaderText="Pass Type"

 

 

DataField="emp_type" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

<%

-- <HeaderStyle Width="90px" />--%>

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="ic_pp_number" HeaderText="IC/FIN Number"

 

 

DataField="ic_pp_number" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="empgroupname" HeaderText="Type"

 

 

DataField="empgroupname" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn ShowFilterIcon="False" UniqueName="ID" HeaderText="Time Card ID"

 

 

CurrentFilterFunction="contains" AutoPostBackOnFilter="true" DataField="time_card_no">

 

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="true" ShowFilterIcon="False" UniqueName="Designation"

 

 

HeaderText="Designation" DataField="Designation" CurrentFilterFunction="contains"

 

 

AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="true" ShowFilterIcon="False" UniqueName="Department"

 

 

HeaderText="Department" DataField="Department" CurrentFilterFunction="contains"

 

 

AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="false" ShowFilterIcon="False" UniqueName="hand_phone"

 

 

HeaderText="Mobile" DataField="hand_phone" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn Display="false" ShowFilterIcon="False" UniqueName="email" HeaderText="Email"

 

 

DataField="email" CurrentFilterFunction="contains" AutoPostBackOnFilter="true">

 

 

<HeaderStyle HorizontalAlign="left" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn AllowFiltering="False" UniqueName="editHyperlink">

 

 

<ItemTemplate>

 

 

<tt class="bodytxt">

 

 

<asp:ImageButton ID="btnedit" AlternateText="Edit" ImageUrl="../frames/images/toolbar/edit.gif"

 

 

runat="server" />

 

 

</ItemTemplate>

 

<%

-- <HeaderStyle Width="30px" />--%>

 

 

<HeaderStyle Width="3%" />

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridClientSelectColumn Visible="false" UniqueName="GridClientSelectColumn">

 

 

 

</radG:GridClientSelectColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings EnableRowHoverStyle="true" AllowColumnsReorder="true" ReorderColumnsOnClient="true" >

 

 

<Selecting AllowRowSelect="true" />

 

 

<Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"

 

 

AllowColumnResize="True" ClipCellContentOnResize="False" ></Resizing>

 

<%

--<Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="500px" SaveScrollPosition="True" />--%>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" />

 

 

<Animation AllowColumnReorderAnimation="true" AllowColumnRevertAnimation="true" />

 

 

</ClientSettings>

 

 

 

</radG:RadGrid>

 

Pavlina
Telerik team
 answered on 02 Sep 2014
5 answers
101 views
Hi Telerik team,
I am having trubble in week view in schduler. when there are lots of appointment in a day same time then my IE Browser goes to hang(Not responding) and Show More... option (navigation) is not showing . But in Month view Show More option is displaying..
Can any one help me sap..
It very argen.

Is any on there from telerik.

Thanks in advanced
Nencho
Telerik team
 answered on 02 Sep 2014
1 answer
121 views
I'm creating dynamic multi header radgrid and inside the rows used colspan as well. everything works fine until i do horizontal scroll. during the horizontal scroll the cells are collapsed and some cells are missing. everything went wrong if we do horizontal scroll. any solution to fix this issue?
Kostadin
Telerik team
 answered on 02 Sep 2014
3 answers
303 views
Hi,

I have created a treelist with treelist select column and allow multi select.

1) When I have selected two nodes, if I select a node by clicking on the node it select that particular node. That behavior is correct.
But when I click the checkbox(select column) it deselects that row. I want to select the row that user clicked irrespective of clicking on the node or
checkbox (select column).

 

2) I have enabled the dragging operation in the treelist. I want to know whether I can delay the start of dragging operation. It seems dragging is
starting as soon as I try to select a node. I can see as user click on the row preview image of dragging node is visible. It disappears quickly. 
But it is does not look nice. This happens with the node selection and slight movement of the mouse which makes start of drag operation

 
I have attached some screenshots for reference

Any help is highly appreciated.

Kostadin
Telerik team
 answered on 02 Sep 2014
0 answers
94 views
Hi,

I am using radpivotgrid control in my webpage to display data from a Olap Cube.
I want to create a new measurement after I have done some calculation on the my data.
The newly created dimension will need to show its value on the pivotgrid.
Do you have any idea on creating a new dimension (perhaps using MDX) and display it on the pivotgrid?  
Thanks.
Silver
Top achievements
Rank 1
 asked on 02 Sep 2014
3 answers
115 views
hi,
need ideas to have a media player which plays selected media file across all pages. have master page and placing radmediaplayer in footer, but player starts playing from beginning when navigating across pages....help is appreciated. ty
Radoslav
Telerik team
 answered on 02 Sep 2014
6 answers
516 views
Hi,
I am using two Rad grids on one of my page. There are some DateTimeColumns created for each of them for DateTime fields. Dates are displayed correctly in DateTime column. 
When I apply filter on DateTime column, it works in one grid but throws exception in another grid, although code is same for both. There is no custom filtering.

For both grids, DateTimeColumn is added programmatically as below:
-------------------------------------------------------------------------------------------------------------------------
GridDateTimeColumn boundColumn = new GridDateTimeColumn();

ProductsGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.PickerType = GridDateTimeColumnPickerType.DatePicker;
boundColumn.FilterControlWidth = Unit.Pixel(100);
boundColumn.HeaderStyle.Width = Unit.Pixel(110);
boundColumn.DataField = col.SystemName;
boundColumn.UniqueName = col.SystemName;
boundColumn.EnableTimeIndependentFiltering = true;
boundColumn.HeaderText = col.FriendlyName;
boundColumn.DataFormatString = "{0:dd/MM/yyyy}";
boundColumn.AutoPostBackOnFilter = true;
boundColumn.SortExpression = col.SystemName;

boundColumn.CurrentFilterFunction = GridKnownFunction.GreaterThanOrEqualTo;
boundColumn.ShowFilterIcon = true;

boundColumn.Display = col.Visible;
-------------------------------------------------------------------------------------------------------------------------

Exception I am getting while filtering by DateTime Column is :

-------------------------------------------------------------------------------------------------------------------------
Exception Type: Telerik.Web.UI.ParseException

Message: Neither of the types 'String' and 'DateTime' converts to the other

Stack Trace:
at
Telerik.Web.UI.ExpressionParser.GenerateConditional(Expression test,
Expression expr1, Expression expr2, Int32 errorPos)

at Telerik.Web.UI.ExpressionParser.ParseIif()

at Telerik.Web.UI.ExpressionParser.ParseIdentifier()

at Telerik.Web.UI.ExpressionParser.ParsePrimaryStart()

at Telerik.Web.UI.ExpressionParser.ParsePrimary()

at Telerik.Web.UI.ExpressionParser.ParseUnary()

at Telerik.Web.UI.ExpressionParser.ParseMultiplicative()

at Telerik.Web.UI.ExpressionParser.ParseAdditive()

at Telerik.Web.UI.ExpressionParser.ParseComparison()

at Telerik.Web.UI.ExpressionParser.ParseLogicalAnd()

at Telerik.Web.UI.ExpressionParser.ParseLogicalOr()

at Telerik.Web.UI.ExpressionParser.ParseExpression()

at Telerik.Web.UI.ExpressionParser.ParseParenExpression()

at Telerik.Web.UI.ExpressionParser.ParsePrimaryStart()

at Telerik.Web.UI.ExpressionParser.ParsePrimary()

at Telerik.Web.UI.ExpressionParser.ParseUnary()

at Telerik.Web.UI.ExpressionParser.ParseMultiplicative()

at Telerik.Web.UI.ExpressionParser.ParseAdditive()

at Telerik.Web.UI.ExpressionParser.ParseComparison()

at Telerik.Web.UI.ExpressionParser.ParseLogicalAnd()

at Telerik.Web.UI.ExpressionParser.ParseLogicalOr()

at Telerik.Web.UI.ExpressionParser.ParseExpression()

at Telerik.Web.UI.ExpressionParser.Parse(Type resultType)

at Telerik.Web.UI.DynamicExpression.ParseLambda(ParameterExpression[]
parameters, Type resultType, String expression, Object[] values)

at Telerik.Web.UI.DynamicExpression.ParseLambda(Type itType, Type resultType,
String expression, Object[] values)

at Telerik.Web.UI.GridDynamicQueryable.Where(IQueryable source, String
predicate, Object[] values)

at Telerik.Web.UI.GridDataTableFromEnumerable.FillData35()

at Telerik.Web.UI.GridDataTableFromEnumerable.FillData()

at Telerik.Web.UI.GridResolveEnumerable.Initialize()

at Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized()

at Telerik.Web.UI.GridResolveEnumerable.get_DataTable()

at Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner,
IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns,
GridColumnCollection presentColumns, String[] additionalField, Boolean
retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView
owner, IEnumerable enumerable, Boolean caseSensitive, Boolean
autoGenerateColumns, GridColumnCollection presentColumns, String[]
additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView
owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean
autoGenerateColumns, GridColumnCollection presentColumns, String[]
additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText)

at Telerik.Web.UI.GridTableView.get_ResolvedDataSource()

at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)

at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource,
Boolean useDataSource)

at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable
data)

at
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable
data)

at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback)

at System.Web.UI.WebControls.DataBoundControl.PerformSelect()

at Telerik.Web.UI.GridTableView.PerformSelect()

at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()

at Telerik.Web.UI.GridTableView.DataBind()

at Telerik.Web.UI.GridTableView.Rebind()

at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)

at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)

at Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object
commandArgument)

at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

-------------------------------------------------------------------------------------------------------------------------

Can someone please let me know the reason for this exception?

Best Regards
Tushar
Eyup
Telerik team
 answered on 02 Sep 2014
3 answers
151 views
Hi,

I am using telerik version 2013.3.1324.35.  I tried to insert appointment without clicking any button. Please see attached image for example. It worked fine if I use tab key after I fill in data. I would like it to be save and show data in schedule when I click on another timeslot after I fill in data. 




 Thanks in advance.

Best regards,
Ei 
Ei Wai
Top achievements
Rank 1
 answered on 02 Sep 2014
1 answer
168 views
I would like a telerik tool not to place blank lines between sections of an editor when the user clicks the 'save' button.
I am new to working with Telerik tools.
I have an existing VB.net 2010 web application that uses telerik tools. This application has a user interface for the users to edit 'templates'. When you hit the save button on the application, blank lines are automatically inserted between various parts of a 'letter' that is being generated.

When the editor is being used, there are tabs for preview, html, and design.

I have gone into the 'html' editor to remove the extra <br></br> tags. However the same tags keep appearing. Thus I am wondering if you can tell me what I can do to keep the blank lines from appearing?

To help me, I thought I would show you some code that is being used so you can see where the telerik tool is being accessed;
​Imports System.Data
Imports System.Reflection
Imports System.Windows.Forms
Imports Telerik.Web.UIImports System.Web.Script.Services
Imports System.Web.Script.Serialization
Imports System.Web.Services
Partial Class edittemplates_default
    Inherits System.Web.UI.Page    Protected _master As MasterPage#Region "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load"
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        _master = CType(Page.Master, MasterPage)
        _master.PageTitle = "Edit Templates"        If Not Page.IsPostBack Then
            If (SiteUserManager.SessionUser IsNot Nothing) Then                LoadTemplates()             
                LoadVariables()
             
            Else                'pnlEditor.Enabled = False
                'pnlEditor.Visible = False            End If
        End If        Master.Page.Title = "Login"    End Sub
#End Region#Region "Protected Sub LoadTemplates()"
    Protected Sub LoadTemplates()
        Dim et As EditTemplates = New EditTemplates()
        Dim dt As DataTable = et.SelectTemplates()        For i = 0 To dt.Rows.Count() - 1
            ddlTemplates.Items.Add(New ListItem(dt.Rows(i)(dt.Columns(1).ColumnName()), dt.Rows(i)(dt.Columns(0).ColumnName())))
        Next    End Sub
#End Region
#Region "Protected Sub LoadVariables()"
    Protected Sub LoadVariables()
        Dim et As EditTemplates = New EditTemplates()
        Dim dt As DataTable = et.SelectAtnLtrVariables()        For i = 0 To dt.Rows.Count() - 1
            rlbVariables.Items.Add(New RadListBoxItem(dt.Rows(i)(dt.Columns(1).ColumnName()), dt.Rows(i)(dt.Columns(0).ColumnName())))
        Next    End Sub
#End Region
#Region "Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveTemplate.Click"
    Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveTemplate.Click
        Dim et As EditTemplates = New EditTemplates()
        If ddlTemplates.SelectedValue <> 0 Then
            et.UpdateTemplate(ddlTemplates.SelectedValue, ddlLanguage.SelectedValue, rEditor.Content.ToString())
        End If
    End Sub
#End Region
Ianko
Telerik team
 answered on 02 Sep 2014
1 answer
124 views
Hello there.

I'm rather new to the telerik world so please bare with me.
C#, Asp.net.

Im currently having a RadGrid load my content from some DObjectDataSource.

Now i want to make my own insert template, with a asp textbox.
I've done this like so:

RadGrid > MasterTableView > Columns > GridTemplateColumn > InsertItemTemplate.

Within the InsertItemTemplate i have created a asp textbox:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

From my codebehind id like to be able to acess this to set it's value and later pull the value and save it to the database.

Is anyone able to make me a working example of getting the contents of a asp textbox from within the InsertItemTemplate? 
It would be much appriciated.

Thanks in advance.

Pavlina
Telerik team
 answered on 01 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?