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

I am working with a Rad Grid which is bound to an sql datasource in asp.net. It is displaying data from user defined tables so I need to generate alot of the grid at runtime with c# and work with auto generated columns. My problem is that I can't get the edit form to show any controls what so ever. I'm new to telerik controls so there might be something obvious I'm missing. 

I'm gathering from the examples on this site that to setup an edit form control for each column I just create a GridTextBoxColumnEditor 
as below and then in c# set the columns 'ColumnEditorID' to the ID of the GridTextBoxColumnEditor. Firstly, am I correct in thinking this is the way to map a grid column to a control in the edit form? The relevant code is below along with the way I've setup my datasource and radgrid. What am I missing?


protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column is GridBoundColumn)
        {
            (e.Column as GridBoundColumn).ColumnEditorID = "GridTextBoxColumnEditor1";
        }
    } 

<asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="Server=(local); Database=v7; uid=Vestri; pwd=v3str199!;"
          DeleteCommand='<%=SqlDeleteQuery %>'>
        </asp:SqlDataSource>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" OnItemDeleted="RadGrid1_ItemDeleted" 
        DataSourceID="SqlDataSource1" AutoGenerateColumns="true" OnColumnCreated="RadGrid1_ColumnCreated">
            <MasterTableView>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="editButton" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumn" ButtonType="ImageButton">
                            <ItemStyle HorizontalAlign="Center" CssClass="deleteImage" />
                    </telerik:GridButtonColumn>                 
                </Columns>
                <EditFormSettings ColumnNumber="3" CaptionDataField="Town" CaptionFormatString="Edit properties of {0}"
                    InsertCaption="New Town">
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                    Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                    UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" />
Andrey
Telerik team
 answered on 29 Aug 2012
5 answers
83 views

Hi,

  We are using Telerik RadScheduler to bind the events. We are using wcf service method to bind the data.
The data binding is done successfully and its showing the data correctly. 

Now we are using AdvancedInsertTemplate and AdvancedEditTemplate respectively to insert and edit the events. So in the template we have added two use controls and it contains form elements for insertion and deletion.

When clicking on an empty day,a popup is showing with insert form. Also when clicking on an event , the edit form is also coming.

Now i have got some questions:

  1. Up on editing how to bind the existing details in the edit form , we are using a user control as edit form. Also we want to do it using a wcf service methods, since we are doing the initial binding with wcf services. Now its showing an empty form.
  2. Similarly on insert also we want to do it from client side using wcf services.
  3. Also i want to know whether we can use methods from a wcf service hosted in some other machine. Now while checking we are using wcf services inside our website. But we want to know whether we can use methods from a wcf service hosted outside our website.


Thanks,
Mahesh
Cat Cheshire
Top achievements
Rank 1
 answered on 29 Aug 2012
3 answers
116 views
Where can I change the time range when creating a new appointmement, view the attached image.

Thanks
Kalina
Telerik team
 answered on 29 Aug 2012
1 answer
72 views
I have a RadMenu on the top 30 pixels of my Page.
Under that, filling the rest of the page is an IFRAME. (The Menu populates the IFRAME).

This works perfectly across all browsers except IE9 and IE10 standards mode where there is a little glitch.
The 1st time you Mouse-over the Root Menu, the sub Menu is hidden.
If you mouse over a menu item a second time, the sub menu appears as expected.

I've broken down the code on my page as simply as I can, I databind the Menu in the code behind.

<!DOCTYPE html>
<html style="height:100%">
<body style="height:100%">
<form id="form1" runat="server">
  <telerik:radscriptmanager id="RadScriptManager1" runat="server" />
  <div style="position:fixed;width:100%;height:100%;">
    <div style="width:100%;height:30px;">
      <telerik:RadMenu ID="radMenu" Runat="server" Flow="Horizontal" Skin="Black" EnableViewState="false" EnableEmbeddedSkins="true">
    </div>
    <iframe id="contentPane" name="contentPane" style="padding-top:30px;width:100%;height:100%;display: block;border:0;"></iframe>
  </div>
</form>
</body>
</html>

