Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
198 views
Hello Admin,
I am a beginner in the web development and need to use telerik radscheduler in our website. I used the radscheduler with sqldatasource control. have been suggested not to use it. So, I want to use custom dataprovider but don't want to customize the advance form. Is it possible?  if yes then Could you please provide the demo project with only custom dataprovider  not the custom advance form? I have gone through some demos on custom dataprovider provided by you on some forums but all have customized advanceform. I also tried to use only custom dataprovider but failed. Also I need to add the Students And Lesson resources at runtime.
My Appointments table contains following fields:
AppointmentId
Subject
Start
[End]
LessonTypeId
InstructorId
CustomerId
RecurrenceRule
RecurenceParentId
Description
IsInactive
IsDelivered
IsEdited
IsDeleted
FlightHours
GroundHours
Comments
------------------------
LessonTypeId , InstructorId, CustomerId are the resources.

Help me.
Please reply as soon as possible.

Thanks in advance,
Roshani
roshani
Top achievements
Rank 1
 answered on 25 Feb 2011
1 answer
62 views
i ran into the problem.
I have a radgrid. I  am using usercontrol to edit/insert new record. 
In usercontrol i have several dropdown, populated from DB.  I neeed to update dropdown list of weatherstation based on selected state. Well, not sure why, but event firing once i click cancel/insert button. I need it to be fired when i am still in the insert/edit mode. I s this possible?

<

 

 

cc1:TabPanel ID ="locationsTab" runat="server" HeaderText="Locations">

 

 

 

<HeaderTemplate>Locations</HeaderTemplate>

 

 

 

<ContentTemplate>

 

 

 

<asp:UpdatePanel id="updPnlLoc" runat="server">

 

 

 

<ContentTemplate>

 

 

 

<asp:SqlDataSource SelectCommand="SELECT locations.id, locations.name, locations.weather_station_id, projects.project_code, locations.project_id, CAST(locations.project_id AS varchar(5)) + ':' + projects.name AS project_ids, projects.description, weather_station.station_name FROM projects INNER JOIN locations ON projects.id = locations.project_id left outer JOIN weather_station ON locations.weather_Station_id= weather_station.id"

 

 

 

ConnectionString="<%$ ConnectionStrings:ECMApp3 %>"

 

 

 

ID="LocationSource" runat="server" DeleteCommand="usp_crud_locations"

 

 

 

 

UpdateCommand="usp_crud_locations" EnableViewState="False"

 

 

 

 

DeleteCommandType="StoredProcedure" InsertCommand="usp_crud_locations"

 

 

 

 

InsertCommandType="StoredProcedure" UpdateCommandType="StoredProcedure">

 

 

 

<DeleteParameters>

 

 

 

<asp:ControlParameter ControlID="RadGrid1" Name="id"

 

 

 

 

PropertyName="SelectedValue" />

 

 

 

<asp:Parameter DefaultValue="3" Name="op" Type="Int32" />

 

 

 

</DeleteParameters>

 

 

 

<UpdateParameters>

 

 

 

<asp:Parameter Name="op" DefaultValue="2" Type="Int32" />

 

 

 

<asp:Parameter DefaultValue="" Name="name" />

 

 

 

<asp:Parameter Name="weather_stat" />

 

 

 

<asp:Parameter Name="id" />

 

 

 

<asp:Parameter Name="user" Type="String" />

 

 

 

</UpdateParameters>

 

 

 

<InsertParameters>

 

 

 

<asp:Parameter DefaultValue="1" Name="op" Type="Int32" />

 

 

 

<asp:Parameter Name="project_id" Type="Int32" />

 

 

 

<asp:Parameter Name="name" Type="String" />

 

 

 

<asp:Parameter Name="weather_stat" Type="Int32" />

 

 

 

<asp:Parameter Name="user" Type="String" />

 

 

 

</InsertParameters>

 

 

 

</asp:SqlDataSource>

 

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="LocationSource"

 

 

 

 

GridLines="None" ShowGroupPanel="false" Skin="Outlook" ShowStatusBar="True"

 

 

 

 

onitemcommand="RadGrid1_ItemCommand"

 

 

 

 

onupdatecommand="RadGrid1_UpdateCommand" AllowAutomaticDeletes="True"

 

 

 

 

