Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views

It's ok after delete appointment.
But popup does not open after insert appointment. (doubleclick or edit of contextmenu)
I don't know why.
So help me, please.

  • aspx code
<telerik:RadScheduler ID="RadSchedulerTemplate" runat="server" EnableEmbeddedSkins="false"
EnableDescriptionField="true" Height="800"
SelectedView="DayView" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
DataDescriptionField="Description" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID">
<AdvancedForm Modal="true" />
<AppointmentContextMenuSettings EnableDefault="true" />
<TimeSlotContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

  • vb code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
GetSchedule()
End If
End Sub

Private Sub GetSchedule()
Dim dbConnection As SqlConnection = New SqlConnection
Dim dbCommand As SqlCommand = New SqlCommand
Dim dbReader As SqlDataReader = Nothing

dbConnection.ConnectionString = ConfigurationManager.ConnectionStrings("Test").ConnectionString
dbConnection.Open()
dbCommand = dbConnection.CreateCommand
dbCommand.CommandType = CommandType.StoredProcedure
dbCommand.CommandText = "S_GetSchedule"
dbReader = dbCommand.ExecuteReader


RadSchedulerTemplate.DataSource = dbReader
RadSchedulerTemplate.DataBind()

End Sub

... and insert, delete, update code.


And I have another question.
Why does not updated after update appointment?
When I delete or insert, Immediately, I can see rebind data.
But updating does not. Why?

So...I expect your answer. 
(Forgive my basic English skills)

Ivana
Telerik team
 answered on 28 Sep 2011
2 answers
73 views
Hello every one,

How to bind radtextbox in add mode in radgrid_itemcreated,
For Example, i have bind radcomobobox like that i want bind radtextbox, label ,
In bold are radtext i find like that all are come but not assign the values

.cs

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
           {
               if (e.Item.OwnerTableView.IsItemInserted)
               {
                   GridEditFormItem item = (GridEditFormItem)e.Item;
                   RadComboBox RadComboBox_Mainwork = (RadComboBox)item.FindControl("RadComboBox_Mainwork");
                   RadComboBox RadCombo_SubWork = (RadComboBox)item.FindControl("RadCombo_SubWork");
                   RadTextBox projectcode = (RadTextBox)item.FindControl("projectcode");
                   Label projectcode1 = (Label)item.FindControl("projectcode1");
                   RadComboBox RadComboBox1 = (RadComboBox)item.FindControl("RadComboBox1");
 
                   using (var db = new DoskContractServicesDataContext(Globals.strCon))
                   {
                       var orgreqfinal = (from a in db.dsmainworks
                                          select new { a.maincode, a.mainname }).ToList();
                       RadComboBox_Mainwork.DataSource = orgreqfinal;
                       RadComboBox_Mainwork.DataValueField = "maincode";
                       RadComboBox_Mainwork.DataTextField = "mainname";
                       RadComboBox_Mainwork.Items.Insert(0, new RadComboBoxItem("Select Main Work", "-1"));
}
}
}


.aspx
<telerik:RadComboBox ID="RadComboBox_Mainwork" runat="server" Width="85%" DataValueField="maincode"
                                                            DataTextField="mainname" MaxLength="6" AppendDataBoundItems="true"></telerik:RadComboBox>




Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
88 views

Hello,

