Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
364 views
Hello,
           I have used radgrid on my page.
           I have four GridBoundColumn which are bound with database column field.

           e.g>.
                   <telerik:GridBoundColumn DataField="Col1" HeaderText="Col1" ReadOnly="True" SortExpression="Col1"
                                            UniqueName="Col1">
                   </telerik:GridBoundColumn>
           Now, i want to retrive this GridBoundColumn values i.e Col1 Value  in Grid's ItemCommand Event
           i.e.,
                    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
                    {
                             // Col1 Value
                    }
          

    Please reply me as soon as possible

Thanks & Regards,
Kunal Patel    


                           
Tsvetoslav
Telerik team
 answered on 29 Jan 2010
1 answer
54 views
All,
Using the example online, I am able to get the DragDrop feature of the Grid working just fine in it's own page. However, when I put it inside of a control instead of a page and bind the control to the TabStrip/MultiPage using Ajax (so that only one control is ever loaded at a time) I receive a javascript error from within the Telerik .js files that it cannot find the grid. I have tried everything I can think of to figure this out, including walking through the javascript at run-time) but I can't seem to produce any errors from the javascript on the control itself.

Has anyone else been able to get drag/drop grids working in an Ajaxified MultiPage? If so, can you please post how. I'm hoping that I'm just missing something small and mundane...

Thanks,
Tom
Pavlina
Telerik team
 answered on 29 Jan 2010
1 answer
199 views
Hi. I m trying to create page with new rad grid control i drag the grid from tool box page and attached the table code behind.
I run the page it works fine. But in design mode it gives this erros. I attached the image file with this.

Could not load file or assembly 'Telerik.Web.UI, Version=2009.3.1208.20, Culture-neutral, PublicKeyToken=121fae78165ba3d4'..

Please guide me in this to run smooth.

Thanks
Kaushik
Pavlina
Telerik team
 answered on 29 Jan 2010
1 answer
72 views
hi

i'm having a trouble on adding a returning value from dialog on my grid usercontrol edit form

can u help me create 1?

because when i tried to integrate the retuning value thing i got an error saying that my functions arent defined.

thanks in advance
Tsvetoslav
Telerik team
 answered on 29 Jan 2010
2 answers
76 views
I am trying to get my treeview to databind using the settings below. I keep getting the error listed below.
"A critical error has occurred.
This constraint cannot be enabled as not all values have corresponding parent values."


If I remove DataFieldParentID the treeview does bind and shows a list. I tried using 0 and NULL for my parents. Any suggestions?

List I get if I remove the parentID:
Management
General
Detail Orders
Test


RadTreeView1.DataSource = tree.Treeview

RadTreeView1.DataFieldID =

"rID"

 

RadTreeView1.DataFieldParentID =

"ParentID"

 

RadTreeView1.DataTextField =

"Text"

 

RadTreeView1.DataValueField =

"url"

 

RadTreeView1.DataBind()



rID  ParentID    Text                  url
1    0               Management     NULL
2    0               General             NULL
3    2               Detail Orders    ~/Test.aspx  
4    1               Test                  ~/Test.aspx  
Dwayne Starkey
Top achievements
Rank 1
 answered on 29 Jan 2010
3 answers
80 views
I set a AllowFilteringByColumn property to be "true" on Client-side but when I put character on filter box and choose any filtering function, it doesn't work.

Here is my Client-Side code.

<%@ Page Language="C#" MasterPageFile="Site2.Master" AutoEventWireup="true" CodeBehind="Roles.aspx.cs" 
    Inherits="TechSphere.KoolKeeper.Administrator.RolesForm" %>  
 
