Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
90 views
Hi..

Is there any way to disable all the previous days in a RadCalendar?

Thanks,
Sigma
Princy
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
141 views
Dear All,

        We are developing product in asp.net using c sharp in 4-tier architecture namely DataAccessLayer,BusinessLayer,ServiceLayer and PresentationLayer.How to bind multiple Roles and RoleFeaures in RadGrid and here Roles are parent and rolefeature are child when i click or expand roles,list of role feature should be display also Every role have rolefeatures and user can be assign and un-assign role features to particular Role by Checkbox.
    Here i have three methods are selectRoles,selectRoleFeatures and Assign-UnassginRoleFeatures which is allocated to particular user.
how to implement this which kind of grid suitable for this and what is code to aspx and aspx.cs pages..


My aspx page code is
 
 <telerik:RadGrid ID="Roles" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleId" HeaderText="ParentRoleId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
 
         <telerik:RadGrid ID="RoleFeature" runat="server" AutoGenerateColumns="false">
        <MasterTableView DataKeyNames="ID">
        <Columns>
        <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Name") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("Description") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="StatusName" HeaderText="StatusName">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("StatusName") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
         <telerik:GridTemplateColumn UniqueName="ParentRoleFeatureId" HeaderText="ParentRoleFeatureId">
        <ItemTemplate>
            <asp:Label ID="lblFirstName" runat="server" Text='<%#Eval("ParentRoleFeatureId") %>' />
        </ItemTemplate>
        </telerik:GridTemplateColumn>
        </Columns>
        </MasterTableView>
        </telerik:RadGrid>
My aspx.cs code is
protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              ApplicationProcess a = new ApplicationProcess();
              Roles.DataSource = a.GetRoles();
              Roles.DataBind();
 
              RoleFeature.DataSource = a.GetRoleFeatures(1);
              RoleFeature.DataBind();
          }
 
      }

Thanks in Advance..!
Susi
Top achievements
Rank 1
 asked on 02 Jul 2012
1 answer
204 views
The rblHovered css class get's applied to list items in the listbox when I hover over the list item. How do you remove this effect? I can't seem to override the css :hover.
Princy
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
65 views
Hi,

I am using RadGrid control on my web application.
I tried to change hidden field value on server side when changing the grid page index, but the new value is not passed to the client.
I read and found out that I can recognize a page index changed inside the ajax function OnRequestStart.
How can I recognize that the trigger for the OnRequestStart function is really the grid page index change?

Thanks.
Covertix
Top achievements
Rank 1
 asked on 01 Jul 2012
4 answers
333 views

Hi team,

I'm using radgrid to export to excel file. Everything is ok except one thing. I would like to format the value as currency style but when exporting done the style is Accounting

I catch the event

grid_ExcelExportCellFormatting(object source
                               , ExcelExportCellFormattingEventArgs e)

and I handled in this as below

e.Cell.Style["mso-number-format"] = "Currency";

Please help!
Kim.

zorro
Top achievements
Rank 1
 answered on 01 Jul 2012
3 answers
122 views
I have this rad grid, that is custom and it spans off the page. I checked at other solutions here in telerik forums but none have worked so far. Please see here my mark up and a screen shot of the issue

 

 

 

 

 

                          

 

 

 

Screenshot Attached



Edwin
Top achievements
Rank 1
 answered on 30 Jun 2012
2 answers
220 views
Trying to wrap the radgrid as a custom control in an ASCX control file but I'm not having much luck.
I was able to set the datasource, and get data, but I'm trying to customize the columns now, and it  doesn't recognize MasterTableView 

How do I do this?
Thanks,
Simone


<%@ Page Title="" Language="vb" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="test.aspx.vb" Inherits="SMTProMockup.test" %>
<%@ Register TagPrefix="mockup" TagName="CustomRadGrid" Src="CustomRadGrid.ascx" %>

...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <mockup:CustomRadGrid id="grdPrograms" runat="server" >
    <MasterTableView DataKeyNames="ID" CommandItemDisplay="Bottom" AutoGenerateColumns="False" FilterExpression="Active = true">
            <Columns>
                <telerik:GridCheckBoxColumn DataField="Active" FilterControlAltText="Filter Active column"
                    HeaderText="Active" ItemStyle-Width="50" DefaultInsertValue="true" UniqueName="Active">
                    <ItemStyle Width="50px"></ItemStyle>
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" FilterControlWidth="150"
                    HeaderText="Name" >
                </telerik:GridBoundColumn>
            </Columns>


    </MasterTableView>
