Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
146 views
I want to persist expanded rows of the pivotgrid during the session so iIf the user returns to the page, his previously expanded rows are expanded again.
In order to do this I must know which rows are expanded so I must have a way to identify them.
I'm trying to identify the expanding rows in the itemcommand event (Commandname "ExpandCollapse") in order to store them in a list in the session and re-expand the rows based on this list.

Alas, I cannot find an identifier for the rows.
I have two questions
1. Is the itemcommand the proper event for this
2. Is there a row identifier available which I can use?

Any help would be very much appreciated.

​
Laurens
Top achievements
Rank 1
 answered on 16 Dec 2014
2 answers
157 views
Hi,

The subject field is not displaying on the scheduler but it is on tool tips. The subject field is a different field in the database but I've manually set it using DataSubjectField="tasknote".

Any idea why the tool tips work but the subject contents are not displaying on the individual calendar items?

Attached is a screen shot showing the problem.

Many thanks

Tim Metcalfe
Danny
Top achievements
Rank 1
 answered on 16 Dec 2014
8 answers
1.3K+ views
I'm new to the Telerik library and one of my first tasks is to get a total of the values in a numeric column of a Telerik RadGrid. The column is a GridClientSelectColumn. I understand that by setting the Aggregate="Sum", the footer will read the summation of that column. The problem is that I only want a summation of the selected rows. Can someone provide a demonstration. Thank you in advance! 
Eyup
Telerik team
 answered on 16 Dec 2014
1 answer
1.1K+ views
I have tried the css as always to give some borders to my grid columns and removed the last columns right borders because I didn't need them. I have tried to use the css class='rgHeader  LeftBorder' in HeaderStyle tag of those coulmns but it doesn't remove the header border. Please help me as soon as possible. My codes are:
div.RadGridCustomClass .rgHeader,
div.RadGridCustomClass th.rgResizeCol,
div.RadGridCustomClass .rgFooter td,
div.RadGridCustomClass .rgFilterRow td {
border-left: 1px solid #f0f0f0 !important;
border-right: 1px solid #f0f0f0 !important;
}

div.RadGridCustomClass .rgMasterTable{
font-family: Calibri !important;
font-size: 11pt;
}
div.RadGridCustomClass .rgMasterTable .rgHeader{
font-family: Calibri !important;
font-size: 11pt;
font-weight: bold;
}
div.RadGridCustomClass .rgAltRow td {
border-bottom: 0px !important;
}
div.RadGridCustomClass .rgMasterTable,
div.RadGridCustomClass {
border: 0px !important;
}
div.RadGridCustomClass .rgMasterTable td {
border-right: 1px solid #f0f0f0 !important;
}


