Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
Hello,

I'm in the process of putting together a rad grid which contains approx 28-30 columns, and I need to change the column headings for 25 of the columns dynamically.

I have managed to sort the renaming when it's just showing the data, but when it goes into edit mode, using the "EditForms" mode, the titles revert back to the original coumn names.

E.g:

In the grid, I have a column called "Group 1", which gets renamed to "UK", but when it goes into the Edit Form, it goes back to "Group 1".

If you can give me any pointers, I would be very greatful.

Thank you

Dave
Dave
Top achievements
Rank 1
 answered on 01 Mar 2010
2 answers
149 views
hi all,
on ItemInserted and ItemUpdated events we can use:
e.KeepInInsertMode = True
and
e.KeepInEditMode = True
where e is defined as 
Telerik.Web.UI.GridInsertedEventArgs
or 
Telerik.Web.UI.GridUpdatedEventArgs

but in my case i'm using InsertCommand and UpdateCommand, which use e as GridCommandEventArgs
and i need in a particular condition to keep the item in insert/edit mode, how can i do this??

thnx in advance
FreshOne
Top achievements
Rank 1
 answered on 01 Mar 2010
1 answer
74 views
Hello,
I'm trying to implement an ajax solution, but having done SL for 2 years it's hard for me.... maybe I've lost something...
my question is : To correctly have a detail view binded to a datasource I need the data in this form :

  [DataContract] 
    public class Utente 
    { 
        [DataMember] 
        public string Codice { get; set; } 
        [DataMember] 
        public string Descrizione { get; set; } 
        [DataMember] 
        public string PWD { set; get;} 
        [DataMember] 
        public string Filiale {get;set;} 
        [DataMember] 
        public List<Gruppo> GruppiAppartenenza { get; set; } 
 
    } 

Or Having them Plain (No List<Group>) but [DataMember] int idgruppo.... [DataMember] string descrizione?

How ho I remove from showing the similar row in the second case?

If I've

Paolo | 1 | Home
Paolo | 0 | Office

How do I show only one "Paolo" and the detail with Home Office?

Thanks in advance
Paolo

Yavor
Telerik team
 answered on 01 Mar 2010
1 answer
53 views
consider the following example: http://demos.mcmscontrols.com/ASPNET/Grid/Examples/DataEditing/AllEditableColumns/DefaultCS.aspx

I have the same requirement with one exception,  when the value in "Supplier" ComboBox changes,
"Category" should have a different set of options (according to the selected value in "Supplier"),
while values in other controls must not change.

can it be done?

Princy
Top achievements
Rank 2
 answered on 01 Mar 2010
1 answer
150 views
We would like to implement the same functionality of the "Edit and Insert Templates" demo
http://demos.telerik.com/aspnet-ajax/listview/examples/templates/editinserttemplates/defaultcs.aspx
, but rather than control the binded with SqlDataSource as shown in the example, our control binding occurs in the code behind of a .NET Model View Presenter (MVP) architecture. We can't seem to find any method or property that indicates the item index when a item in the is selected., when the "Edit" button is clicked. So, there doesn't seem to be a way to determine which "Edit" button was clicked and which item to edit.

Do you have an example the the ListView functionality at http://demos.telerik.com/aspnet-ajax/listview/examples/templates/editinserttemplates/defaultcs.aspx only in a MVP structure?

Thanks in advance,

Keith E.
Rosen
Telerik team
 answered on 01 Mar 2010
6 answers
315 views
Dear,

I am trying to get the selected row values of the DetailTable View.

 

 

<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"></telerik:GridClientSelectColumn>

 


GridClient Select Column is in DetailTable. 

I need to get the values of each column of selected Row in DetailTable View when i pressed the Button "Procced with Selected Rows"

Regards,
waseem
Top achievements
Rank 2
 answered on 01 Mar 2010
0 answers
49 views

Hi,

 

I want to remove transparency of RadScheduler  Advance From, getting this transparency in Mozilla.

 

 

Regard

Aamir
Aamir Shah
Top achievements
Rank 2
 asked on 01 Mar 2010
2 answers
91 views
Hi,

 I am trying to add confirmation OnClientAppointmentMoveStart of RadSchedular by this code

  function onAppointmentMoveStart(sender, eventArgs) {
          if (!confirm('Are you sure you want to move this Appointment?')) {
              eventArgs.set_cancel(true)
         }
      }

It is working fine if user click ok and in case cancel it continuously showing confirmation alert.  I donot know what is problem.

I have tested this behavior on IE7, IE8 and Mozilla 3.5.8 getting same problem in all these browsers.

I am currently using Telerik.Web.UI.dll 2009.3.1103.35 .

Kindly Help me

