Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
139 views
Hi, I am using this example in my project.
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/groupfooter/defaultcs.aspx

I wan to remove the collapse button/icon. Using code below, but it doent help.
<ExpandCollapseColumn Visible="false">
        </ExpandCollapseColumn>

I want also remove top row  (Unit  price), such that only columnheader is visible.

One example below indicate how I want to display the data:

Product name      Price
Category1
1                           10
2                            20
Sum                       30

Category2
1                           10
2                            20
3                           25
Sum                       55

Category3
1                           10
2                            20
4                           10
Sum                       40
---------------------------
Total sum             125

Pls help me soon.

Thanks
Thaya
    
Thaya
Top achievements
Rank 1
 answered on 11 Sep 2009
5 answers
192 views
I have a need to customize the PagerTemplate of my grid.  However, when I add my custom controls to the pager template, I lose the paging slider.  How can I add custom controls, but still retain the slider and its functionality.  I'm basically trying to accomplish this mockup:


http://s977.photobucket.com/albums/ae256/fightclub777/?action=view&current=grid.jpg
Mira
Telerik team
 answered on 11 Sep 2009
1 answer
132 views
I have added the following fonts in the ToolsFile.xml

1. Xerox Sans
2. Arial
3. Verdana

In the "Design" view, i have entered text : "sample text" and applied "Arial" font.
When i switch the view to "HTML", i see the html text as "sample text".

Now, in the design view, if i select the text and apply "Verdana" font, the HTML is shown as
"<span style="font-family: verdana;">sample text</span>"

I have two questions here :

1) When i have applied "Arial" font, why the html is not shown as "<span style="font-family: arial;">sample text</span>"?

2) Does telerik rad editor supports "Xerox Sans" font?
    If i see the fonts dropdown, both "Arial" & "Xerox Sans" entries appear to be displayed in same font style i.e of "Arial".

Any inputs would be of great help.

Thanks in advance
Surya.


Martin
Telerik team
 answered on 11 Sep 2009
0 answers
112 views
Hi,
I would like to get such a functionality:
- click a button on the form
- this button sends an Ajax request providing a new grid's height
This grid uses static headers and allows scrolling. If I set just (in the codebehind):
MyGrid.Height = new Unit(newHeight, UnitType.Pixel);
the total height of this grid is changed but the scrolling area remains unchanged. I must change both Height and 

ClientSettings.Scrolling.ScrollHeight properties.
These properties must be set to different values and it is not clear how to compute the proper difference. But when the form is initially loaded, scrolling area height (that is not set at all in aspx) is some way automatically adjusted to fit the total grid height - whatever header's height is set.

What should I do to get the scrolling area automatically adjusted after Ajax request too?

Best regards
Tomasz

tmlipinski
Top achievements
Rank 1
 asked on 11 Sep 2009
1 answer
254 views
hi

i have a standard grid with a series of columns in it i.e GridDropDownColumn, GridBoundColumn etc.

i want to know if there is a way of making the column a required field and validate it as such.

i am creating the columns programatically.

i know you can do it with a template column , but i dont want to have to create template columns for all the fields that require validation , there must be a simpler way to make a column a required field.

just to clarify this is for the insert/edit modes of the grid i need to validate the fields for.

thanks for your input on this.

Peter.
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2009
1 answer
177 views
Hi,

I need help to bind array to a gridcolumn in Grid.

Eg

Product ID    Description     Decipher Info(array)

B234567     Serial                B- Area
                                            23- SubArea
                                            5- month
                                             6-Year
                                            7- Day

CDE78        Serial            C-Facility
                                        D- District
                                        E- Shift
                                        7 -Month
                                        8- Year

etc...

Length of Decipher Info will be different depending on length of Product Id. Datasource is object with Decipher Info as Oracle VARRAY.

Any help will be highly appreciated.


Thanks
Martin
Telerik team
 answered on 11 Sep 2009
1 answer
306 views
Hello,
I am having problem with maintaing state on the detailsview nested inside the radgrid's NestedViewTemplate.

