Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
191 views
I have a hierarchy RadGrid implementation which uses the AutoGenerateColumns pattern. In the RadGrid1_ColumnCreated event I'm setting the properties to align specific columns based on a list of column names which require right alignment.

 if (e.Column is GridBoundColumn)
            {
                GridBoundColumn boundColumn = e.Column as GridBoundColumn;

if (RightAlignColumnList.Contains(e.Column.UniqueName))
                {
boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Right;
boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
boundColumn.DataFormatString = "{0:N0}";
boundColumn.HeaderStyle.Wrap = true;
boundColumn.ItemStyle.Wrap = true;
}
else
{
boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
}

}

The issue is when the grid is rendered the right aligned columns are overflowing the column width - see the MV Base column and the text only displays correctly when I click on the row. Attached is a screenshot of the issue showing 2 rows in the Details section. This behaviour is in IE8 - our company standard browser.
Steven
Top achievements
Rank 1
 answered on 08 Apr 2013
1 answer
78 views
Hi
     How can I give heading for an expand-collapse column??

thanks in advance
Allen
Princy
Top achievements
Rank 2
 answered on 08 Apr 2013
9 answers
157 views
Hi All

I have a gridTemplateColumn with a Checkbox, I'm having problems accessing the selected rows (multiple)

How would I do this in my senareo without a GridClientSelectColumn

Andy
Andy Green
Top achievements
Rank 2
 answered on 08 Apr 2013
1 answer
143 views
Hi,

Im using a RadGrid for editing participants in an event.

I Would like to validate the email adress before comitting the data.

The problem is now that if i have more than one row in EditState and trys to commit one of the rows is validates all rows in editState?

Why is that? and how to avoid it?

Here is the code to my grid:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                <script type="text/javascript">
                    function RowDblClick(sender, eventArgs) {
                        sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                    }
                </script>
            </telerik:RadCodeBlock>
            <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="rgParticipants">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rgParticipants" LoadingPanelID="RadAjaxLoadingPanel1">
                            </telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadGrid ID="rgParticipants" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                Skin="Simple" Width="100%" AllowPaging="True" ShowStatusBar="true" PageSize="999999"
                GridLines="None" OnUpdateCommand="RadGridItemUpdated" OnNeedDataSource="RadGridNeedDataSource"
                OnInsertCommand="RadGridItemInserted" OnDeleteCommand="RadGridItemDeleted" AllowMultiRowEdit="True"
                OnItemDataBound="RadGridItemDataBound" AllowAutomaticInserts="True">
                <MasterTableView TableLayout="Fixed" DataKeyNames="Id" CommandItemDisplay="Top" ClientDataKeyNames="Id"
                    EditMode="InPlace" AllowMultiColumnSorting="True" Width="100%" InsertItemPageIndexAction="ShowItemOnCurrentPage"
                    InsertItemDisplay="Top">
                    <NoRecordsTemplate>
                        <div>
                            Ingen deltagerer.
                        </div>
                    </NoRecordsTemplate>
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="Id" DataField="Id" HeaderText="Id" ReadOnly="True"
                            Visible="False" HeaderStyle-Width="5%">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="tcName" HeaderText="Navn" HeaderStyle-Width="20%"
                            SortExpression="Name">
                            <ItemTemplate>
                                <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtName" runat="server" Text='<%# Eval("Name") %>' Width="90%" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcClub" HeaderText="Klub" HeaderStyle-Width="20%"
                            SortExpression="Club">
                            <ItemTemplate>
                                <asp:Label ID="lblClub" runat="server" Text='<%# Eval("Club") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtClub" runat="server" Text='<%# Eval("Club") %>' Width="90%" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcEmail" HeaderText="Email" HeaderStyle-Width="20%"
                            SortExpression="Email">
                            <ItemTemplate>
                                <asp:Label ID="lblEmail" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtEmail" runat="server" Text='<%# Eval("Email") %>' Width="90%" />
                                <asp:RegularExpressionValidator ID="vldEmail" runat="server"  Display="Dynamic"
                                    ErrorMessage="Ikke en email adresse" ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                                    ControlToValidate="txtEmail">
                                </asp:RegularExpressionValidator>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcCategory" HeaderText="Kategori" HeaderStyle-Width="10%"
                            SortExpression="Category">
                            <ItemTemplate>
                                <asp:Label ID="lblCategory" runat="server" Text='<%# Eval("Category") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="dlCategory" runat="server" DataTextField="Description" DataValueField="Id" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcChip" HeaderText="Chip" HeaderStyle-Width="10%"
                            SortExpression="Chip">
                            <ItemTemplate>
                                <asp:Label ID="lblChip" runat="server" Text=""></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtChip" runat="server" Text="" Width="90%" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcStartNumber" HeaderText="Start nummer"
                            HeaderStyle-Width="10%" SortExpression="StartNumber">
                            <ItemTemplate>
                                <asp:Label ID="lblStartNumber" runat="server" Text='<%# Eval("StartNumber") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtStartNumber" runat="server" Text='<%# Eval("StartNumber") %>'
                                    Width="90%" />
                                <asp:RegularExpressionValidator ID="vldStartNumber" ControlToValidate="txtStartNumber"
                                    Display="Dynamic" ErrorMessage="Ikke et nummer" ValidationExpression="(^([0-9]*\d*\d{1}?\d*)$)"
                                    runat="server" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="tcConfirmed" HeaderText="Status" HeaderStyle-Width="10%"
                            SortExpression="ParticipantStatusDescription">
                            <ItemTemplate>
                                <asp:Label ID="lblConfirmed" runat="server" Text='<%# Eval("ParticipantStatusDescription") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="dlConfirmed" runat="server" DataTextField="Description" DataValueField="Kode" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                            EditImageUrl="~/images/Icon/edit.png" CancelImageUrl="~/images/Icon/cross.gif"
                            InsertImageUrl="~/images/Icon/add.gif" UpdateImageUrl="~/images/Icon/accept.gif"
                            EditText="Rediger" InsertText="Opret" UpdateText="Gem">
                            <HeaderStyle Width="5%"></HeaderStyle>
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton"
                            ImageUrl="~/images/Icon/remove.gif">
                            <HeaderStyle Width="3%"></HeaderStyle>
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
                </ClientSettings>
            </telerik:RadGrid>