AllowAutomaticInserts="True" AllowAutomaticUpdates="True"

 

 

 

 

onitemupdated="RadGrid1_ItemUpdated" ShowFooter="true"

 

 

 

 

oninsertcommand="RadGrid1_InsertCommand"

 

 

 

 

onitemdeleted="RadGrid1_ItemDeleted"

 

 

 

 

oniteminserted="RadGrid1_ItemInserted"

 

 

 

 

onitemcreated="RadGrid1_ItemCreated" onitemdatabound="RadGrid1_ItemDataBound" >

 

 

 

 

<MasterTableView AutoGenerateColumns="False" DataKeyNames="id" CommandItemDisplay="Top"

 

 

 

DataSourceID="LocationSource" GroupLoadMode="server" InsertItemDisplay="Top" AllowAutomaticInserts="true">

 

 

 

 

<CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="true" AddNewRecordImageUrl="img/buttons/add.png" AddNewRecordText="Add new location" />

 

 

 

 

 

 

<GroupByExpressions>

 

 

 

<telerik:GridGroupByExpression>

 

 

 

<SelectFields>

 

 

 

<telerik:GridGroupByField FieldAlias="ProjectIDs" FieldName="project_ids"

 

 

 

 

HeaderValueSeparator=" " />

 

 

 

</SelectFields>

 

 

 

<GroupByFields>

 

 

 

<telerik:GridGroupByField FieldAlias="project_ids" FieldName="project_ids"

 

 

 

 

SortOrder="Ascending" />

 

 

 

</GroupByFields>

 

 

 

</telerik:GridGroupByExpression>

 

 

 

</GroupByExpressions>

 

 

 

 

 

 

<RowIndicatorColumn>

 

 

 

<HeaderStyle Width="20px" />

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

 

 

<Columns>

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

<telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="id"

 

 

 

 

ReadOnly="True" SortExpression="id" UniqueName="id">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText=project_id EditFormColumnIndex=0 UniqueName="project_id" Visible="false" >

 

 

 

<ItemTemplate >

 

 

 

<asp:Label runat="server" ID="project_idL" Text='<%# Eval("project_id") %>'

 

 

 

 

Visible="False"/>

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="project_id" DataType="System.Int32"

 

 

 

 

HeaderText="project_id" SortExpression="project_id" UniqueName="project_id" ReadOnly="True"

 

 

 

Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="project_ids" DataType="System.Int32"

 

 

 

 

HeaderText="project_ids" SortExpression="project_ids" UniqueName="project_ids" ReadOnly="True"

 

 

 

Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn EditFormColumnIndex="0" DataField="name" HeaderText="name"

 

 

 

 

SortExpression="name" UniqueName="name" ColumnEditorID="GridTextBoxColumnEditor1">

 

 

 

<ItemStyle Width="200px" />

 

 

 

 

<HeaderStyle Width="200px" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="Weather Station" EditFormColumnIndex ="0" UniqueName="weather_stat" ColumnEditorID="GridDropDownColumnEditor1" >

 

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="Label6" runat="server" Text='<%# Eval("station_name") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="project_code" HeaderText="project_code"

 

 

 

 

SortExpression="project_code" UniqueName="project_code" ReadOnly="True">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="description" HeaderText="description"

 

 

 

 

SortExpression="description" UniqueName="description" Visible="false" ReadOnly="True">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridButtonColumn ConfirmText="Delete this location?" ConfirmDialogType="RadWindow"

 

 

 

ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"

 

 

 

UniqueName="DeleteColumn">

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

 

<EditFormSettings UserControlName="ProjectEcms.ascx" EditFormType="WebUserControl" CaptionFormatString="Edit properties of Location {0}" >

 

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

 

 

</EditColumn>

 

 

 

 

</EditFormSettings>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowDragToGroup="False">

 

 

 

</ClientSettings>

 

 

 

 

</telerik:RadGrid>

 

 

 

 

<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" />

 

 

 

<telerik:GridTextBoxColumnEditor ID="GridDropDownColumnEditor1" runat="server" TextBoxStyle-Width="350px" />

 

 

 

</ContentTemplate>

 

 

 

</asp:UpdatePanel>

 

 

 

</ContentTemplate>

 

 

 