Aamir






Aamir Shah
Top achievements
Rank 2
 answered on 01 Mar 2010
1 answer
177 views
Hi -

I use the following code to implement add/ insert with FormTemplate and EditFormSetting. Everything work well but I would like to hide the paging when the user is in "Add or Insert mode". The goal is to give the appearance that the grid is completely hidden when in these modes. The header disappears but not the footer paging.

Thanks in advance

<telerik:RadGrid ID="CustomerListGrid" runat="server"  
    GridLines="None"  
    Width="100%" 
    AllowPaging="True" 
    ShowGroupPanel="False" 
    PageSize="10" 
    EnableAJAX="True"  
    AllowCustomPaging ="True" 
    EditMode="EditForms"     
    ShowHeader="false" 
    AllowAutomaticInserts="false" 
    AllowAutomaticUpdates="false" 
    AllowAutomaticDeletes="false" 
    > 
<GroupingSettings GroupByFieldsSeparator=", " /> 
<ClientSettings Resizing-AllowColumnResize="true"></ClientSettings> 
<MasterTableView AutoGenerateColumns="False" EditMode="EditForms" DataKeyNames="LocationId" Width="100%" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" >  
<CommandItemSettings AddNewRecordText="Add a store..."  /> 
<GroupByExpressions> 
     <telerik:GridGroupByExpression> 
       <SelectFields > 
          <telerik:GridGroupByField 
            FieldName="Country" 
            HeaderText="Country" /> 
            <telerik:GridGroupByField 
            FieldName="CountryCode" 
            HeaderText=" " HeaderValueSeparator="" /> 
       </SelectFields> 
       <GroupByFields> 
          <telerik:GridGroupByField 
             FieldName="Country" 
             SortOrder="Ascending" /> 
       </GroupByFields> 
     </telerik:GridGroupByExpression> 
   </GroupByExpressions> 
<RowIndicatorColumn Visible="False"> 
<HeaderStyle></HeaderStyle> 
</RowIndicatorColumn> 
<ExpandCollapseColumn Visible="False" Resizable="False"> 
<HeaderStyle></HeaderStyle> 
</ExpandCollapseColumn> 
<PagerStyle Mode="Slider" /> 
    <Columns>      
    <telerik:GridTemplateColumn HeaderText=""  UniqueName="NameColumn" HeaderStyle-Width="90%" itemStyle-Width="90%">  
        <ItemTemplate>   
            <table cellpadding="2" cellspacing="0"> 
                <tr> 
                    <td> 
                        <table cellpadding="0" cellspacing="0"> 
                            <tr> 
                                <td class="form_label" ><asp:Literal runat="server"  Text='<%# Eval("CustomerName")%>'></asp:Literal></td> 
                                <td class="gridData" > 
                                    <asp:Literal ID="Literal7" runat="server"   
                                    Text='<%# String.Format( "{0}, {1}, {2}", Eval("City"),Eval("Province"),Eval("Address1"))%>'></asp:Literal> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
            </table> 
        </ItemTemplate>  
    </telerik:GridTemplateColumn> 
    <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton" EditImageUrl="~/Netcast/Images/Edit.gif" EditText="Edit" > 
        <ItemStyle Width="20px"  HorizontalAlign="Center" /> 
        <HeaderStyle Width="20px" /> 
    </telerik:GridEditCommandColumn> 
    <telerik:GridButtonColumn CommandName="Delete" Text="Delete"  
    UniqueName="DeleteColumn"  
    ButtonType="ImageButton" ImageUrl="/Images/Delete.gif" 
    ConfirmText="Are you sure you want to delete this store?" 
    ConfirmDialogType="RadWindow" 
    > 
        <ItemStyle Width="20px"  HorizontalAlign="Center" /> 
        <HeaderStyle Width="20px" /> 
    </telerik:GridButtonColumn>     
    </Columns> 
