Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
291 views
I am having simple
<telerik:RadTextBox CssClass="Search-Element" ID="txtFirstName" runat="server" Width="100%"></telerik:RadTextBox>

In html output for class i get:
<input type="text" data-propertyname="FirstName" class="riTextBox riEnabled Search-Element" size="20" name="ctl00$ContentPlaceHolder1$ucTest$txtFirstName" id="ctl00_ContentPlaceHolder1_ucTest_txtFirstName">

Why is riTextBox riEnabled added? This makes me problem because i need to get all .Search-Element with JS
$('.Search-Element') is null because that riTextBox riEnabled
Vasil
Telerik team
 answered on 08 Apr 2013
0 answers
121 views
<table>
       <tr>
           <td>
               <asp:TextBox ID="txt" runat="server" TabIndex="0"></asp:TextBox>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ValidationGroup="Goal"
                   ControlToValidate="txt" Display="None" ErrorMessage="Please select" SetFocusOnError="True"></asp:RequiredFieldValidator>
               <cc1:ValidatorCalloutExtender HighlightCssClass="highlight" ID="ValidatorCalloutExtender1"
                   TargetControlID="RequiredFieldValidator1" runat="server">
               </cc1:ValidatorCalloutExtender>
           </td>
       </tr>
       <tr>
           <td align="right">
               <span class="error">*</span>Start Date :
           </td>
           <td align="left">
               <telerik:RadDatePicker ID="radCalender" runat="server" TabIndex="1" Width="205">
                   <Calendar ID="Calendar4" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"
                       ViewSelectorText="x" runat="server">
                   </Calendar>
                   <DateInput ID="DateInput4" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" runat="server">
                   </DateInput>
               </telerik:RadDatePicker>
               <asp:RequiredFieldValidator ID="rvCalender" runat="server" ControlToValidate="radCalender"
                   InitialValue="" Display="None" ValidationGroup="Goal" ErrorMessage="<%$Resources:CCMResource,USER_GOAL_STARTDATE %>"
                   SetFocusOnError="True"></asp:RequiredFieldValidator>
               <cc1:ValidatorCalloutExtender HighlightCssClass="highlight" ID="vcCalender" TargetControlID="rvCalender"
                   runat="server">
               </cc1:ValidatorCalloutExtender>
           </td>
       </tr>
       <tr>
           <td align="right">
               <span class="error">*</span> Managed Population : 
           </td>
           <td align="left">
               <telerik:RadComboBox ID="radComboManagedPopulationGoals" AppendDataBoundItems="true"
                   Width="200px" TabIndex="2" DataValueField="ProgramId" DataTextField="ProgramName"
                   runat="server">
                   <Items>
                       <telerik:RadComboBoxItem runat="server" Text="Select" Value="0" />
                       <telerik:RadComboBoxItem runat="server" Text="Item" Value="1" />
                   </Items>
               </telerik:RadComboBox>
               <asp:RequiredFieldValidator ID="rfvManagedPopulationGoals" runat="server" ValidationGroup="Goal"
                   ControlToValidate="radComboManagedPopulationGoals" InitialValue="Select" Display="None"
                   ErrorMessage="<%$Resources:CCMResource,Assignment_Select %>" SetFocusOnError="True"></asp:RequiredFieldValidator>
               <cc1:ValidatorCalloutExtender ID="vdCManagedPopulationGoals" TargetControlID="rfvManagedPopulationGoals"
                   runat="server">
               </cc1:ValidatorCalloutExtender>
           </td>
       </tr>
       <tr>
           <td>
               <asp:Button ID="btn" runat="server" ValidationGroup="Goal" />
           </td>
       </tr>
   </table>
Hi ,
I have a Problem in raddatePicker.
I have a form. In this, I have   RadDatePicker, RadCombobox and radbutton Controls and trhese are mandatory fields. on Button click it will call the Callout Extenders for mandatory Fields. In my Form First is RadDatePicker And next is RadCombobox.On buttonClick it showing first calloutoutextender for Radcombox instead of RadDatePicker. I want RaddatePicker's CalloutExtender will be called First and then rest of controls.