Here is the aspx version
<telerik:RadGrid VirtualItemCount="1000" ID="RadGridAll"
             AllowPaging="True" AllowSorting="True"
            AllowMultiRowSelection="True" runat="server"
             DataSourceID="SqlDataSource1" GridLines="None" OnItemCommand="RadGridAll_ItemCommand">
            <MasterTableView   AllowCustomPaging="True" DataSourceID="SqlDataSource1" GridLines="Both">
                <Columns>
                    
                    <telerik:GridTemplateColumn UniqueName="CheckBoxTemplate">
                        <HeaderTemplate>
                            <asp:CheckBox ID="headerChkbox" AutoPostBack="true" runat="server" />                            
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="checkbox1"   AutoPostBack="true" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle Width="30px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn7" DataField="nameLabels" HeaderText="Labels">
                        <HeaderStyle Width="60px" CssClass="rgHeader last"></HeaderStyle>
                        <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem,"name") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <NestedViewTemplate>
                    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px">
                            <Fields>
                               
                            </Fields>
                    </asp:DetailsView>
              
                </NestedViewTemplate>
             
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                
            </MasterTableView>
            <FilterMenu EnableEmbeddedSkins="False">
            </FilterMenu>
            <HeaderContextMenu EnableEmbeddedSkins="False">
            </HeaderContextMenu>
            
        </telerik:RadGrid>

and in the code behind  I am adding custom template fields to the detailsview  whenever the user presses the expand button it:

private void AddField(DetailsView dvItemDetails,string column, string header)
    {
        object value = "ddddd";
        TemplateField field = new TemplateField();
        field.ShowHeader = true;
        field.HeaderTemplate = new DetailsViewTemplate(DataControlRowType.Header, header, "", "");
        field.ItemTemplate = new DetailsViewTemplate(DataControlRowType.DataRow, "", column, value);
        dvItemDetails.Fields.Add(field);
    }
    public void CreateColumns(DetailsView dvItemDetails)
    {
            AddField(dvItemDetails,"one","One");
            AddField(dvItemDetails,"two", "Two");
            List<int> source=new List<int>(2);
            source.Add(1);
            source.Add(2);
            dvItemDetails.DataSource = source;
            dvItemDetails.DataBind();
    }
    protected void RadGridAll_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "ExpandCollapse")
        {
            GridDataItem item = RadGridAll.Items[e.Item.ItemIndex];
            GridNestedViewItem template = item.ChildItem;
            DetailsView dvItemDetails = template.FindControl("DetailsView1") as DetailsView;
            CreateColumns(dvItemDetails);
        }
    }

 I am using a custom template class ,DetailsViewTemplate
public class DetailsViewTemplate : ITemplate
{
    private DataControlRowType templateType;
    private string columnHeader;
    private string columnNameBinding;
    private string text = "";

    public DetailsViewTemplate(DataControlRowType type, string colHeader, string colNameBinding, object value)
    {
        templateType = type;
        columnHeader = colHeader;
        columnNameBinding = colNameBinding;
        text = value.ToString();
    }

    public void InstantiateIn(System.Web.UI.Control container)
    {
        switch (templateType)
        {
            case DataControlRowType.Header:
                Literal lc = new Literal();
                lc.Text = columnHeader;
                container.Controls.Add(lc);
                break;
            case DataControlRowType.DataRow:
                Label cb = new Label();
                cb.ID = "cb1";
                cb.Text = text;// GetStudent("select * from ppaSearchColumn").Tables[0].Rows[rowIndex][columnNameBinding].ToString();
                container.Controls.Add(cb);
                break;
            default:
                break;
        }
    }
}
when i expand a row it is presented ok, but when I expand another one, the first one loses the text from the detailsview.
I am new to telerik so please bear with me if this is an easy one.
Anybody has a suggestion?
Thanks,
 Lucian




Yavor
Telerik team
 answered on 11 Sep 2009
2 answers
100 views
Hello,

In my web-app I have a page with an hierarchy grid.
I would like to give the text in non-expanded rows a different color (light gray) than in expanded rows (which are black)

Is it possible to achieve this in RadGrid?
Jeroen Eikmans
Top achievements
Rank 1
 answered on 11 Sep 2009
1 answer
189 views
Hi,

    In the demo while we are entering the special characters in the filtering textbox it throws error and redirect to the link
http://demos.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx


How to avoid the special characters in the filtering textbox??


Unni
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2009
2 answers
79 views
Hello,

Is there any control for image editor?
I am using RadUpload and i want that when user upload the image then if he/she want to crop the image then he/she can do.

I have seen that in RadEditor Image Manager.
but i want that separate functionality.
Is there any control or how i can use RadEditor Image Manager without using
RadEditor.

Thanks.
Suneco
Top achievements
Rank 2
 answered on 11 Sep 2009
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?