We used the property RadTextBox control TextMode = "Multiline" within <ItemTemplate> </ telerik: RadPanelItem>, and there is a delay between when the user types and what is displayed in RadTextBox. Property without the property TextMode = "Multiline" is not delayed. You can use the following code:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="567px" 
                Skin="Office2007">
                <Items>
                    <telerik:RadPanelItem Expanded="True" Text="Date generale" runat="server"
                        <Items>
                            <telerik:RadPanelItem Value="AccountInformation" runat="server" Expanded="true" >
                                <ItemTemplate>
                               <table  width="500px" border="0">
        <tr>
               <td valign="top" width="201">
                <asp:Label runat="server" ID="Label3"  Text="Domeniu" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadComboBox ID="cboTip" 
            runat="server" 
            Height="200px" 
            Width="220px" AutoPostBack="True" Skin="Office2007"
           >
        </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
           <td valign="top" class="style6" >
                <asp:Label ID="Label2" runat="server" Text="Subdomeniu" 
                   ></asp:Label>
            </td>
            <td valign="top">
                  <telerik:RadComboBox ID="cboSub" runat="server" AutoPostBack="True" 
                      Height="200px" Skin="Office2007" Width="220px">
                  </telerik:RadComboBox>
            </td>
        </tr>
         <tr>
           <td valign="top" class="style6" >
                <asp:Label ID="Label4" runat="server"  Text="Nr. crt." ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadNumericTextBox ID="txtNr" runat="server" Type="Number" 
                    NumberFormat-DecimalDigits="0" Skin="Office2007">
                        </telerik:RadNumericTextBox>
  
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Camp obligatoriu"
            ControlToValidate="txtNr" ForeColor="Red"></asp:RequiredFieldValidator>
  
            </td>
        </tr>
          <tr>
           <td valign="top" class="style6" >
                <asp:Label ID="Label5" runat="server" Text="Data" ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadDatePicker ID="txtData" runat="server" Skin="Office2007">
                    <Calendar ID="Calendar1" runat="server" Skin="Office2007" UseColumnHeadersAsSelectors="False">
                    </Calendar>
                    <DateInput   DateFormat="dd.MM.yyyy" DisplayDateFormat="dd.MM.yyyy">
                    </DateInput>
                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                </telerik:RadDatePicker>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Camp obligatoriu"
            ControlToValidate="txtData" ForeColor="Red"></asp:RequiredFieldValidator>
  
            </td>
        </tr>
          <tr>
           <td valign="top" class="style6" >
                <asp:Label ID="Label6" runat="server"  Text="Segment" ></asp:Label>
            </td>
            <td valign="top">
               <telerik:RadTextBox runat="server" ID="txtSegment" Skin="Office2007" 
                    Width="300px"></telerik:RadTextBox>
  
                      
            </td>
        </tr>
    </table>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                    <telerik:RadPanelItem Expanded="true"  Text="Valori indicator" runat="server">
                        <Items>
                            <telerik:RadPanelItem Expanded="true" Value="valori" runat="server">
                                    <ItemTemplate>
                                      <table  width="500px" border="0">
        <tr>
               <td valign="top" class="style7">
                <asp:Label ID="Label7" runat="server"  Text="Capitol standard / Cod defect" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadTextBox ID="txtCapitol" runat="server" Skin="Office2007" 
                    Width="300px">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
           <td valign="top" class="style7" >
                <asp:Label ID="Label8" runat="server"  Text="Proces" ></asp:Label>
            </td>
            <td valign="top">
                  <telerik:RadTextBox ID="txtProces" runat="server" Skin="Office2007" 
                      Width="300px">
                  </telerik:RadTextBox>
            </td>
        </tr>
         <tr>
           <td valign="top" class="style7" >
                <asp:Label ID="Label12" runat="server" 
                    Text="Neconformitatea / aspect reclamat" Width="172px"></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadTextBox ID="txtNeconf" runat="server" Height="60px" 
                    Skin="Office2007" TextMode="MultiLine" Width="300px">
                </telerik:RadTextBox>
  
            </td>
        </tr>
          <tr>
           <td valign="top" class="style7" >
                <asp:Label ID="Label10" runat="server" Text="Cauza" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <asp:TextBox ID="txtCauza" runat="server" Width="300px"  Height="60px" TextMode="MultiLine"></asp:TextBox>
  
            </td>
        </tr>
          <tr>
           <td valign="top" class="style7" >
                <asp:Label ID="Label11" runat="server"  Text="Actiuni" ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadTextBox ID="txtActiuni" runat="server" Height="60px" 
                    Skin="Office2007" TextMode="MultiLine" Width="300px">
                </telerik:RadTextBox>
  
                      
            </td>
        </tr>
           <tr>
               <td valign="top" width="201">
                <asp:Label runat="server" ID="Label3"  Text="Recourent" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadComboBox ID="cboRecurent" 
            runat="server" 
            Height="200px" 
            Width="220px" AutoPostBack="True" Skin="Office2007"
           >
        </telerik:RadComboBox>
            </td>
        </tr>
           <tr>
               <td valign="top" width="201">
                <asp:Label runat="server" ID="Label9"  Text="Tip recurenta / neconformitate" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadComboBox ID="cboTipRec" 
            runat="server" 
            Height="200px" 
            Width="220px" AutoPostBack="True" Skin="Office2007"
           >
        </telerik:RadComboBox>
            </td>
        </tr>
         <tr>
               <td valign="top" width="201">
                <asp:Label runat="server" ID="Label13"  Text="Punctaj" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadComboBox ID="cboPunctaj" 
            runat="server" 
            Height="200px" 
            Width="220px" AutoPostBack="True" Skin="Office2007"
           >
        </telerik:RadComboBox>
            </td>
        </tr>
           <tr>
               <td valign="top" width="201">
                <asp:Label runat="server" ID="Label14"  Text="Audit de referinta" 
                   ></asp:Label>
            </td>
            <td valign="top">
                <telerik:RadComboBox ID="cboAudit" 
            runat="server" 
            Height="200px" 
            Width="220px" AutoPostBack="True" Skin="Office2007"
           >
        </telerik:RadComboBox>
            </td>
        </tr>
    </table>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                    
                </Items>
                <CollapseAnimation Duration="100" Type="None" />
                <ExpandAnimation Duration="100" Type="None" />
            </telerik:RadPanelBar>
  
             
              
              
        </telerik:RadAjaxPanel>