Thanks in Advance.
Prathyusha
Top achievements
Rank 1
 asked on 08 Apr 2013
1 answer
210 views
I can't find any documentation or examples of how to acheive the following.

I have a RadGrid using a panel/multipage with a RadWindow on one of the multipages, all inside a edit template. (See code below)

I would like to set the NavigateURL based on the values of two text box controls (on the same multipage).  These are the latitude and longitude of a location to be displayed in Bing maps.

http://dev.virtualearth.net/embeddedMap/v1/ajax/aerial?zoomLevel=10&center=41.095694_-85.109793&pushpins=41.095694_-85.109793


In the codebehind I can access and set only the RadGrid1 properties.

What is the method for finding the nested controls? Please provide your code example responses in VB.

Thanks in advance!

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<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:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" Skin="Office2010Blue" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
        <Selecting AllowRowSelect="True" />
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
    <MasterTableView DataKeyNames="LocationID" DataSourceID="SqlDataSource1" CommandItemDisplay="Top">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
 
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
 
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column">
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are you sure you want to delete this record? This action cannot be undone." FilterControlAltText="Filter column column" UniqueName="column">
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn DataField="LocationID" DataType="System.Int32" FilterControlAltText="Filter LocationID column" HeaderText="ID" ReadOnly="True" SortExpression="LocationID" UniqueName="LocationID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LocationName" FilterControlAltText="Filter LocationName column" HeaderText="LocationName" SortExpression="LocationName" UniqueName="LocationName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="InternalName" FilterControlAltText="Filter InternalName column" HeaderText="InternalName" SortExpression="InternalName" UniqueName="InternalName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LocationType" FilterControlAltText="Filter LocationType column" HeaderText="LocationType" SortExpression="LocationType" UniqueName="LocationType">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EntityID" FilterControlAltText="Filter EntityID column" HeaderText="EntityID" SortExpression="EntityID" UniqueName="EntityID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Latitude" FilterControlAltText="Filter Latitude column" HeaderText="Latitude" SortExpression="Latitude" UniqueName="Latitude">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Longitude" FilterControlAltText="Filter Longitude column" HeaderText="Longitude" SortExpression="Longitude" UniqueName="Longitude" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Address1" FilterControlAltText="Filter Address1 column" HeaderText="Address1" SortExpression="Address1" UniqueName="Address1">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Address2" FilterControlAltText="Filter Address2 column" HeaderText="Address2" SortExpression="Address2" UniqueName="Address2" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="City" FilterControlAltText="Filter City column" HeaderText="City" SortExpression="City" UniqueName="City">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="State" FilterControlAltText="Filter State column" HeaderText="State" SortExpression="State" UniqueName="State">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ZIP" FilterControlAltText="Filter ZIP column" HeaderText="ZIP" SortExpression="ZIP" UniqueName="ZIP">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="County" FilterControlAltText="Filter County column" HeaderText="County" SortExpression="County" UniqueName="County" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Phone" FilterControlAltText="Filter Phone column" HeaderText="Phone" SortExpression="Phone" UniqueName="Phone" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Services" FilterControlAltText="Filter Services column" HeaderText="Services" SortExpression="Services" UniqueName="Services" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Amenities" FilterControlAltText="Filter Amenities column" HeaderText="Amenities" SortExpression="Amenities" UniqueName="Amenities" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Details" FilterControlAltText="Filter Details column" HeaderText="Details" SortExpression="Details" UniqueName="Details" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="moreInfoURL" FilterControlAltText="Filter moreInfoURL column" HeaderText="moreInfoURL" SortExpression="moreInfoURL" UniqueName="moreInfoURL" Visible="False">
            </telerik:GridBoundColumn>
        </Columns>
 
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            <FormTemplate>
                <telerik:RadTabStrip ID="RadTabStrip2" runat="server" Skin="Office2007" MultiPageID="RadMultiPage1"
                    SelectedIndex="0" Align="Justify" ReorderTabsOnSelect="True" Width="800px">
 
                    <Tabs>
                        <telerik:RadTab Text="General">
                        </telerik:RadTab>
 
                        <telerik:RadTab Text="Mapping" Selected="True">
                        </telerik:RadTab>
 
                        <telerik:RadTab Text="Photo">
                        </telerik:RadTab>
 
                        <telerik:RadTab Text="Services">
                        </telerik:RadTab>
 
                        <telerik:RadTab Text="Amenities">
                        </telerik:RadTab>
 
                        <telerik:RadTab Text="Details">
                        </telerik:RadTab>
                    </Tabs>
 
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="pageView" Width="800px">
                    <!--- GENERAL TAB --->
                    <telerik:RadPageView ID="RadPageView1" runat="server">
                    </telerik:RadPageView>
 
                    <!--- MAPPING TAB --->
                    <telerik:RadPageView ID="RadPageView2" runat="server">
                        <table cellpadding="5" style="padding-top: 25px;">
                            <tr valign="top">
                                <td width="400">
                                    <table cellpadding="5">
                                        <tr>
                                            <td class="tdName">Latitude:</td>
                                            <td>
                                                <telerik:RadTextBox ID="txtLatitude" runat="server" LabelWidth="64px" Text='<%# Bind("Latitude") %>' Width="225px"></telerik:RadTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="tdName">Longitude:</td>
                                            <td>
                                                <telerik:RadTextBox ID="txtLongitude" runat="server" LabelWidth="64px" Text='<%# Bind("Longitude") %>' Width="225px"></telerik:RadTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnLatLng" runat="server" Text="View Map" OnClick="btnLatLng_Click" CommandArgument="41.095694_-85.109793" /></td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="400">
                                    <telerik:RadWindowManager Behaviors="Resize, Close, Maximize, Move" ID="RadWindowManager" DestroyOnClose="True"
                                        RestrictionZoneID="RestrictionZone" Opacity="99" runat="server" Width="300px" Height="400px" Visible="true" Skin="Office2007" Behavior="Resize, Close, Maximize, Move">
 
                                        <Windows>
                                            <telerik:RadWindow ID="RadWindow1" VisibleOnPageLoad="true" Title="Location Map" NavigateUrl='http://dev.virtualearth.net/embeddedMap/v1/ajax/aerial?zoomLevel=10¢er=41.095694_-85.109793&pushpins=41.095694_-85.109793'
                                                IconUrl="telerikFavicon.ico" Modal="True" runat="server" VisibleStatusbar="False" VisibleTitlebar="true" Visible="false">
                                            </telerik:RadWindow>
                                        </Windows>
 
                                    </telerik:RadWindowManager>
                                </td>
                            </tr>
                        </table>
 
                    </telerik:RadPageView>
 
                    <!--- PHOTO TAB --->
                    <telerik:RadPageView ID="RadPageView3" runat="server">
                        <table cellpadding="10">
                            <tr valign="top">
                                <td width="400">
                                    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server">
                                    </telerik:RadAsyncUpload>
                                </td>
                                <td width="400" align="center"></td>
                            </tr>
                        </table>
                    </telerik:RadPageView>
 
                    <!--- SERVICES TAB --->
                    <telerik:RadPageView ID="RadPageView4" runat="server">
                        <telerik:RadEditor Visible="true" ID="RadEditor1" runat="server" Width="100%" Height="350px" Content='<%# Bind("Services") %>' Skin="Office2007" ToolbarMode="Default" ToolsFile="~/tools.xml"></telerik:RadEditor>
                    </telerik:RadPageView>
 
                    <!--- AMENITIES TAB --->
                    <telerik:RadPageView ID="RadPageView5" runat="server">
                        <telerik:RadEditor Visible="true" ID="RadEditor2" runat="server" Width="100%" Height="350px" Content='<%# Bind("Amenities") %>' Skin="Office2007" ToolbarMode="Default" ToolsFile="~/tools.xml"></telerik:RadEditor>
                    </telerik:RadPageView>
 
                    <!--- DETAILS TAB --->
                    <telerik:RadPageView ID="RadPageView6" runat="server">
                        <telerik:RadEditor Visible="true" ID="RadEditor3" runat="server" Width="100%" Height="350px" Content='<%# Bind("Details") %>' Skin="Office2007" ToolbarMode="Default" ToolsFile="~/tools.xml"></telerik:RadEditor>
                    </telerik:RadPageView>
 
                </telerik:RadMultiPage>
            </FormTemplate>
        </EditFormSettings>
 
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
    </MasterTableView>
 
    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
 
    <FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