</mockup:CustomRadGrid>
</asp:Content>

Edwin
Top achievements
Rank 1
 answered on 30 Jun 2012
1 answer
114 views
Hello,

I have a RadGrid that have 3 command link buttons. the first 2 need to do post back to execute their function, and that is working ok.

However, the third link needs to execute only a javascript function on the client, without doing a post back. Currently, this is the way my link column looks

<telerik:GridTemplateColumn UniqueName="DDE1" ReadOnly="true" AllowFiltering="false" HeaderText="DateEntry1">
	<ItemTemplate>
		<asp:LinkButton ID="link3" runat="server" ToolTip='<%# Eval("NumberOfSeconds1")%>' Text='<%# Eval("NumberOfSeconds1")%>' OnClientClick='<%#Eval("infoPathEntry1", "redirectInfopath(\"{0}\")")%>' />						    
	</ItemTemplate>
	<ItemStyle Font-Size="Large" />
</telerik:GridTemplateColumn>            

The problem is that the onclientclick is executed, but then it does the server trip, refreshes the page and removes the jquery alert I generated.

Any ideas how can I achieve this?
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Jun 2012
1 answer
71 views

Split start with , end with ,
Content Is "Company : New Gene Features : )
split ("Company :","Features :")
How I check Like

Thanks Advance,
Mohamed.
New
Top achievements
Rank 1
 answered on 30 Jun 2012
3 answers
152 views

Telerik Team,

I am using telerik grid in my application.

When the filter for the grid is shown on when I check the display filter checkbox and I click on Add New Record  or Edit the Record then I get the following error stated below.

Line: 6

Error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

My code is as below

<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="ScriptManager" runat="server" />
       <fieldset class="configureFieldsetClass">
                                <legend>Grid</legend>
                                    
                                  <table class="configureTableClass">
                                    <tr>
                                        <td align="right">
                                            <asp:CheckBox ID="CheckBox1" Text="Display Filter" runat="server" OnCheckedChanged="displayfilter_checkchanged"
                                                AutoPostBack="true" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <telerik:RadGrid ID="dgGrid" runat="server" AllowSorting="True" FilterItemStyle-HorizontalAlign="Center"
                                                AllowFilteringByColumn="false" AllowPaging="true" PageSize="10" AutoGenerateColumns="false"
                                                AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                                                OnNeedDataSource="dgGrid_NeedDataSource" OnInsertCommand="dgGrid_ItemInserted"
                                                OnUpdateCommand="dgGrid_ItemInserted" OnDeleteCommand="dgGrid_ItemInserted">
                                                <GroupHeaderItemStyle></GroupHeaderItemStyle>
                                                <FilterMenu>
                                                </FilterMenu>
                                                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
                                                <MasterTableView BorderWidth="0" ShowFooter="False" EditMode="InPlace" GridLines="Both"
                                                    Font-Names="Arial" CommandItemDisplay="top" AutoGenerateColumns="false" InsertItemDisplay="Bottom"
                                                    DataKeyNames="PARAM_GRID_ITEM_ID" CommandItemSettings-ShowRefreshButton="false"
                                                    CommandItemSettings-AddNewRecordText="Add New Record">
                                                    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
                                                    <RowIndicatorColumn Visible="False" UniqueName="RowIndicator">
                                                        <HeaderStyle></HeaderStyle>
                                                        <ItemStyle></ItemStyle>
                                                    </RowIndicatorColumn>
                                                    <Columns>
                                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="Images/Edit.jpg"
                                                            ItemStyle-Wrap="true" HeaderStyle-Width="8%">
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridBoundColumn UniqueName="COLUMN_NAME" SortExpression="COLUMN_NAME" HeaderText="Column"
                                                            DataField="COLUMN_NAME" DataType="System.String" HeaderStyle-Width="20%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="CAPTION_NAME" SortExpression="CAPTION_NAME" HeaderText="Caption"
                                                            DataField="CAPTION_NAME" DataType="System.String" HeaderStyle-Width="25%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridNumericColumn UniqueName="COLUMN_ORDER" SortExpression="COLUMN_ORDER" HeaderText="Column Order"
                                                            DataField="COLUMN_ORDER" HeaderStyle-Width="23%">
                                                        </telerik:GridNumericColumn>
                                                        <telerik:GridDropDownColumn HeaderText="Data Type" UniqueName="PARAM_TYPE_ID" DataField="PARAM_TYPE_ID"
                                                            ListTextField="PARAM_TYPE" ListValueField="PARAM_TYPE_ID" DataSourceID="DsDataType"
                                                            SortExpression="PARAM_TYPE_ID" HeaderStyle-Width="20%">
                                                        </telerik:GridDropDownColumn>
                                                        <telerik:GridBoundColumn UniqueName="PARAM_GRID_ID" SortExpression="PARAM_GRID_ID" HeaderText="PARAM_GRID_ID"
                                                            DataField="PARAM_GRID_ID" DataType="System.String" Display="false" HeaderStyle-Width="1%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="PARAM_GRID_ITEM_ID" SortExpression="PARAM_GRID_ITEM_ID"
                                                            HeaderText="PARAM_GRID_ITEM_ID" DataField="PARAM_GRID_ITEM_ID" DataType="System.String"
                                                            Display="false" HeaderStyle-Width="1%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                                            ItemStyle-HorizontalAlign="Center" UniqueName="DeleteColumn" HeaderStyle-Width="5%"
                                                            ConfirmText="Confirm that you want to delete the record?" ImageUrl="Images/Delete1.gif"
                                                            ConfirmTitle="Delete ?">
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                    <EditFormSettings>
                                                        <EditColumn ButtonType="ImageButton" HeaderStyle-Width="50px" />
                                                    </EditFormSettings>
                                                </MasterTableView>
                                                <HeaderStyle></HeaderStyle>
                                                <SelectedItemStyle></SelectedItemStyle>
                                                <ItemStyle VerticalAlign="Top"></ItemStyle>
                                                <FooterStyle></FooterStyle>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ClientSettings EnableRowHoverStyle="true">
                                                    <ClientEvents OnRowMouseOver="RowMouseOver" OnCommand="OnCommand" OnRowMouseOut="RowMouseOut" />
                                                    <Selecting AllowRowSelect="True"></Selecting>
                                                    <Resizing AllowRowResize="true" EnableRealTimeResize="false" ResizeGridOnColumnResize="false"
                                                        AllowColumnResize="false"></Resizing>
                                                </ClientSettings>
                                            </telerik:RadGrid>
                                        </td>
                                    </tr>
                                </table>
                              
                            </fieldset>
    </form>