<%@ MasterType VirtualPath="Site2.Master" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">  
 
    <script type="text/javascript">  
        function showMember(roleName) {  
            showDialog('Dialog/RoleMember.aspx?role=' + roleName);  
            return false;  
        }  
        function showPermission(roleName) {  
            showDialog('Dialog/RolePermission.aspx?role=' + roleName);  
            return false;  
        }  
    </script>  
 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="grdRole">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="grdRole" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
        </AjaxSettings>  
    </telerik:RadAjaxManagerProxy>  
    <telerik:RadGrid ID="grdRole" runat="server" AllowPaging="False" AutoGenerateColumns="False" 
        OnNeedDataSource="grdRole_NeedDataSource" PageSize="15" OnInsertCommand="grdRole_InsertCommand" 
        OnDeleteCommand="grdRole_DeleteCommand" OnItemDataBound="grdRole_ItemDataBound"   
        BorderStyle="None" GridLines="None" Width="300px" EnableEmbeddedSkins="false" AllowFilteringByColumn="true">  
        <PagerStyle Mode="NextPrevAndNumeric" />  
        <MasterTableView CommandItemDisplay="Top"  InsertItemDisplay="Top" AllowAutomaticDeletes="True" 
            InsertItemPageIndexAction="ShowItemOnCurrentPage" >  
            <CommandItemSettings AddNewRecordText="Create Role" />  
            <RowIndicatorColumn Visible="False">  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn Visible="False" Resizable="False">  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </ExpandCollapseColumn>  
            <Columns>  
                <telerik:GridBoundColumn DataField="ColumnRole" HeaderText="Role Name" UniqueName="ColumnRole">  
                    <ItemStyle Width="300px" />  
                </telerik:GridBoundColumn>  
                <telerik:GridTemplateColumn UniqueName="ColumnPermission" Visible="false">  
                    <ItemTemplate>  
                        <techsphere:RolloverButton ID="ibPermission" runat="server" SkinID="ButtonPermission" 
                            UseSubmitBehavior="false" />  
                    </ItemTemplate>  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn UniqueName="ColumnMembers" HeaderText="Member">  
                    <ItemTemplate>  
                        <techsphere:RolloverButton ID="ibUser" runat="server" SkinID="ButtonUsers" ToolTip="Members" 
                            UseSubmitBehavior="false" />  
                    </ItemTemplate>  
                </telerik:GridTemplateColumn>  
                <telerik:GridTemplateColumn UniqueName="ColumnDelete" HeaderText="Delete">  
                    <ItemTemplate>  
                        <techsphere:RolloverButton ID="ibDelete" runat="server" CommandName="Delete" SkinID="ButtonDelete" 
                            UseSubmitBehavior="true" />  
                    </ItemTemplate>  
                </telerik:GridTemplateColumn>  
            </Columns>  
            <EditFormSettings EditFormType="Template">  
                <EditColumn ButtonType="ImageButton">  
                </EditColumn>  
                <FormTemplate>  
                    <telerik:RadTextBox ID="tbRole" runat="server" EmptyMessage="Enter role name" InvalidStyleDuration="100" 
                        Width="150px" MaxLength="255" Skin="Web20" >  
                        <EmptyMessageStyle Font-Italic="True" />  
                    </telerik:RadTextBox>  
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbRole" 
                        ErrorMessage="*" SetFocusOnError="True"></asp:RequiredFieldValidator>  
                    <techsphere:RolloverButton ID="ibInsert" runat="server" SkinID="ButtonInsert" CommandName="PerformInsert" />  
                    <techsphere:RolloverButton ID="ibCancel" runat="server" SkinID="ButtonCancel" CausesValidation="False" 
                        CommandName="Cancel" />  
                </FormTemplate>  
            </EditFormSettings>  
            <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="Page: {4} &amp;nbsp;items {2}-{3} of {5}." 
                PageButtonCount="5" />  
        </MasterTableView>  
        <ClientSettings>  
            <Selecting AllowRowSelect="True" />  
        </ClientSettings>  
        <FilterMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
        </FilterMenu>  
    </telerik:RadGrid>  
 
</asp:Content>  
 

Code behind,
using System;  
using System.Web.Security;  
using Telerik.Web.UI;  
 