Marin
Telerik team
 answered on 08 Apr 2013
1 answer
96 views
I have a radgrid (rg1) that has a custom edit form. In the custom edit form for rg1, I have another radgrid(rg2). In rg2 I need to use another custom edit form and this is where the issue begins. In order to get rg2 the data it needs to populate I had to use a button since the data did not exist until after the form is loaded, if there is a better way please share as the button does not feel like a good solution. So once I press the button rg2 now has data and is displayed. When I press the "add new record" button in rg2 I want it to show my custom edit form like it does in rg1. What it is does however is clears the data from rg2. Now if I click the button used to show rg2 in the first place it now opens but not with the data but the edit form instead. So how do I make rg2 show the custom edit form without resetting rg2 and having to press the button again to see it? code for both below:


rg1:

<telerik:RadGrid ID="contactsGrid" runat="server" OnNeedDataSource="contactsGrid_NeedDataSource"
                AllowSorting="False" AllowFilteringByColumn="true"  Skin="Default" GridLines="Both" AutoGenerateColumns="False"
                ShowFooter="false" AllowPaging="true" PageSize="25" PagerStyle-AlwaysVisible="true"
                OnUpdateCommand="contactsGrid_UpdateCommand" OnInsertCommand="contactsGrid_InsertCommand"
                EnableLinqExpressions="false" OnDeleteCommand="contactsGrid_DeleteCommand" GroupingEnabled="True" ShowGroupPanel="True"
                GroupPanel-Enabled="True">
                <ClientSettings AllowDragToGroup="True"/>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" HorizontalAlign="Center" />
                <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="False" DataKeyNames="contact_id"
                    NoMasterRecordsText="No current contacts." TableLayout="Fixed">
                    <RowIndicatorColumn Visible="False">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="ImageButton" Resizable="False" >
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="50px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn DataField="contact_id" HeaderText="CONTACT_ID" UniqueName="CONTACT_ID"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CONTACT_ORG" HeaderText="CONTACT_ORG" UniqueName="CONTACT_ORG"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LOCATION_NAME" HeaderText="LOCATION_NAME" UniqueName="LOCATION_NAME"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CONTACT_NAME" HeaderText="CONTACT_NAME" UniqueName="CONTACT_NAME"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PHONE" UniqueName="PHONE" HeaderText="PHONE"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="150px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ALT_PHONE" HeaderText="ALT_PHONE" UniqueName="ALT_PHONE"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="150px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CELL" HeaderText="CELL" UniqueName="CELL" AllowFiltering="true"
                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="150px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FAX" UniqueName="FAX" HeaderText="FAX" AllowFiltering="true"
                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="150px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DSN" HeaderText="DSN" UniqueName="DSN" AllowFiltering="true"
                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EMAIL" HeaderText="EMAIL" UniqueName="EMAIL"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="200px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="COMMENTS" HeaderText="COMMENTS" UniqueName="COMMENTS"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CONTACT_SRV" HeaderText="CONTACT_SRV" UniqueName="CONTACT_SRV"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="GROUP_ID" HeaderText="GROUP ID" UniqueName="GROUP_ID"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="GROUP_NAME" HeaderText="GROUPS" UniqueName="GROUP_NAME"
                            AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" Groupable="True" >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LAST_UPDATED" HeaderText="LAST_UPDATED" UniqueName="LAST_UPDATED"
                            DataType="System.DateTime" AllowFiltering="false" DataFormatString="{0:MM/dd/yyyy}" Groupable="True" >
                            <HeaderStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this contact?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumnContacts" Visible="true">
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="50px" />
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings UserControlName="EditContact.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="EditCommandColumn1" >
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <EditItemStyle CssClass="EditFormHeader"></EditItemStyle>
                <ValidationSettings CommandsToValidate="PerformInsert, Update" />
            </telerik:RadGrid>


