Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
95 views
Is it possible to insert rows into the Export? I'd like to add a row between the header and the first data row.

I had attempted to do the following in the ExcelMLExportRowCreated method but it ends up not showing any of the data.

If e.RowType = GridExcelBuilder.GridExportExcelMLRowType.HeaderRow Then
    Dim r As New GridExcelBuilder.RowElement
    For Each cell As GridExcelBuilder.CellElement In e.Row.Cells
        Dim c As New GridExcelBuilder.CellElement
        c.Data.DataItem = "test"
        r.Cells.Add(c)
    Next
    'e.Worksheet.Table.Rows.Add(r)
    'e.Worksheet.Table.Rows.Insert(1, r)
End If
R Stewart
Top achievements
Rank 1
 answered on 29 Jul 2010
2 answers
143 views
Hi,

I have a RadAsyncUpload control on my page used for a simple 'email' type functionality where a user can attach documents to a message. On button click to send the message my workflow is this...

  1. Save the message to a database and return the id of the message
  2. Save the recipients of the of the message using the id that is returned from the above function.
  3. I then save each attachment to the db passing in the message id and return the full path of where the file should be saved (looking like this : blah/foo/blah/de/blah/6F9619FF-8B86-D011-B42D-00C04FC964FF.pdf)

My problem is re-naming the file to the guid passed back as the from what i can see the _FileUploaded event (where i can perform this function) fires before my button click event.

Any ideas?
David
Top achievements
Rank 1
 answered on 29 Jul 2010
1 answer
160 views
Hi,

I need to add the Company Logo for each grid export options. In footer of report, we need to show the User Name and Page Info and Printed Date and Time for each page of the data report. I tried with the below method. but its not working.

protected

 

void gridSalaryInfo_GridExporting(object source, Telerik.Web.UI.GridExportingArgs e)

 

{

 

 

string customHTML = "<table><tr><td><asp:Image ID='Image1' runat='server' ImageUrl='~/images/KIB_LOGO.png' AlternateText='KIB' Width='100%' /></td></tr></table>";

 

e.ExportOutput = e.ExportOutput.Replace(

"<body>", String.Format("<body>{0}", customHTML));

 

}

Will you please help me to implement the Export for PDF, CSV, WORD, EXCEL with Header of Logo and Footer of Report Info in each page.
We are in implementation time. your immediate solution will help us.

Regards,
Sheik

Daniel
Telerik team
 answered on 29 Jul 2010
7 answers
191 views
Hi,

    i have a datetimecolumn in grid. and my data from the database has values with time also. so when i give the equal to option after selecting a date, it looks for exact match and says no records. is it possible to match only the date string with the input and display all the records for that date. Please help.

Regards,
Saravanan K
Tsvetoslav
Telerik team
 answered on 29 Jul 2010
1 answer
119 views
Hi

I have timeline view with 16 30 minute duration slots.

I have an appointment that goes from 10 - 10:30, but takes up the 9:30 and 10:00 slot on the timeline, making it look like the appointment lasts for an hour.

Is there a some kind of inclusive/exclusive setting that can be set so this doesn't happen?

Thank You
Peter
Telerik team
 answered on 29 Jul 2010
1 answer
139 views
How do handle an error when using the example of related combos at this link http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

I can not just show a javascript error. I need to parse it first and then complete some action.
I do not see an AfterClientCallBackError hander for the combox. 
Simon
Telerik team
 answered on 29 Jul 2010
2 answers
305 views
Group,
I am new to the telerik tools, and I am using the RadGrid control.  Basically I have the grid populated with data, and I have a

GridEditCommandColumn

 

.  When I click the edit button it turns any fields that aren't set to ReadOnly into editable controls (edit in place).  Two of the columns are GridDateTimeColumn(s) that when in edit mode show as what appears to look similar to a TextBox with a Date and Time Picker next to the "TextBox."

I can't for the life of me, when I select a different date or time, access the new value via c# codebehind when I click update.  Hopefully my code will help explain what I am trying to do.  This code appears in my RadGrid1_UpdateCommand

-- This works and updates my Sql database table. Basically it recognizes the text fields inside the TextBox without any problems.

            TableCell cell8 = item["RunDuration"];  --"RunDuration" is my UniqueName for that GridBoundColumn
            string _RunDuration = (cell8.Controls[0] as TextBox).Text;
            myClass.RunDuration = Convert.ToDecimal(_RunDuration);  -- I created a class in c# to handle inserts/updates