div.RadGridCustomClass .rgMasterTable:last-child,
div.RadGridCustomClass td:last-child {
border: 0px !important;
}
div.RadGridCustomClass th.LeftBorder,
div.RadGridCustomClass .rgRow td.LeftBorder,
div.RadGridCustomClass .rgAltRow td.LeftBorder,
div.RadGridCustomClass .rgEditRow td.LeftBorder
{

border-right-width:0px !important;
}
<telerik:RadGrid ID="ToolkitSections" runat="server" AutoGenerateColumns="False" OnNeedDataSource="ToolkitSectionsNeedDataSource" OnItemDataBound="ToolkitSections_ItemDataBound" OnUpdateCommand="ToolkitSections_UpdateCommand" CellSpacing="-1" OnItemCreated="ToolkitSections_ItemCreated" AllowSorting="True" CssClass="RadGridCustomClass" Font-Names="Calibri" EnableViewState="False" OnPreRender="ToolkitSections_PreRender" Width="90%">
                                                <MasterTableView DataKeyNames="ToolkitSectionID,Progress,SectionDenied,Status,Restricted" EditMode="InPlace" ClientDataKeyNames="ToolkitSectionID" >
                                                    <RowIndicatorColumn Visible="False">
                                                    </RowIndicatorColumn>                                                    <ExpandCollapseColumn Created="True">
                                                    </ExpandCollapseColumn>                                                    <Columns>
                                                        <telerik:GridHyperLinkColumn AllowFiltering="False" DataNavigateUrlFields="SectionUrl" DataTextField="SectionName" FilterControlAltText="Filter SectionUrl column" Groupable="False" HeaderText="Section" Reorderable="False" Resizable="False" SortExpression="Section Name" UniqueName="SectionUrl">
                                                        <HeaderStyle ForeColor="white" CssClass="headerfont"></HeaderStyle>
                                                        </telerik:GridHyperLinkColumn>
                                                        <telerik:GridDateTimeColumn AllowFiltering="False" DataField="LastModified" DataFormatString="{0:MM/dd/yyyy}" FilterControlAltText="Filter Last Modified column" Groupable="False" HeaderText="Modified" Reorderable="False" Resizable="False" UniqueName="LastModified" ReadOnly="True">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" CssClass="RightBorder"></HeaderStyle>
                                                        </telerik:GridDateTimeColumn>
                                                       
                                                             
                                                        <telerik:GridCheckBoxColumn AllowFiltering="False" DataField="Complete" DataType="System.Boolean" FilterControlAltText="Filter Complete column" Groupable="False" HeaderText="Complete" Reorderable="False" Resizable="False" UniqueName="Complete" ReadOnly="True">
                                                         <HeaderStyle ForeColor="white" ></HeaderStyle>
                                                        </telerik:GridCheckBoxColumn>                                                        <telerik:GridTemplateColumn UniqueName="Restricted" HeaderText="Restrict" FilterControlAltText="Filter Restricted column" Reorderable="False" Resizable="False" ShowSortIcon="False">
                                                            <ItemTemplate>
                                                                <div>
                                                                    <div style="float: left">
                                                                        <asp:CheckBox ID="cbRistrict" runat="server" AutoPostBack="true" OnCheckedChanged="cbRistrict_OnCheckedChanged" onclientclick="this.checked=true;"></asp:CheckBox>
                                                                    </div>
                                                                    <div style="float: left">
                                                                        <asp:LinkButton ID="RestrictLinkButton" runat="server" BorderWidth="0"><img  style="text-decoration:none;border:0px;" src="~/Images/Lock-Restricted.png" runat="server"/></asp:LinkButton>
                                                                    </div>
                                                                </div>
                                                            </ItemTemplate>
                                                             <HeaderStyle ForeColor="white" ></HeaderStyle>                                                        </telerik:GridTemplateColumn>                                                        <telerik:GridDateTimeColumn AllowFiltering="False" DataField="SectionDueDate" DataFormatString="{0:MM/dd/yyyy}"  FilterControlAltText="Filter Section Due Date column" Groupable="False" HeaderText="Section Due Date" Reorderable="False" Resizable="False" UniqueName="SectionDueDate">
                                                           <HeaderStyle Width="120px" HorizontalAlign="Right" CssClass="rgHeader LeftBorder"></HeaderStyle>
                                                             <ItemStyle Width="80" HorizontalAlign="Center" CssClass="LeftBorder"></ItemStyle>
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white"></HeaderStyle>
                                                        </telerik:GridDateTimeColumn>
                                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/date-icon.png" UniqueName="EditCommandColumn" ItemStyle-HorizontalAlign="Left" Reorderable="False" Resizable="False" ShowFilterIcon="False" ShowSortIcon="False">
                                                             <HeaderStyle ForeColor="white"  Width="10px" CssClass="rgHeader LeftBorder"></HeaderStyle>
                                                            <ItemStyle HorizontalAlign="Left" CssClass="LeftBorder" />                                                        </telerik:GridEditCommandColumn>                                                        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="ToolkitSectionID" Groupable="False" HeaderText="ToolkitSection ID" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="ToolkitSectionID" ReadOnly="true" Display="False">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" ></HeaderStyle>
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="Progress" FilterControlAltText="Filter Progress column" Groupable="False" HeaderText="Progress" Reorderable="False" Resizable="False" UniqueName="Progress" ReadOnly="True" DataType="System.Int16" Display="False" ShowSortIcon="False">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" ></HeaderStyle>
                                                        </telerik:GridBoundColumn>                                                        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="SectionDenied" Display="False" FilterControlAltText="Filter Section Denied column" Groupable="False" HeaderText="Section Denied" ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="SectionDenied">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" ></HeaderStyle>
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="AnybodyDenied" Display="False" FilterControlAltText="Filter Section Denied column" Groupable="False" HeaderText="Section Denied" ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="AnybodyDenied">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" CssClass="headerfont"></HeaderStyle>
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="Status" Display="False" FilterControlAltText="Filter Status Column" Groupable="False" HeaderText="Status" ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="Status">
                                                            <ColumnValidationSettings>
                                                                <ModelErrorMessage Text="" />
                                                            </ColumnValidationSettings>
                                                             <HeaderStyle ForeColor="white" ></HeaderStyle>
                                                        </telerik:GridBoundColumn>                                                    </Columns>                                                    <EditFormSettings>
                                                        <EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" CancelImageUrl="~/RadControls/Grid/Skins/Default/Cancel.gif" UpdateImageUrl="~/RadControls/Grid/Skins/Default/Update.gif">
                                                        </EditColumn>
                                                    </EditFormSettings>
                                                </MasterTableView>
                                            </telerik:RadGrid>