rg2:

<td>
                                    <asp:Button Visible='<%# !(DataItem is GridInsertionObject) %>' ID="editGroups" runat="server"
                                        Text="Edit Groups" OnClick="GroupMember" />
                                    <telerik:RadGrid Visible='<%# !(DataItem is GridInsertionObject) %>' ID="groupMemberGrid"
                                        runat="server" AllowSorting="False" AllowFilteringByColumn="false" Skin="Default"
                                        GridLines="Both" AutoGenerateColumns="False" ShowFooter="false" EnableLinqExpressions="false"
                                        OnDeleteCommand="groupMemberGrid_DeleteCommand">
                                        <GroupingSettings CaseSensitive="false" />
                                        <MasterTableView AllowMultiColumnSorting="false" CommandItemDisplay="Top" DataKeyNames="group_id"
                                            NoMasterRecordsText="Not a member of any groups." TableLayout="Fixed">
                                            <RowIndicatorColumn Visible="False">
                                                <HeaderStyle Width="20px"></HeaderStyle>
                                            </RowIndicatorColumn>
                                            <Columns>
                                                <telerik:GridButtonColumn ConfirmText="Delete this group?" ConfirmDialogType="RadWindow"
                                                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                                    UniqueName="DeleteGroup" Visible="true">
                                                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                                    <HeaderStyle Width="50px" />
                                                </telerik:GridButtonColumn>
                                                <telerik:GridBoundColumn DataField="GROUP_ID" HeaderText="Group ID" UniqueName="GROUP_ID"
                                                    AllowFiltering="True">
                                                    <HeaderStyle Width="100px" />
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="GROUP_NAME" HeaderText="Group Name" UniqueName="GROUP_NAME"
                                                    AllowFiltering="false">
                                                    <HeaderStyle Width="160px" />
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <EditFormSettings UserControlName="AddToGroup.ascx" EditFormType="WebUserControl">
                                                <EditColumn UniqueName="EditCommandColumn2">
                                                </EditColumn>
                                            </EditFormSettings>
                                        </MasterTableView>
                                        <EditItemStyle CssClass="EditFormHeader"></EditItemStyle>
                                        <ValidationSettings CommandsToValidate="Delete" />
                                    </telerik:RadGrid>
                                </td>