<EditFormSettings EditFormType="Template"> 
<FormTemplate> 
     <asp:Panel runat="server" ID="panelTemplate"> 
            <table cellpadding="4" cellspacing="0" > 
                <tr align="left"> 
                    <td align="right" class="form_label"> 
                        Customer #: 
                    </td> 
                    <td align="left"> 
                        <telerik:RadNumericTextBox ID="numtbCustomerNumber" Width="18em" runat="server" Type="Number" MinValue="0" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator=""  DBValue='<%# Bind("CustomerNumber") %>' > 
                        </telerik:RadNumericTextBox> 
                        <asp:RequiredFieldValidator ID="reqavlCustomerNumber" runat="server" ControlToValidate="numtbCustomerNumber" Display="None" ErrorMessage="Invalid customer number"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqavlCustomerNumberEx" TargetControlID="reqavlCustomerNumber" highlightcssclass="validatorCalloutHighlight"></cc1:ValidatorCalloutExtender> 
                    </td> 
                    <td align="right" class="form_label"> 
                        Name: 
                    </td> 
                    <td align="left" colspan="3"> 
                        <telerik:RadTextBox Width="32em" MaxLength="255"  ID="tbCustomerName" runat="server" Text='<%# Bind("CustomerName") %>' > 
                        </telerik:RadTextBox> 
                        <asp:RequiredFieldValidator ID="reqavlCustomerName" runat="server" ControlToValidate="tbCustomerName" Display="None" ErrorMessage="Invalid customer name"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqavlCustomerNameEx" TargetControlID="reqavlCustomerName" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                    </td> 
                    <td></td> 
                </tr> 
                <tr align="left"> 
                    <td align="right" class="form_label" > 
                        Country: 
                    </td> 
                    <td> 
                        <telerik:RadComboBox  
                        runat="server" ID="cmbCountries"  
                         
                        DataValueField="ID" 
                        DataTextField="Name" 
                        Width="18em"  
                        AppendDataBoundItems="true" 
                        > 
                            <Items> 
                                <telerik:RadComboBoxItem Text="" Value="" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                        <asp:RequiredFieldValidator ID="reqValCountry" runat="server"  ControlToValidate="cmbCountries" Display="None" InitialValue="" ErrorMessage="Invalid Country" />             
                        <cc1:ValidatorCalloutExtender id="reqValCountryEx" runat="server" targetcontrolid="reqValCountry" highlightcssclass="validatorCalloutHighlight" enableviewstate="true"  /> 
                    </td> 
                    <td align="right" class="form_label"> 
                        Name 2: 
                    </td> 
                    <td align="left" colspan="3"> 
                        <telerik:RadTextBox Width="32em" MaxLength="250"  ID="tbName2" runat="server" Text='<%# Bind("Name2") %>' > 
                        </telerik:RadTextBox> 
                    </td>   
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label" > 
                        City: 
                    </td> 
                    <td align="left"> 
                        <telerik:RadTextBox Width="18em" MaxLength="255"  ID="tbCity" runat="server" Text='<%# Bind("City") %>' > 
                        </telerik:RadTextBox> 
                        <asp:RequiredFieldValidator ID="reqValCity" runat="server" ControlToValidate="tbCity" Display="None" ErrorMessage="City  is required"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqValCityE" TargetControlID="reqValCity" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                    </td> 
                    <td align="right" class="form_label" > 
                        Province: 
                    </td> 
                    <td> 
                        <telerik:RadTextBox Width="15em" MaxLength="255" ID="tbStateProvince" runat="server" Text='<%# Bind("Province") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td align="right" class="form_label" > 
                        Zip/Postal: 
                    </td> 
                    <td align="left"> 
                        <telerik:RadTextBox Width="10em"  ID="tbPostalZip" MaxLength="50" runat="server" Text='<%# Bind("PostalCode") %>' > 
                        </telerik:RadTextBox> 
                        <asp:RequiredFieldValidator ID="reqValPostalZip" runat="server" ControlToValidate="tbPostalZip" Display="None" ErrorMessage="Zip/Postal  is required"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqValPostalZipE" TargetControlID="reqValPostalZip" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                         
                        <asp:RegularExpressionValidator ID="regExValPostalZip" runat="server"  ControlToValidate="tbPostalZip" ValidationExpression="^((\d+)(-(\d+))?)$" Display="None" ErrorMessage="Invalid Zip/Postal"  />            
                        <cc1:ValidatorCalloutExtender id="regExValPostalZipE" runat="server" targetcontrolid="regExValPostalZip" highlightcssclass="validatorCalloutHighlight" enableviewstate="true"  /> 
             
                    </td> 
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label"> 
                        Address1: 
                    </td> 
                    <td align="left" colspan="5"> 
                        <telerik:RadTextBox Width="56.25em" MaxLength="400"  ID="tbAddress1" runat="server" Text='<%# Bind("Address1") %>' > 
                        </telerik:RadTextBox> 
                        <asp:RequiredFieldValidator ID="reqValAddress1" runat="server" ControlToValidate="tbAddress1" Display="None" ErrorMessage="Address1 is required"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqValAddress1E" TargetControlID="reqValAddress1" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                         
                    </td> 
                     
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label"> 
                        Address2: 
                    </td> 
                    <td align="left" colspan="5"> 
                        <telerik:RadTextBox Width="56em" MaxLength="400"  ID="tbAddress2" runat="server" Text='<%# Bind("Address2") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label"> 
                        Address3: 
                    </td> 
                    <td align="left" colspan="5"> 
                        <telerik:RadTextBox Width="56em" MaxLength="400"  ID="tbAddress3" runat="server" Text='<%# Bind("Address3") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label" > 
                        Phone: 
                    </td> 
                    <td align="left"> 
                        <telerik:RadTextBox Width="18em" MaxLength="255"  ID="tbPhone1" runat="server" Text='<%# Bind("Phone1") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td align="right" class="form_label" > 
                        Phone 2: 
                    </td> 
                    <td> 
                        <telerik:RadTextBox Width="15em" MaxLength="255" ID="tbPhone2" runat="server" Text='<%# Bind("Phone2") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td align="right" class="form_label" > 
                        Fax: 
                    </td> 
                    <td align="left"> 
                        <telerik:RadTextBox Width="10em"  ID="tbFax" MaxLength="50" runat="server" Text='<%# Bind("Fax") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td></td> 
                </tr> 
                <tr> 
                    <td align="right" class="form_label" > 
                        Email: 
                    </td> 
                    <td> 
                        <telerik:RadTextBox Width="18em" MaxLength="250"  ID="tbEmail" runat="server" Text='<%# Bind("Email") %>' > 
                        </telerik:RadTextBox> 
                    </td> 
                    <td align="right" class="form_label"> 
                        Website: 
                    </td> 
                    <td align="left" colspan="3"> 
                        <telerik:RadTextBox Width="32em" MaxLength="250"  ID="tbWebSite" runat="server" Text='<%# Bind("WebSite") %>' > 
                        </telerik:RadTextBox> 
                    </td>   
                    <td></td> 
                </tr>        
                <tr> 
                    <td align="right" class="form_label" > 
                        Longitude: 
                    </td> 
                    <td> 
                        <telerik:RadNumericTextBox ID="numtbLongitude" Width="15em" runat="server" Type="Number" MaxValue="180" MinValue="-180" NumberFormat-DecimalDigits="8"  DBValue='<%# Bind("Longitude") %>' > 
                        </telerik:RadNumericTextBox> 
                         <asp:RequiredFieldValidator ID="reqValLongitude" runat="server" ControlToValidate="numtbLongitude" Display="None" ErrorMessage="Longitude is required"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqValLongitudeE" TargetControlID="reqValLongitude" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                         
                    </td> 
                    <td align="right" class="form_label"> 
                        Latitude: 
                    </td> 
                    <td align="left" colspan="3"> 
                        <telerik:RadNumericTextBox ID="numtbLatitude" Width="15em" runat="server" Type="Number" MaxValue="90" MinValue="-90" NumberFormat-DecimalDigits="8" DBValue='<%# Bind("Latitude") %>'> 
                        </telerik:RadNumericTextBox> 
                         <asp:RequiredFieldValidator ID="reqValLatitude" runat="server" ControlToValidate="numtbLatitude" Display="None" ErrorMessage="Latitude is required"> 
                        </asp:RequiredFieldValidator> 
                        <cc1:ValidatorCalloutExtender runat="server" ID="reqValLatitudeE" TargetControlID="reqValLatitude" highlightcssclass="validatorCalloutHighlight" ></cc1:ValidatorCalloutExtender> 
                    </td>   
                    <td></td> 
                </tr>        
                <tr> 
                    
                    <td align="left" colspan="6"> 
                                    <asp:Button ID="btnUpdate" Text='<%# IF((CustomerListGrid.MasterTableView.IsItemInserted) , "Insert", "Update") %>' 
                                        runat="server" CommandName='<%# IF((CustomerListGrid.MasterTableView.IsItemInserted), "PerformInsert", "Update") %>'> 
                                    </asp:Button>&nbsp; 
                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> 
                    </td> 
                     <td></td> 
                </tr> 
            </table> 
            </asp:Panel> 
</FormTemplate> 
</EditFormSettings> 
</MasterTableView> 
</telerik:RadGrid> 

Shinu
Top achievements
Rank 2
 answered on 01 Mar 2010
2 answers
131 views
hi all,
  I created one rad grid at dynamically. Rad grid fixed static and dynamically added columns in page_load event. For more information about this work around is specified my last post the follwoing thread:

http://www.telerik.com/community/forums/aspnet-ajax/grid/dynamic-template-column-for-command-not-firing-event.aspx

Now i can view hierachical grid accoriding to the xml i gave. with expand and collapse button. But when press  expand button it showing the even validation error. if evenvalidation = false showinf somw 'Is Operator' error. I think because of not haveing view state or somw thing like So can you please tell how can i explicetly handle expand and collapse or any other solution to handle this?

Akhil Raj
Top achievements
Rank 1
 answered on 01 Mar 2010
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?