</body>
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 eControls;
using System.Data;
using eDataAccess;
using SRSBO;
using eBusinessObjects;
using System.Text.RegularExpressions;
 
public partial class Demo : System.Web.UI.Page
{
    public int NodeId = -1;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!(int.TryParse(Request.QueryString["NODEID"], out NodeId)))
        {
            NodeId = -1;
        }
        
    }
 
    public void displayfilter_checkchanged(object s, EventArgs e)
    {
        if (CheckBox1.Checked)
        {
            dgGrid.MasterTableView.AllowFilteringByColumn = true;
 
        }
        else
        {
            dgGrid.MasterTableView.AllowFilteringByColumn = false;
 
        }
        dgGrid.GroupingSettings.CaseSensitive = false;
 
        dgGrid.Rebind();
 
 
    }
 
    protected void dgGrid_ItemInserted(object source, GridCommandEventArgs e)
    {
 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            ConfigureParamBO objConfigureParamBO = new ConfigureParamBO();
                       
            ParamGridItemBO pgiBO = new ParamGridItemBO();
            ParamGridBO objParamGridBO = new ParamGridBO();
            DataTable dtGridDataId = objParamGridBO.GetGridDataIdForNodeId();
            if (dtGridDataId.Rows.Count == 0)
            {
                Boolean isSuccess = SaveGridData();
                if (isSuccess)
                {
                   
                }
            }
            dtGridDataId = objParamGridBO.GetGridDataIdForNodeId(Convert.ToInt32(hidNodeId.Value));
             
            ParamGridBO pgBO = new ParamGridBO();
            Dictionary<string, object> Adds = new Dictionary<string, object>();
            Adds.Add("PARAM_GRID_ID", hidParamGridId.Value.ToString());
            
            dgGrid.InsertGridRecords(source, e, pgiBO, Adds);
           
            dgGrid.Rebind();
        }
    }
 
    protected void dgGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
 
        ParamGridItemBO pgiBO = new ParamGridItemBO();
        dgGrid.DataSource = pgiBO.getDgGridDataSource(NodeId);
    }
 
    
 
}

A demo source code would be of great help.

Can you please let me know the work around for it?

Thanking you in advance.

Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Jun 2012
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?