Angel Petrov
Telerik team
 answered on 08 Apr 2013
1 answer
125 views
Hello,

When I click insert drag drop document image on my page I am getting a strange exception. Pop-up is coming up with a test as "the command insert dragdrop document is not implemented yet."

I have two save buttons on my page one is of master and other is of child form. First time when I drag drop anything and click on master page's save button it does get save and after that when I again click on insert drag drop then it gives aforementioned message in a pop-up. Otherwise it never gives any problem.

Has anybody ever encountered this?

If yes please provide help.

Thanks,
Dheeraj.
Hristo Valyavicharski
Telerik team
 answered on 08 Apr 2013
3 answers
102 views
Hi,
we are using 2013 Q1 Radgrid.

I came to know that Radgrid doesn't have clientside sorting unless it is done through webservice call etc. Only other option is to enable sorting on server side. In sort command event, help link suggest to rebind the grid. My situation is like this:

I bind the grid in page load event when it is not a postback like this:

protected

 

void Page_Load(....)
{ 

 

 

    if (!IsPostBack)

 

    {

 

        //bind radgrid
        bindgrid(txtbox1.text, dropdownlist1.selectedvalue);
     }
}

private void bindgrid(string txtvalue, string ddlvalue)
{
      radgrid1.DataSource = customobject;   //data retrieved as custom object from databased using those parameters
      radgrid1.DataBind();
}