-- I can't get this to work, and I am not sure how to reference a cell that has a Datetimepicker... it doesn't appear to be a textbox, but I
-- can't figure out how to reference it.

            TableCell cell6 = item["RunStartTime"];
            RadDatePicker _StartTime = (cell6.Controls[0] as RadDatePicker);
            mfgProductionRun.StartTime = Convert.ToDateTime(_StartTime);

I get an error of: Unable to cast object of type 'Telerik.Web.UI.RadDateTimePicker' to type 'System.IConvertible'.

Any help is greatly appreciated.  I just want to be able to click the edit button, change the datetime fields if necessary and then have the new values write to the Sql database when I click update..

Jon
Top achievements
Rank 1
 answered on 29 Jul 2010
3 answers
142 views
Hi,

I've managed to find a bug with the combo boxes.  It appears that if the Item text ends with a space (and possibly certain other characters) then javascript and server side code cannot get the selected value from a combo box.

I combine first and surname fields using the following:
COALESCE(FirstName+' ','') + COALESCE(Surname,'')
on some entries there is only a first name and for these the combo box fails.

When testing I found that if I then added a space after the surname then these would fail as well.

Sample code follows:

<telerik:RadComboBox ID="uxContact" Runat="server"  EmptyMessage=" - Select a Client - " AllowCustomText="true" CssClass="fullWidthComboBoxSP" onclientselectedindexchanging="LoadContactChildren" onitemsrequested="uxContact_ItemsRequested" OnClientItemsRequested="DropDownLoaded" MarkFirstMatch="True"></telerik:RadComboBox> 
 
JS  
uxContact = $find('uxFormView_uxContact');  
alert(uxContact.get_value());  
 
VB.NET  
DirectCast(uxFormView.FindControl("uxContact"), RadComboBox).SelectedValue 
I am currently using version 2010.1.519.35

I can get a partial work around by changing by SQL for the time being but obviously this is a problem with the control itself.  It's only started happening since I applied the latest update.

Any idea when a fix can be made (or if indeed a fix has been made on a more recent compilation).

Regards,

Jon


Simon
Telerik team
 answered on 29 Jul 2010
13 answers
291 views
I've just upgraded to the latest internal build to see if this issue is fixed, but it is not. Anyways, in the official release of 2010.1 what was happening is that I had a RadComboBox set to auto post back embedded inside a RadAjaxPanel. When the combo box posted back, all menu selections would disappear except the one selected, no errors to say what was wrong. The rad script manager is in the master page. Anyways, I've applied the latest internal build hotfix to see if that fixes stuff and I still have the same problem, but I get the following java script exception (as reported by Chrome).

/Portal/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3a315e40c1-4559-4b59-ba08-9c63c3f1ef4d%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.706.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af0701647-7e8a-4d81-8815-8bfe442ffdc0%3a16e4e7cd%3af7645509%3a24ee1bba%3a19620875%3a874f8ea2%3a33108d14%3abd8f85e4%3aed16cbdc%3a1e771326%3aaa288e2d:3752Uncaught Error: SYNTAX_ERR: DOM Exception 12
Simon
Telerik team
 answered on 29 Jul 2010
1 answer
142 views
Hi,

  Iam using radschduler. Iam saving the details description,start,end.But how can i differntiate it is personal or work. Iam using checboxes to differentiate personal and work. BUt how can i insert in to the database these checkbox values.Below is my sample code.