namespace TechSphere.KoolKeeper.Administrator  
{  
    public partial class RolesForm : BasePage  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                Master.SelectedMenu("Roles");  
            }  
        }  
 
        protected void grdRole_DeleteCommand(object source, GridCommandEventArgs e)  
        {  
            string roleName = (e.Item as GridDataItem)["ColumnRole"].Text;  
            Roles.DeleteRole(roleName);  
        }  
 
        protected void grdRole_InsertCommand(object source, GridCommandEventArgs e)  
        {  
            RadTextBox tbRole = e.Item.FindControl("tbRole"as RadTextBox;  
            Roles.CreateRole(tbRole.Text);  
        }  
 
        protected void grdRole_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            GridDataItem item = e.Item as GridDataItem;  
            if (item != null)  
            {  
                string roleName = item["ColumnRole"].Text;  
                string lowerName = roleName.ToLowerInvariant();  
                RolloverButton button = item["ColumnPermission"].FindControl("ibPermission"as RolloverButton;  
                if (lowerName.Equals("administrators"))  
                {  
                    button.Visible = false;  
                }  
                else 
                {  
                    button.OnClientClick = "return showPermission('" + roleName + "');";  
                }  
 
                button = item["ColumnMembers"].FindControl("ibUser"as RolloverButton;  
                if (lowerName.Equals("everyone"))  
                {  
                    button.Visible = false;  
                }  
                else 
                {  
                    button.OnClientClick = "return showMember('" + roleName + "');";  
                }  
 
                button = item["ColumnDelete"].FindControl("ibDelete"as RolloverButton;  
                if (lowerName.Equals("administrators") || lowerName.Equals("everyone"))  
                {  
                    button.Visible = false;  
                }  
                else 
                {  
                    button.OnClientClick = string.Format("if(!confirm('Are you sure to delete role name \\'{0}\\'?')) return false;", roleName);  
                }  
            }  
        }  
 
        protected void grdRole_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            grdRole.DataSource = Roles.GetAllRoles();  
        }  
 
    }  
}  
 

Could anyone suggest me anything wrong? I tried filtering with my another page but it works!
Tsvetoslav
Telerik team
 answered on 29 Jan 2010
1 answer
112 views
Hi All,

Should be an easy one, is there any way to press a button in html mode which applies some sensible code formatting / indenting like vs or dreamweaver?  The editor speel mentions it does something like this but cant find it and would be VERY helpful.

Thank you
:)
Dobromir
Telerik team
 answered on 29 Jan 2010
1 answer
120 views
iam taking radscheduler and radgrid. i have the  linkbutton  in the  appointment..when i click the linkbutton  how can i block remaning appointments..
Princy
Top achievements
Rank 2
 answered on 29 Jan 2010
1 answer
82 views
I'm currently populating a hierarchical radgrid with two SqlDataSources (one for my MasterTableView and the other for my
DetailsView). I have the values of my DataKeyNames MasterKeyFIeld, DataKeyFiled all matching. Initially the page works as
expected. In addition, I have a few dropdownlists on the page that I would like to re-arrange the data on my grid by soon after
the user clicks a button. Once the user chooses the desired options from the dropdownlists and clicks the button, through codebehind
I'm changing the SelectCommand of the sqlDataSource and doing a RadGrid1.DataBind() on both DataSources.
my code in my vb page looks something like this:

SqlDataSource1.SelectCommand = "Command"
RadGrid1.DataBind()
SqlDataSource2.SelectCommand = "Command"
RadGrid1.DataBind()

After the button click, The MasterTableView applies the new SqldataSource that I set in codebehind(SqlDataSource1), however, my DetailsView still contains the information from my initial SqlDataSource2 Select Statement. I need that Data to be populated as well.
Any help/suggestions i would really appreciate, thank you
Pavlina
Telerik team
 answered on 29 Jan 2010
1 answer
507 views
Hi,

I have seen some examples about changing the look of a link column by using CSS selectors. However, we have a grid that will be used on different pages for different data.
We need to be able to set a CSS class on the column the same way it can be set for the Grid itself or the Header and Footer.

I cannot see a CssClass property on GridHyperlinkColumn. Is there any other way of specifying the CSS class for the column?

Thanks,
Dewang
Dimo
Telerik team
 answered on 29 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?