Thanks

 

Princy
Top achievements
Rank 2
 answered on 28 Sep 2011
2 answers
241 views
Hi,

I create (server-side) a context menu for a RadTree and set the menu item clicked event:
radTreeView.OnClientContextMenuItemClicked = "OnCatalogTreeItemClicked";

This is the menu item I add:
RadTreeViewContextMenu contextMenu = new RadTreeViewContextMenu();
contextMenu.ClickToOpen = true;
 
RadMenuItem item = new RadMenuItem("Delete this node");
item.Value = "delete";
contextMenu.Items.Add(item);
radTreeView.ContextMenus.Add(contextMenu);

How can I access the item's value (="delete") in the client-side javascript event?
It's quite easy to get the menu item from the event args and also the caption, but how do I get the value?
Or is the value only supposed for server-side usage and I have to add the value as an attribute to the menu item?

Thanks for your help!
JP
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
165 views

Hi greetings,
I'm using radcontrols in my application and they are well.
Currently I'm facing one difficulty with radchart.

Issue::
I'm binding the different  list<int> for the serieses.
If my list contains the zero value there I want to show the line color transparently.
Here is my code.

<telerik:RadChart ID="trndChrt" runat="server"  SeriesOrientation="Vertical" ChartTitle-Visible="false"
                   SkinsOverrideStyles="true" CreateImageMap="false" width="770px" Height="278px">
           <Series>
           <telerik:ChartSeries Type="Line" Name="PTT">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#000099">
                   </FillStyle>
                    <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
                       <EmptyValue Mode="Zero" Line-Color="Transparent">
                       </EmptyValue>
               </Appearance>
           </telerik:ChartSeries>   
           <telerik:ChartSeries Type="Line" Name="VOX" Appearance-LegendDisplayMode="SeriesName">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="Black">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="State Change">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#f85007">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="Active Dispatchers">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#cc00ff">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
           <telerik:ChartSeries Type="Line" Name="Calls">
               <Appearance BarWidthPercent="90" LabelAppearance-Visible="false">
                   <FillStyle FillType="Solid" MainColor="#339933">
                   </FillStyle>
                   <PointMark Visible="True" Border-Width="1" Border-Color="Red" Dimensions-AutoSize="false"
                           Dimensions-Height="3px" Dimensions-Width="4px">
                           <FillStyle MainColor="Yellow" FillType="solid">
                           </FillStyle>
                       </PointMark>
               </Appearance>
           </telerik:ChartSeries>
       </Series>
       <PlotArea Appearance-FillStyle-MainColor="White" XAxis-LayoutMode="Normal" EmptySeriesMessage-Appearance-Visible="false" Appearance-Border-Color="Black"  Appearance-FillStyle-FillType="Solid" DataTable-Appearance-CellWidth="200" EmptySeriesMessage-Visible="false" XAxis-Appearance-MajorGridLines-Color="#d2d2d2" XAxis-Appearance-MajorGridLines-PenStyle="Solid" XAxis-Appearance-MajorGridLines-Width="1">
       </PlotArea>
       <Legend Visible="false">
       </Legend>       
      </telerik:RadChart>