IE9 and IE10 standards has another minor issue that may be related... 
Once you mouse over the root item a second time so that a SubMenu appears.
If there is a third menu level, the menu will only expand about 2 pixels, so you never see sub-sub menus items.
This issue isn't as important, since I can probably fix it via css, but I thought I would include it since it only happens in IE9/IE10 standards mode and therefore possibly related to the topic issue.

Thanks for any help you can give!
Kate
Telerik team
 answered on 29 Aug 2012
1 answer
363 views
I have a grid  in that i have edit  button . 
When i click on edit am going back to the RadPageView where i have radcomboxbox and den fill the text in radcomboxbox
The problem is that whenever i use
(edit grid command)
 ddlconfemail.SelectedItem.Text = item["scoreconfirmeemail"].Text;

I get duplication values in my dropdown but if i use "selectedvalue"..it works properly (no duplication and no error in data ).
The problem is that i have 12 combo box  and all these values are cuming from 1 - table . Hence , I CANT BIND with the id, the only option is to bind  the combo box with Text 

Please Help me solve this problem !
Cat Cheshire
Top achievements
Rank 1
 answered on 29 Aug 2012
1 answer
76 views
I have made a totally custom scheduler control which I have also created a custom recurrence for them. They are saved differently in the database there is two table there is the recurrence rule table and the appointment table. I was wondering is there a way that I can make the scheduler think that an appointment is recurring so that when you click edit it will pop up the recurrence edit prompt window?
Kalina
Telerik team
 answered on 29 Aug 2012
3 answers
320 views

Hi,

the tittle name is that radgrid export csv contains &nbsp; the character of &nbsp cannot be shown on title. 

I have a radgrid in which I'm binding the data. 
After I export data using export to CSV, In the CSV file,I find blank cells are replaced by &nbsp;I don't want that.
Could you please help me achieve what I want.

Thanks,

Sandy

Daniel
Telerik team
 answered on 29 Aug 2012
1 answer
102 views
Hi all

I am trying to use telerik RadScheduler & in the implementation i want to display Hours from Rows side to column wise.

I am not sure if this is possible?

I have attached along sample which i am trying to achieve.

Please let me know if any one have any idea.

Thanks
Rohit
Kalina
Telerik team
 answered on 29 Aug 2012
2 answers
74 views
I have an ajax enabled grid with custom CommandItemTemplate buttons.  Three of the buttons are set up to use the built-in export functionality for CSV, Excel and Word exports.  

I have included the javascript functionality to disable ajax for the built-in export buttons and have verified the code is being executed. Exports work as expected, however my problem is after a successful export, any attempt to utilize other grid functionality causes the command bar and pager to disappear.  This behavior appears to be similar to an attempted export without a full postback.

The grid is contained within a RadSplitter.  The grid resides on a default.aspx page within a Site.Master page.

Any suggestions you might have would be greatly appreciated.
Daniel
Telerik team
 answered on 29 Aug 2012
1 answer
83 views

Page is taking almost 15 seconds to save data.
When I Upload the site eventually it takes almost unlimited time to save the data.
By doing enableviewstate="false" at page level, it saves the record very fast but obviously it didn't update the records because of enableviewstate="false".
Then I do enableviewstate="true" in Grid. But it is not working.
Can you help me please ?? Is there a solution like only changed values save in viewstate otherwise it will be enableviewstate="true"
Following is my HTML Code:

<%@ OutputCache Duration="10" VaryByParam="none" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPages/AdminMaster.master"
    EnableEventValidation="false" AutoEventWireup="false" CodeFile="EmployeeDeductions.aspx.vb"
    Inherits="Admin_EmployeeDeductions" %>
 