</cc1:TabPanel>

 





<%

 

@ Control Language="C#" AutoEventWireup="true" CodeFile="projectEcms.ascx.cs" Inherits="projectEcms" %>

 

 

<%

 

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<

 

 

style type="text/css">

 

 

 

.style1

 

{

 

 

font-weight: bold;

 

 

 

 

font-style: italic;

 

 

 

 

color: #000099;

 

 

}

 

 

 

.style2

 

{

 

 

height: 39px;

 

 

}

</

 

 

style>

 

 

 

 

 

<asp:SqlDataSource ID="LProjectsSource" runat="server"

 

 

 

 

ConnectionString="<%$ ConnectionStrings:ECMApp3 %>"

 

 

 

 

 

 

SelectCommand="select id as project_id, isnull(project_code,'')+ '|'+ name as Name from dbo.projects

 

 

union all select null, null">

 

 

</asp:SqlDataSource>

 

 

 

<asp:SqlDataSource ID="WeatherStationSource" runat="server"

 

 

 

 

ConnectionString="<%$ ConnectionStrings:ECMApp3 %>" SelectCommand="select null id, null station_name

 

 

union

 

SELECT id, [station_name] FROM [weather_station] where state=@state">

 

<

 

 

SelectParameters>

 

 

<

 

 

asp:ControlParameter ControlID="StateDropDownList" Direction="Input" Name="state" Type="String" />

 

</

 

 

SelectParameters>

 

 

</

 

 

asp:SqlDataSource>

 

 

<

 

 

asp:SqlDataSource id="States" runat="server" ConnectionString="<%$ ConnectionStrings:ECMApp3 %>" SelectCommand="select distinct state from weather_Station order by state"

 

/>

 

 

<

 

 

table id="TableSensor" cellspacing="2" cellpadding="1" width="400px" border="1" rules="none"

 

 

 

style="BORDER-COLLAPSE: collapse">

 

 

 

<tr>

 

 

 

<td> <asp:Label Text="Project_id :" runat="server" ID="Label1" CssClass="style1" />

 

 

 

</td>

 

 

 

<td>

 

 

 

 

<asp:DropDownList ID="DropDownListprojects" runat="server"

 

 

 

 

DataSourceID="LProjectsSource" DataTextField="Name"

 

 

 

 

DataValueField="project_id" Width="250px" >

 

 

 

</asp:DropDownList>

 

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td> <asp:Label Text="Name :" runat="server" ID="Label3" CssClass="style1" />

 

 

 

</td>

 

 

 

<td>

 

 

 

 

<asp:TextBox ID="Name" runat="server"

 

 

 

 

Text='<%# DataBinder.Eval( Container, "DataItem.name" ) %>'></asp:TextBox>

 

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td> <asp:Label Text="State:" runat="server" ID="Label5" CssClass="style1" />

 

 

 

</td>

 

 

 

<td>

 

 

 

 

<asp:DropDownList ID="StateDropDownList" runat="server"

 

 

 

 

DataSourceID="States" DataTextField="state" DataValueField="state"

 

 

 

 

Width="150px" onselectedindexchanged="StateDropDown_SelectedIndexChanged" >

 

 

 

</asp:DropDownList>

 

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td class="style2"> <asp:Label Text="WeatherStation:" runat="server" ID="Label7"

 

 

 

 

CssClass="style1" />

 

 

 

</td>

 

 

 

<td class="style2">

 

 

 

 

<asp:DropDownList ID="DropDownListweatherStations" runat="server"

 

 

 

 

DataSourceID="WeatherStationSource" DataTextField="station_name"

 

 

 

 

DataValueField="id" Width="250px" >

 

 

 

</asp:DropDownList>

 

 

 

 

</td>

 

 

 

<td class="style2">&nbsp;</td>

 

 

 

<td class="style2">

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

<td align="right" colspan="2">

 

 

 

<asp:button id="btnUpdate" text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'></asp:button>

 

 

 

<asp:button id="btnInsert" text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:button>

 

 

 

&nbsp;

 

 

 

<asp:button id="btnCancel" text="Cancel" runat="server" causesvalidation="False" commandname="Cancel"></asp:button></td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td align="right" colspan="2">

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

</

 

 

