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

The Font Names the telerik dll  providing is hardly 7. But my requirement is to have font names similar to that of MSWord. How to add custom font names to the fontname dropdown box. or else can you provide a dll which has many font names similar to that of MSWord.


Thanks
Srinivas
Rumen
Telerik team
 answered on 19 Aug 2008
3 answers
312 views
Hi,

I'm having a problem with edit button in the RadGrid. Everything works fine when I use a ButtonType of linkButton, but when I switch the Button type to ImageButton, I get the following error.

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

I don't understand why everything works fine with a linkbutton but not with an imagebutton. Does some different event get fired with an ImageButton?

The aspx code is as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="gridTest.aspx.cs" Inherits="<...our path here...>Presentation.Web.UI.InventoryManagement.gridTest" %> 
 
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <rad:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
            AutoGenerateColumns="False"   
EnableAJAX="True" GridLines="None" Skin="Outlook2007">  
            <ClientSettings> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
            <MasterTableView DataKeyNames="StaustOutcomeId" CommandItemDisplay="Bottom" EditMode="InPlace" > 
                <Columns> 
                <rad:GridButtonColumn CommandName="Edit" UniqueName="Edit" Text="Edit" ButtonType="ImageButton" 
                HeaderText="Edit">  
                </rad:GridButtonColumn> 
<rad:GridBoundColumn DataField="Outcome" HeaderText="Outcome" SortExpression="Outcome" 
                        UniqueName="Outcome">  
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status" 
                        UniqueName="Status">  
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" 
                        UniqueName="Description">  
                    </rad:GridBoundColumn> 
                    <rad:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean" HeaderText="IsActive" 
                        SortExpression="IsActive" UniqueName="IsActive">  
                    </rad:GridCheckBoxColumn> 
                    <rad:GridBoundColumn DataField="SalesChannel" HeaderText="SalesChannel" SortExpression="SalesChannel" 
                        UniqueName="SalesChannel">  
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn DataField="StaustOutcomeId" DataType="System.Int32" HeaderText="StaustOutcomeId" 
                        ReadOnly="True" SortExpression="StaustOutcomeId" UniqueName="StaustOutcomeId">  
                    </rad:GridBoundColumn> 
                </Columns> 
                <ExpandCollapseColumn Resizable="False" Visible="False">  
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <RowIndicatorColumn Visible="False">  
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                   
            </MasterTableView> 
        </rad:RadGrid> 
          
    </div> 
    </form> 
</body> 
</html> 
 


And the code behind is
using System;  
using System.Data;  
using System.Configuration;  
using System.Collections;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using System.Collections.Generic;  
 
namespace <...our path here...>.Presentation.Web.UI.InventoryManagement  
{  
    public partial class gridTest : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            List<StatusOtcm> lst = new List<StatusOtcm>(3);  
            for (int i=0; i<3; i++)  
                lst.Add(new StatusOtcm());  
 
            RadGrid1.DataSource = lst;  
            RadGrid1.DataBind();  
        }  
    }  
 
    class StatusOtcm  
    {  
        public string Description  
        {  
            get { return "some Description"; }  
 
        }  
        public string Outcome  
        {  
            get { return "OC"; }  
 
        }  
 
        public string Status  
        {  
            get { return "Complete"; }  
 
        }  
        public bool IsActive  
        {  
            get { return true; }  
 
        }  
        public string SalesChannel  
        {  
            get { return "P"; }  
 
        }  
        public int StaustOutcomeId  
        {  
            get { return 25;}  
 
        }  
    }  
}  
 


Any ideas?

Thanks,

Tom
Konstantin Petkov
Telerik team
 answered on 19 Aug 2008
0 answers
83 views
Hi all,
I've a error when I using RadCombobox.
My problem:
I' ve two Combobox on form. When the first Combobox submit() then the twice combobox binding data base on the first combobox value.