Eyup
Telerik team
 answered on 08 Apr 2013
2 answers
156 views
Sorry for the cryptic title, not sure how  best to describe it.

I have a page used to search records in a table with about 4000 records.  The query for the search uses 10 optional parameters provided via textboxes, dropdowns and datepickers.  When the page loads, the grid should start empty.  The user selects as many paramas suit their search needs and clck a button. i.e. dept='finance' and role='csr' and startdate > 'somedate'.  all parameters are optional and ANDed together using something like

Example SQL

ALTER PROC test (
    @Dept varchar(50)=null,
    @Role varchar(50)=null,
    @Startdate datetime=null ) AS

SELECT some, bunch, of, fields
FROM sometable
WHERE
    (Dept = @Dept or isNull(@Dept,'')='')
    AND (Role = @Role or isNull(@Role,'')='')
    AND (startdate > @somedate or isNull(@somedate,0)=0)

* Grid must start with zero records on page load
* If the user select no parameters then ALL records will be returned.

As it stands now when the page loads ALL 4000 records are returned because I have CancelSelectonNullParameter=false in the SQL DataSource. This can usually causes a timeout.

I know I can do some of this via custom paging but thats not really what I want. I want the page to load with zero records in the grid but if the user clicks search with no parameters set then yes all recods can be returned.  at which point normal paging will occur.

Thanks
Kelly

kellyroberts
Top achievements
Rank 1
 answered on 08 Apr 2013
1 answer
89 views
I want change Font-Family of tabstript item in javascript (clinet side) in asp.net ajax rad controls.
Princy
Top achievements
Rank 2
 answered on 08 Apr 2013
3 answers
274 views
I have a radgrid on page and i bind data on serverside. Bydefault sorting is set to false on grid. But on click of a checkbox on a container page, I want to sort grid data on specific column.  for example below, on click of a checkbox I want to sort my data as Active customer on top or Inactive customers on top.  How would I do that on clientside.? Can I enable sorting on individual column only?

ID Name Total Orders Active
1 Customer 1 9 TRUE
2 Customer 2 11 FALSE
3 Customer 3 2 FALSE
4 Customer 4 20 TRUE
5 Customer 5 31 TRUE
Eyup
Telerik team
 answered on 08 Apr 2013
5 answers
135 views
Hi

we are purchased q2 2012 .when we use the gird like inline add/edit as attached in the image file.

When i click Add new record .i have show 2 options one is insert and cancel.

Here i want to change the text insert into submit .

how can i achive it.i have attached the image for your reference

need your help

Thanks in advance
sanjay
Eyup
Telerik team
 answered on 08 Apr 2013
2 answers
164 views
Was wondering if something has changed with the latest version of the Telerik controls.

I am now unable to get a column griditem text unless the column is visible, where as I was able to get the value before.

Below is the code:
Dim gridItem As GridDataItem = DirectCast(e.Item, GridDataItem)
Dim pickedTemplate As String = gridItem("keyCampaignCreative").Text

When the column visible = "false", pickedTemplate = "&nbsp;", however if I set the column visible = "true" then I get the correct text needed.

This all changed when I upgraded to the latest version of the telerik controls.

Any help is much appreciated.
Andrey
Telerik team
 answered on 08 Apr 2013
1 answer
86 views
Two issues:

  • RadMenu Vertical Height

I have a RadMenu, vertical flow, inside of a pane (splitter).

Sub Issue 1:
If I don't set the height offset on the pane or splitter, it flows all the way to the bottom, and the footer text shows over this, rather than seeing the footer background color.

Sub Issue 2:
When i set the height offset, the footer displays as normal, but shifted WAY down below (no explicit height variables set on controls or in CSS, checked with Inspect Element, FireBug, searches against code base, etc...)

Sub Issue 3:
When I close up the sliding pane for menu navigation (to the left), that extremely long scroll to the bottom of the page to see the footer suddenly collapses.  Thus, it's a height issue with the Vertical RadMenu orientation.  Why?

This is my first post.  I've searched this forum for information...
I saw one note not to set height variables.  So, I check that.  That's the only thing of note...
If I missed something, rather than an explanation (DRY), link-me-please-me.
------

  • RadMenu Transparency Theme Vertical

When orienting the Transparency Theme to vertical, in a raw page, or, inside of the above pane, the link:hover overlay(s) show on the first two items.  The other themes don't do this...

I've Searched: Searches for "transparency" (as in the theme) usually lead to people looking to do menu transparency, not specific to the integrated Telerik theme.

Boyan Dimitrov
Telerik team
 answered on 08 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?