Konstantin Dikov
Telerik team
 answered on 16 Dec 2014
9 answers
351 views
Hello

I have to display a list of parameters with a hierarchic relation between them. I use a RadTreeList and it works fine.
My tree list has a "Value" column.

I would like to change some values in this column but I don't want to make the changes row by row (by entering in edit mode, making modification and updating). I'd prefer to keep all the rows in edit mode, make the modifications in some of them and validate by clicking on an external button.

I didn't find something like that in the demos.

 I tried to use an ItemTemplate for the edit column.
<telerik:RadTreeList runat="server" ID="RadTreeListParameters"
                                             Skin="Telerik"
                                             AutoGenerateColumns="false"
                                             DataKeyNames="ServiceParameterID" ParentDataKeyNames="ParentParameterID"
                                             AllowSorting="true"
                                             DataSourceID="ObjectDataSource1"
                                             OnDataBound="RadTreeListParameters_DataBound"
                                             ItemStyle-CssClass="RowStyle"
                                             AlternatingItemStyle-CssClass="AlternatingRowStyle"
                                             HeaderStyle-CssClass="HeaderStyle"
                                             SelectedItemStyle-CssClass="SelectedRowStyle"
                                             >
                            <ClientSettings>
                                <Scrolling AllowScroll="false" UseStaticHeaders="false" />
                                <Resizing AllowColumnResize="true" ResizeMode="NoScroll" />
                            </ClientSettings>
                            <Columns>
                                <telerik:TreeListBoundColumn DataField="ServiceParameterID" UniqueName="ServiceParameterID" HeaderText="ServiceParameterID" Display="true"></telerik:TreeListBoundColumn>
                                <telerik:TreeListBoundColumn DataField="Role" UniqueName="Role" HeaderText="Role" ReadOnly="true"></telerik:TreeListBoundColumn>
                                <telerik:TreeListBoundColumn DataField="Type" UniqueName="Type" HeaderText="Type" ReadOnly="true"></telerik:TreeListBoundColumn>
                                <telerik:TreeListBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name" ReadOnly="true"></telerik:TreeListBoundColumn>
                                <telerik:TreeListTemplateColumn DataField="Value" UniqueName="TemplateColumn" HeaderText="Value">
                                    <ItemTemplate>
                                        <asp:TextBox runat="server" ID="tbxValue" Value='<%# Eval("Value") %>' />
                                    </ItemTemplate>
                                </telerik:TreeListTemplateColumn>
                            </Columns>
                        </telerik:RadTreeList>

The display is correct but when there is a postback, the data are reloaded. So I would like to keep the modifications in a dictionary in order to overwrite the bound values.

protected void RadTreeListParameters_DataBound(object sender, EventArgs e)
{
    foreach (TreeListDataItem item in this.RadTreeListParameters.Items)
    {
        string id = item.GetDataKeyValue("ServiceParameterID").ToString();
 
        if (this.parameters_values_dico != null && this.parameters_values_dico.Keys.Contains(id))
        {
            (item["TemplateColumn"].FindControl("tbxValue") as TextBox).Text = this.parameters_values_dico[id];
        }
    }
}

My problem is that I can't get the event when a textbox is modified (to save the new value in the dictionary. I added:
AutoPostBack="true" OnTextChanged="tbxValue_TextChanged"  in my template textbox description but the method is never called.