Based on certain conditions some columns are shown/hide in ItemDataBound event. On the page, there are many other controls along with Radgrid. User can select different choices of these controls (like different data, different list item from dropdown etc) and click on another button called refresh. In this button click event we are binding grid again with different parameter values.

We have a button called 'ShowStatus'. When this button is clicked, status column (which is hidden initially) should be shown. we loop thru all the rows and get key values (as xml) and send to database and get back status for each item as xml. Then again we loop thru rows and assign status to each row status cell.
This is working fine and when 'ShowStatus' button is clicked, status column is showing up with data.

 

protected

 

void btnShowStatus_Click(object sender, EventArgs e)
{ 
    // setting status column to be displayed
    // loop thru grid items and set status column to appropriate status coming from database as xml.

 

}

The problem is after this, if user clicks on one of the columns to sort, I am not sure what to do in sort command event. According to help, I need to bind the grid again. If I call bindgrid routine, I lose how it was before. I need the grid to display as it was before (before postback) with sorted data. How can I restore grid.


I appreciate your response.
Thanks,
Prathiba.

Kostadin
Telerik team
 answered on 08 Apr 2013
3 answers
294 views
Hi,

I have a RadGrid with a nested GridTableView (detail table). In my detail table I've specified a RadComboBox as one of the columns like this:

<telerik:ComboBox ID="tcbCompanyType" runat="server" DataTextField="Text" DataValueField="Value"
    EmptyMessage="Company type" MarkFirstMatch="True" AutoPostBack="True"
    CausesValidation="false" onselectedindexchanged="tcbCompanyType_SelectedIndexChanged" />


As expected, on changing the selection, the appropriate method is called; but I need this method to show/hide other columns in the same detail table - my other columns are all of type <telerik:GridBoundColumn>. The columns to be shown/hidden all have unique names defined for them but no IDs.

Thanks for looking :)

Eyup
Telerik team
 answered on 08 Apr 2013
1 answer
119 views
I ran into a problem where i am using a RadListView and I set the GroupItemCount programmatically depending on the size of the dataset. It seems that the property isn't persisted across a post-back and is reset to default value after page is submitted. Is this behavior by design?

Thank you.
Andrey
Telerik team
 answered on 08 Apr 2013
2 answers
87 views
Hi friends,

I want my grid to use Skin="Transparent" but my popup edit form's window to use  Skin="Glow".

how can I achieve this ? thanks...
aykut
Top achievements
Rank 1
 answered on 08 Apr 2013
5 answers
143 views
Hello,

I am using Radgrid. I have dynamically added columns in this grid like mentioned below. I wanted to add filter for some of the columns. What is the way to enable this so that some columns will have filter. I am using custom paging so how to make filter on complete records instead of current page records? Also there is column for phone where records are displayed as (123)-456-1234. If user enters 12345.. then also it should search the phone.      
GridBoundColumn boundColumn1 = new GridBoundColumn();
RadGrid1.MasterTableView.Columns.Add(boundColumn1);
boundColumn1.ItemStyle.Wrap = false;
boundColumn1.DataField = DataField;
boundColumn1.SortExpression = DataField;
boundColumn1.HeaderText = HeaderText;

Eyup
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?