Code behind

for ( int i = 0; i <= 15; i++)
               {
                   lastDate = firstDate.AddHours(hours);
                   var pttCnt = (from records in dtTrend.AsEnumerable() where (records.Field<string>("ActivityType") == "PTT") && (records.Field<DateTime>("BeginTime") >= firstDate) && (records.Field<DateTime>("EndTime") <= lastDate) select records).Count();
                   var voxCnt = (from records in dtTrend.AsEnumerable() where (records.Field<string>("ActivityType") == "VOX") && (records.Field<DateTime>("BeginTime") >= firstDate) && (records.Field<DateTime>("EndTime") <= lastDate) select records).Count();
                   var statChngCnt = (from records in dtTrend.AsEnumerable() where (records.Field<string>("ActivityType") == "State Change") && (records.Field<DateTime>("BeginTime") >= firstDate) && (records.Field<DateTime>("EndTime") <= lastDate) select records).Count();
                   var totalCalCnt = (from records in dtTrend.AsEnumerable() where (records.Field<DateTime>("BeginTime") >= firstDate) && (records.Field<DateTime>("EndTime") <= lastDate) select records).Count();
                   var activeDispatchrCnt = (from records in dtDispatchr.AsEnumerable() where (records.Field<DateTime>("LoginTime") >= firstDate) && (records.Field<DateTime>("LoginTime") <= lastDate) select records).Count();
                     
                   pttList.Add(pttCnt);
                   voxLIst.Add(voxCnt);
                   statChngList.Add(statChngCnt);
                   actDisptchrList.Add(activeDispatchrCnt);
                   totalCalList.Add(totalCalCnt);
                   xAxisDateList.Add(lastDate.Date.ToString("d"));
                   firstDate = lastDate;
               }
               for (int i = 0; i < pttList.Count; i++)
               {
                  
                   trndChrt.Series[0].AddItem(Convert.ToDouble(pttList[i]));
                   trndChrt.Series[1].AddItem(Convert.ToDouble(voxLIst[i]));
                   trndChrt.Series[2].AddItem(Convert.ToDouble(statChngList[i]));
                   trndChrt.Series[3].AddItem(Convert.ToDouble(actDisptchrList[i]));
                   trndChrt.Series[4].AddItem(Convert.ToDouble(totalCalList[i]));
               }

Suppose my one of the list contains values like 1,5,4,5,5,0,4,5,,2,0,22,0
Here for the value "0" I want to have the line in diffrent color or transparent.
and i tried to disable the "empty series message also but i cloud not able.

Please help me as soon as possible.



Missing User
 answered on 28 Sep 2011
1 answer
105 views
Hi,
   I have a RadMultiPage & RadTabStrip. I load the pageviews on tabstrip click, and I load the corresponding usercontrol in the pageview.
All the pageviews loads and works fine. But when I load the usercontrol which has RadAsyncUpload in it, it does not works. Any guess?

Code behind:

protected void rtsPolicysettings_TabClick(object sender, RadTabStripEventArgs e)
{
    AddPageView(e.Tab);
}
  
private void AddPageView(RadTab tab)
{
    RadPageView rpvContainer = new RadPageView();
    rpvContainer.ID = tab.Value;
    rpvContainer.Height = Unit.Pixel(300);
    rmpPolicysettings.PageViews.Add(rpvContainer);
    tab.PageViewID = rpvContainer.ID;
    tab.PageView.Selected = true;
    tab.Selected = true;
}
  
protected void rmpPolicysettings_PageViewCreated(object sender, RadMultiPageEventArgs e)
{
    PolicySettings policySettings = (PolicySettings)Page.LoadControl(e.PageView.ID + ".ascx");
    policySettings.ID = "uc" + e.PageView.ID;
    e.PageView.Controls.Add(policySettings);
}

Designer code:
                                   <telerik:RadTabStrip Width="100%" Orientation="VerticalRight" AutoPostBack="True"
                                       Skin="WebBlue" ID="rtsPolicysettings" runat="server" MultiPageID="rmpPolicysettings"
                                       OnClientTabSelecting="onTabSelecting" OnTabClick="rtsPolicysettings_TabClick"
                                       SelectedIndex="5">
                                       <Tabs>
                                           <telerik:RadTab Value="AddViewQuestions" Font-Size="Small" meta:resourcekey="lnkAddViewQuestionsResource1"
                                               ImageUrl="images/enroll_ques.png">
                                           </telerik:RadTab>
                                           <telerik:RadTab Value="QuestionAnswerSettings" Font-Size="Small" meta:resourcekey="lnkQAAettingsResource1"
                                               ImageUrl="images/enroll_settings.png">
                                           </telerik:RadTab>
                                            
                                       </Tabs>
                                   </telerik:RadTabStrip>
 
<telerik:RadMultiPage ID="rmpPolicysettings" Height="300px" runat="server" OnPageViewCreated="rmpPolicysettings_PageViewCreated">
                                               </telerik:RadMultiPage>

Peter Filipov
Telerik team
 answered on 28 Sep 2011
2 answers
120 views

I used the <CommandItemStyle Font-Bold="true" /> but it doesn't work.. 


Top Coder
Top achievements
Rank 1
 answered on 28 Sep 2011
3 answers
110 views
Hi all :)

I have a SQLData source, connected to radlistbox

I want to retrieve some data when I choose an item

suppose here is my table

Vedios:
- Video ID
- Video Name
- Video Path

I want to ( for example ) to retrieve the name and the path when I choose an Item inside my listbox and set it as a text in atextbox

how can I do that ?


thank you all :)
Peter Filipov
Telerik team
 answered on 28 Sep 2011
3 answers
87 views
Hello,
I create all columns programmatically and try to add a command column. This is how I do that:
Columns.Clear();
            Columns.Add(new GridEditCommandColumn
                            {
                                ItemStyle =
                                    {
                                        Width = Unit.Pixel(50)
                                    },
                                ButtonType = GridButtonColumnType.ImageButton,
                            });
            foreach (GridColumn column in _columnBuilder.BuildColumns(_zsheet, _zTable, _dataSourceProvider))
            {
                Columns.Add(column);
            }
Column added successfully but I can't see its header. 1st data column header is placed over command column. Do I have to do something else when adding a command column?
Thank you.
Dmitry
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
161 views
Hi
         I am working on radgrid. I need to export the radgrid to Pdf. But before exporting i need to insert the some images(my company logo) in the PDF PageTitle and PDF Page Bottom. I dont want to set images in radgrid header or Command items , i want set images in the PDF Document Title and Bottom. Is there any solution to obtain this?

        Also i want to know , If i have a pdf template or Word template with Page title and bottom, Is there any possibility to export the radgrid to that templates?   If so, please let me know.

        My aim is to get Output like the image i have attached with this post.

    

Thanks
Shinu
Top achievements
Rank 2
 answered on 28 Sep 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?