Has anyone an idea to solve my problem or to provide another way to implement my feature  (without ItemTemplate and edit mode) ?

Thank you

Jean-Charles
Nikolay Rusev
Telerik team
 answered on 16 Dec 2014
6 answers
689 views
Hi,
I am facing an issue in validation in custom attaributes. See the attached image.
The Textbox shuold enter valid emails only.  And the error  mesage  should be show in the bottom of the textbox.Regular expression is possible in this? 

Its very urgent..pls do the needful

Thanks and regards
Nencho
Telerik team
 answered on 16 Dec 2014
3 answers
229 views
How do I get the menu text of the menu item selected with client side code?

Thanks
Aneliya Petkova
Telerik team
 answered on 16 Dec 2014
1 answer
348 views
I have a radgrid that 1. I cannot highlight the row on clicking and 2. the selectedindexchanged event does not fire.  The grid sits inside an update panel and is loaded when a user select a value from a combo box, which is passed as a parameter to a stored procedure.  The grid load without problem, but as mentioned once loaded I cannot click on the row and highlight the row and the selectedindexchanged event does not fire.  Below is the grid settings.  I have also tried  to add the following code on the page load, but this has not helped.
 this.grdItems.ClientSettings.EnablePostBackOnRowClick = true;
this.grdItems.ClientSettings.Selecting.AllowRowSelect = true;

Any suggestions?

<telerik:RadGrid ID="grdItems" runat="server" CellSpacing="0"
                                      DataSourceID="SqlDataSource1" GridLines="None" Height="400px"
                                      AccessKeySkin="Office2010Black"
                                         onselectedindexchanged="grdItems_SelectedIndexChanged"
                                         Skin="Office2010Black">
                                         <clientsettings>
                                          <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                       <ClientEvents OnRowSelected="RowSelected" />
                                          <selecting AllowRowSelect="True" />
                                        </clientsettings>
                                        <mastertableview allowpaging="True" autogeneratecolumns="False"
                                         datakeynames="ID" datasourceid="SqlDataSource1" pagesize="14">
                                         <Columns>
                                            <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" Display="False"
                                             FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                                             SortExpression="ID" UniqueName="ID">
                                             </telerik:GridBoundColumn>
                                             <telerik:GridBoundColumn DataField="HoseID"
                                              FilterControlAltText="Filter HoseID column" HeaderText="Hose ID"
                                              ReadOnly="True" SortExpression="HoseID" UniqueName="HoseID">
                                              <HeaderStyle Font-Bold="True" Font-Size="Larger" />
                                             </telerik:GridBoundColumn>
                                         </Columns>
                                      </mastertableview>
                                     </telerik:RadGrid>
Konstantin Dikov
Telerik team
 answered on 16 Dec 2014
4 answers
147 views
Hi Telerik, 

I posted a thread a couple of days ago and I thought I had solved my problem but turns out I just moved it.

My problem now is that I have template columns that contain buttons and others that have text that needs to be on a different color depending on the status of the item.

So basically, I used to bind my grid using the 'simple way' (Create data table, add source to the grid and bind)
Once it was bound, I would go through each rows, set the text to the button and set the appropriate CSS on the text label. 

Since I needed to sort and to filter, I saw that I could use the 'OnNeedDataSource' event, which is the second way to bind a grid.

This worked and I could sort/filter my grid.

But now, after the event is called, I tried to change the CSS and the text again but it says that the grid doesnt have any items.

I believe its because it wasnt bound (even though I can see the rows once everything is done)



Eyup
Telerik team
 answered on 16 Dec 2014
1 answer
139 views
Hi,

If I use a grid smart tag to edit the EditTemplate and drag a control into the edit box provided, it produces this code in <MasterTableView>:

<EditItemTemplate>
    <asp:Button ID="Button1" runat="server" Text="Button" />
</EditItemTemplate>

but when my template opens it shows nothing, basically just a title bar with no content. When I use the code below (which I got from your website) then the template shows up just fine - so just what is EditItemTemplate all about?

<EditFormSettings EditFormType="Template">
    <PopUpSettings Modal="True" />
    <FormTemplate>
        <telerik:RadTextBox ID="Username" Runat="server">
        </telerik:RadTextBox>
    </FormTemplate>
</EditFormSettings>
Eyup
Telerik team
 answered on 16 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?