I want to insert the Appoinment as personal or WOrk or both . Later I want to display based on the values of checkboxes. Please give me the solution as soons as possible.


    <div class="title">
                Schedule</div>
            <telerik:RadSplitter runat="server" ID="RadSplitter1" PanesBorderSize="0" Width="734px"
                Height="552px" Skin="Office2007" SplitBarsSize="">
                <telerik:RadPane runat="Server" ID="leftPane" Width="240px" MinWidth="240" MaxWidth="300"
                    Scrolling="None" OnClientResizing="hideScrollableArea" OnClientResized="showScrollableArea"
                    OnClientExpanding="hideScrollableArea" OnClientExpanded="showScrollableArea"
                    OnClientCollapsing="hideScrollableArea" OnClientCollapsed="showScrollableArea">
                    <div class="calendar-container">
                        <telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Office2007" AutoPostBack="True"
                            EnableMultiSelect="False" DayNameFormat="FirstTwoLetters" EnableMonthYearFastNavigation="False"
                            OnSelectionChanged="RadCalendar1_SelectionChanged" OnDefaultViewChanged="RadCalendar1_DefaultViewChanged"
                            SelectedDate="" ViewSelectorText="x">
                            <SpecialDays>
                                <telerik:RadCalendarDay Date="" IsToday="True">
                                </telerik:RadCalendarDay>
                            </SpecialDays>
                        </telerik:RadCalendar>
                        <telerik:RadCalendar runat="server" ID="RadCalendar2" Skin="Office2007" AutoPostBack="true"
                            EnableMultiSelect="false" DayNameFormat="FirstTwoLetters" EnableNavigation="false"
                            EnableMonthYearFastNavigation="false" OnSelectionChanged="RadCalendar2_SelectionChanged">
                        </telerik:RadCalendar>
                    </div>
                    <telerik:RadPanelBar runat="server" Skin="Office2007" ID="PanelBar" Width="100%">
                        <Items>
                            <telerik:RadPanelItem runat="server" Text="To Do" Expanded="true">
                                <Items>
                                    <telerik:RadPanelItem runat="server">
                                        <ItemTemplate>
                                          
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="My Calendar" Expanded="true">
                                <Items>
                                    <telerik:RadPanelItem runat="server">
                                        <ItemTemplate>
                                            <div class="rpCheckBoxPanel">
                                                <div>
                                                    <asp:CheckBox ID="chkQ1" runat="server" Text="Personal" Checked="true" AutoPostBack="true"
                                                        OnCheckedChanged="CheckBoxes_CheckedChanged" />
                                                </div>
                                                <div>
                                                    <asp:CheckBox ID="chkQ2" runat="server" Text="Work" Checked="true" AutoPostBack="true"
                                                        OnCheckedChanged="CheckBoxes_CheckedChanged" />
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadPane>
                <telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" />
                <telerik:RadPane runat="Server" ID="rightPane" Scrolling="None" Width="490px">
                    <telerik:RadScheduler runat="server" ID="RadScheduler" Skin="Office2007" DataSourceID="UsersSqlDataSource"
                        Height="551px" ShowFooter="False" DataKeyField="TaskID" DataDescriptionField="Description" data
                        DataStartField="Start" DataEndField="End" DataSubjectField="Subject"
                        TimeZoneOffset="03:00:00" DayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"
                        EnableDescriptionField="True" AppointmentStyleMode="Default" AllowEdit="true" AllowDelete="true" AllowInsert="true">
                        <AdvancedForm Modal="true" />
                        <TimelineView UserSelectable="false" />
                        <ResourceStyles>
                            <%--AppointmentStyleMode must be explicitly set to Default (see above) otherwise setting BackColor/BorderColor
                         will switch the appointments to Simple rendering (no rounded corners and gradients)--%>
                            <telerik:ResourceStyleMapping Type="Calendar" Text="Development" />
                            <telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />
                            <telerik:ResourceStyleMapping Type="Calendar" Text="Work" ApplyCssClass="rsCategoryOrange" />
                        </ResourceStyles>
                        <AppointmentTemplate>
                            <div class="rsAptSubject">
                                <%# Eval("Subject") %>
                            </div>
                            <%# Eval("Description") %>
                        </AppointmentTemplate>
                        <TimeSlotContextMenuSettings EnableDefault="true" />
                        <AppointmentContextMenuSettings EnableDefault="true" />
                    </telerik:RadScheduler>
                </telerik:RadPane>
            </telerik:RadSplitter>
            <asp:SqlDataSource ID="UsersSqlDataSource" runat="server" ProviderName="System.Data.SqlClient"
                ConnectionString="Data Source=INTNSOR-D0768\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"
                SelectCommand="SELECT * FROM [Tasks] where CompanyID=@CompanyID"
                InsertCommand="INSERT INTO [Tasks] ([Subject], [Description], [Start], [End], CompanyID) VALUES (@Subject, @Description, @Start, @End, @CompanyID)"
                UpdateCommand="UPDATE [Tasks] SET [Subject] = @Subject, [Description] = @Description, [Start] = @Start, [End] = @End WHERE TaskID = @TaskID"
                DeleteCommand="DELETE FROM [Tasks] WHERE [TaskID] =@TaskID ">
                <SelectParameters>
                    <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" />
                </SelectParameters>
                <DeleteParameters>
                    <asp:Parameter Name="TaskID" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Subject" Type="String" />
                    <asp:Parameter Name="Description" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:Parameter Name="TaskID" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="Subject" Type="String" />
                    <asp:Parameter Name="Description" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" />
                </InsertParameters>
            </asp:SqlDataSource>
Peter
Telerik team
 answered on 29 Jul 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?