Everythings is OK, but when I config IIS with default document (Normal: http://localhost/ecommerce/default.aspx  after config: http://localhost/ecommerce/)
 And then I've error when I submit() the first combobox.
Please help me!
Trong
Top achievements
Rank 1
 asked on 19 Aug 2008
1 answer
55 views
Hi,

I would like to know if I can bind RAD grid with MOSS 2007 list as datasource.

If yes, can you help me provide me some resources which helps me in acheiveing the same.

Regards,
Steve.
Yavor
Telerik team
 answered on 19 Aug 2008
3 answers
188 views
I'm sure someone can quickly point me in the right direction, but I've been tearing my hair out (something I can ill afford to do).

I have a RadGrid with columns arranged
GridTemplateColumn\GridBoundColumn\GridBoundColumn\GridTemplateColumn
Column 1 has an ASP CheckBox, column 4 an ASP DropDownList.

If the checkbox is unchecked, the dropdown is disabled; checking enables the dropdown. That's all good.

I also have a RadContextMenu on the Grid. I would like to enable or disable the menu items dependent on the state of the checkbox. This would need to be client-side JavaScript, within the OnClientItemClicked event (that's where I inspect the Menu item to see what I need to do).

I haven't been able to find anything about how to access a control within a GridTemplateColumn (maybe I've just not been looking in the right place?). I can get at values if I add them to ClientDataKeyNames, but that's not appropriate.

I've managed a workaround using a hidden field, but I'd like the code to simply check the enabled state, for reliability reasons (checking the value of a certain field isn't quite as robust as I'd wish).

paul
Yavor
Telerik team
 answered on 19 Aug 2008
1 answer
98 views
Hi,

I have a RagGrid with many child grids at the same level and im trying to hide the child grid if it is empty but im running into problems identifying the empty grids

I have tried looking at prerender and detailtable databind then looking at the items in the grid where the item count is 0 then hiding based on this but the grids always have an item count of 0 they always hide the grid even when they have data in them

e.g.

     GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView);
     foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
     {
       foreach (GridTableView nestedView in nestedViewItem.NestedTableViews)
       {
         if (nestedView.Items.Count == 0)
         {

         if (nestedView.Items.Count == 0)
         {
           nestedView.Visible  = false;

         }


Any Ideas?

Thanks in advance
Yavor
Telerik team
 answered on 19 Aug 2008
2 answers
148 views
I've just started incorporating RadGrid into my web application.
One of the problems i've incountered (as my previous datagrid exp. was limited to winforms) was that the status bar text does not correpond with the overall direction of the grid (although i've already noticed that i had to set the align in the ItemStyle of each column to right).
After a few interrogations of my own, i've noticed that you encapsulated the text of the status using a span with the style property - float:left.
Thus the status text ignores the overall style.
Is there anything i can do to fix it?
tnx for any reply...
Roy
Top achievements
Rank 1
 answered on 19 Aug 2008
1 answer
134 views
Hi,

How do I get the tabstrip object in Javascript?  I have a tabstrip on my usercontrol and I used $find function to find the object but it always return null.

Here's my code:

<

telerik:RadTabStrip ID="testTS" runat="server" Skin="Office2007">
<Tabs>
<telerik:RadTab runat="server" ID="tab1" Text="tab 1" />
</Tabs>
</
telerik:RadTabStrip>

...

var

testTS = $find( "<%=testTS.ClientID %>" );

Thank you.



vn
Top achievements
Rank 1
 answered on 19 Aug 2008
2 answers
278 views
I have a detail table that shows all the coaches associated with a team. The details table also has a 'delete' column where I can remove that coach from a team. In the grdTeamToCoach_ItemCommand, how do I get the value of the row that is clicked in the detail table (specifically the 'teamtocoachkey')?

Thanks!
Susan

<

MasterTableView Width="100%" DataKeyNames="TeamKey">

<DetailTables>

<telerik:GridTableView Width="100%" runat="server" Name="AssignedCoaches" DataKeyNames="TeamToCoachKey">

<ParentTableRelation>

<telerik:GridRelationFields DetailKeyField="TeamKey" MasterKeyField="TeamKey" />

</ParentTableRelation>

<Columns>

<telerik:GridBoundColumn DataField="CoachAndType"/>

<telerik:GridTemplateColumn HeaderText="Remove" ItemStyle-HorizontalAlign=center>

<ItemTemplate>

<asp:ImageButton CommandName="DeleteRecord" TabIndex=-1 id="ibDelete" imageUrl="../images/delete.png" CausesValidation="False" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="TeamToCoachKey" Visible="false"/>

</Columns>

</telerik:GridTableView>

</DetailTables>

<Columns>

<telerik:GridBoundColumn HeaderText="Team and # of Coaches" DataField="TeamAndCount" UniqueName="TeamToCoachKey"/>

<telerik:GridBoundColumn DataField="TeamKey" Visible="false"/>

</Columns>

</MasterTableView>

Susan
Top achievements
Rank 1
 answered on 18 Aug 2008
7 answers
187 views
I'm having some problems getting my formatting right (maybe formatting is not the right word).

I have a grid that's 600px wide but only have 400px to display it in.

So I'm setting the width of the grid to 400px and have the scroll option on.

My grid is 400px and get the H-Scroll bar and you get to scroll left and right in the browser, where I have the issue is the next object on the page is being pushed right 200px (well it looks like it's 200px).

If I change the width of the grid to 600px (or completly remove the width and let it use the size it needs) and disable the scroll everything looks good. The next object is not being pushed and everything lines up correctly, my page now exceeds the desired resolution width which causes the browser to be scrollable.

What am I missing or doing wrong?

Thanks
Alex
Top achievements
Rank 2
 answered on 18 Aug 2008
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?