<%@ Register Src="~/ECZ_FooterMessage.ascx" TagName="FooterMessage" TagPrefix="Ecz" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <Ecz:FooterMessage ID="msg" runat="server" />
            <table width="378" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="30" align="left" valign="top">
                        <img src="../images/top_left.jpg" width="30" height="43" />
                    </td>
                    <td align="left" valign="middle" id="top_bg">
                        <asp:Label ID="lblHeading" runat="server" Text="     Employee Deductions" CssClass="heading"></asp:Label>
                    </td>
                    <td width="30" align="right" valign="top">
                        <img src="../images/top_right.jpg" width="30" height="43" />
                    </td>
                </tr>
                <tr>
                    <td align="left" valign="top">
                          
                    </td>
                    <td align="left" valign="top">
                        <img src="../images/top_shadow.jpg" width="322" height="16" />
                    </td>
                    <td align="right" valign="top">
                          
                    </td>
                </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="right">
                        Date:
                    </td>
                    <td>
                        <telerik:RadDatePicker ID="radDate_cr" runat="server">
                        </telerik:RadDatePicker>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" />
                        
                    </td>
                    <td>
                        <asp:Button ID="btnPost" runat="server" Text="Post" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td align="center">
                        <br />
                        <br />
                    </td>
                </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <telerik:RadGrid ID="grdEmployeeDeductions" AllowSorting="True" runat="server" AllowFilteringByColumn="True"
                            ShowStatusBar="True" GridLines="None" AutoGenerateColumns="False" Visible="false"
                            Width="100%">
                            <MasterTableView DataKeyNames="E_EmployeeContract_ID_PK" ClientDataKeyNames="E_EmployeeContract_ID_PK">
                                <Columns>
                                    <telerik:GridTemplateColumn DataField="E_EmployeeContract_ID_FK" HeaderText="Employee">
                                        <ItemTemplate>
                                            <asp:Label ID="lblE_EmployeeContract_ID_FK" runat="server" Text='<%# Eval("E_EmployeeContract_ID_PK") %>'
                                                Visible="false"></asp:Label>
                                            <asp:Label ID="lblEmployeeName" runat="server" Text='<%# Eval("E_EmployeeName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="Company" HeaderText="Company">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCompanyID" runat="server" Text='<%# Eval("E_Company_ID_FK") %>'
                                                Visible="false"></asp:Label>
                                            <asp:Label ID="lblCompany" runat="server" Text='<%# Eval("CompanyName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="Department" HeaderText="Department" UniqueName="Department">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDepartmentID" runat="server" Text='<%# Eval("E_Department_ID_FK") %>'
                                                Visible="false"></asp:Label>
                                            <asp:Label ID="lblDepartment" runat="server" Text='<%# Eval("DepartmentName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="GOSI" HeaderText="GOSI" UniqueName="GOSI"
                                        FilterControlWidth="50px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtGOSI" runat="server" Text='<%# Eval("gosi") %>' Width="50px"></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="GOSI Account">
                                        <ItemTemplate>
                                            <telerik:RadComboBox ID="cmbGOSIAccount" runat="server" OnDataBound="CmbAccountDataBound1"
                                                Filter="Contains">
                                            </telerik:RadComboBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="Social" HeaderText="Social" FilterControlWidth="50px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtSocial_Deduction" runat="server" Width="50px" Text='<%# Eval("Social_deduction") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Social Account">
                                        <ItemTemplate>
                                            <telerik:RadComboBox ID="cmbSocialAccount" runat="server" OnDataBound="CmbAccountDataBound1"
                                                Filter="Contains">
                                            </telerik:RadComboBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="Advance" HeaderText="Advance" FilterControlWidth="50px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtAdvance" runat="server" Width="50px" Text='<%# Eval("Advance") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="advance account">
                                        <ItemTemplate>
                                            <telerik:RadComboBox ID="RadComboAdv" runat="server" OnDataBound="CmbAccountDataBound1">
                                            </telerik:RadComboBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="Absent" HeaderText="Absent" FilterControlWidth="50px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtAbsent" runat="server" Width="50px" Text='<%# Eval("Absent") %>'></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="absent account">
                                        <ItemTemplate>
                                            <telerik:RadComboBox ID="RadComboBoxAbsnt" runat="server" OnDataBound="CmbAccountDataBound1">
                                            </telerik:RadComboBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
                <tr>
                    <td>
                        <br>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                     <asp:Button ID="btnSave" runat="server" Text="Save"  Visible="false"/>
                        <%--<asp:Button ID="btnSave" runat="server" Text="Save" Visible="False" OnClientClick="return verify_form('form',0)" />
                        --%>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                            <ProgressTemplate>
                                <img src="../images/wait.gif" alt="dd" />
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

Marin
Telerik team
 answered on 29 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?