table>

 

Princy
Top achievements
Rank 2
 answered on 25 Feb 2011
1 answer
122 views
Hi,

I am binding grid which has some bound fields and some template fields.
Issue is only bound fields are binding to grid & not the template fields.
In template fields (Item template, i have some textboxes and one dropdownlist)
Any help is appreciated.
Can anyone send me sample code or example.
Shinu
Top achievements
Rank 2
 answered on 25 Feb 2011
1 answer
81 views
i am changing column names for grid in code behind

 

 

if (fr == 1)

 

 

{

 

 

 

if (e.Item is GridHeaderItem)

 

 

{

 

 

 

GridHeaderItem headerItem = (GridHeaderItem)e.Item;

 

 

headerItem.Cells[2].Text =

 

"New Name";
}
}
It works fine.But after it i cant sortthis column by clicking on column name?

 

Princy
Top achievements
Rank 2
 answered on 25 Feb 2011
2 answers
92 views

Hello,

When I use a RadComboBox in a TreeListTemplateColumn ItemTemplate, it fails to render properly.
Please see attached image. I tested in IE8 and Firefox. Telerik Version: 2010.3.1317.40.

 

 

 

<telerik:TreeListTemplateColumn DataField="ProcessNameTemplate" UniqueName="ProcessNameTemplate" HeaderText="">
  <ItemTemplate 
     <telerik:RadComboBox ID="rcb" runat="server" 
         Visible="true" AutoPostBack="true" onselectedindexchanged="rcb_SelectedIndexChanged" ></telerik:RadComboBox>   
    </ItemTemplate>
</telerik:TreeListTemplateColumn>

Thank you.

TheLostLeaf
Top achievements
Rank 2
 answered on 24 Feb 2011
3 answers
106 views
Hi,
Can anyone please help with the following issues. I am using file explorer and trying to upload mp3 and wmv files but getting error. the error is "Connection was reset, The connection to the server was reset while page is loading". I am also trying to make seletect multiple files together. Is it possible? and one more thing like I am trying to achieve to upload zip file with multiple contents and after upload unzip all contents. for unzip the file I am using DotNetZip library. How can I do that in server side. please find my demo project. If anyone can help me it would be really appreciated.
Click to download sample code
Dobromir
Telerik team
 answered on 24 Feb 2011
1 answer
63 views
Hi Techies,

When i am trying to export my TelerikGrid to PDF, I am getting the following error, But its generating EXCEL report with out any problem.

System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)


Can any one please help me on this?

Thanks
Sreeni Pavalla
Daniel
Telerik team
 answered on 24 Feb 2011
1 answer
67 views
Hi ,

 I am getting the following error when i am trying to export Telerik grid to PDF

"Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.
Parse error:
An error occurred while parsing EntityName "

any suggestions on this?

Thanks
Sreeni Pavalla
Daniel
Telerik team
 answered on 24 Feb 2011
6 answers
1.0K+ views
Hi,
We bought Telerik ASP.NET controls, and I'm now trying to use a RadTextBox in a stretchable layout. I set RadTextBox's Width to
new Unit(100, UnitType.Percentage) 
but in runtime I see that width is dynamically maintained by Telerik's scripts directly on <input> using "style" attribute and is always set to exact pixel value. And Telerik's scripts make the width visually correct (logically 100% in a layout) only on initial page load. If I resize browser window after page is loaded, width of RadTextBox is not updated and ruins layout.

From forum posts I see that Width handling is a known problem here. But since we are bound by contract terms to deliver application by a fixed deadline, I need at least know when the bug will be fixed by Telerik and released to customers.

Can you give us estimates on when the Width fix will be released?
Leon Aiossa
Top achievements
Rank 1
 answered on 24 Feb 2011
3 answers
498 views
Hello,

When I try to position the RadButton with to the right with:

 

.RadButton_Right,
  
.RadButton_Right .rbDecorated
  
{
  
position: absolute;
  
width: auto;
  
right: 0px
  
}

it doesn't seems working, but it work fines with RadTextBox or other Asp Button, Asp TextBox, I wonder what's the proper way to do it?
Because I want to have few buttons on the left, and a another Button on the right...
Thanks

King Chan
Top achievements
Rank 1
 answered on 24 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?