Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
71 views
We got a report of Visual Studio crashes still happening due to a bug in the Q1 2010 release of the VSExtensions (2010.1.309).

Running the attached patch by having Visual Studio closed first will help fix the problem.

Best regards,
Erjan Gavalji
Telerik

P.S. Thanks Anthony C. for helping us with this one.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 07 Jul 2011
2 answers
99 views
mega drop down dosn't matched to rtl 
right?
i atached picture
Kate
Telerik team
 answered on 07 Jul 2011
1 answer
144 views
I am using Advanced databinding method. When yapAfter button is clicked I add an item to my List stored in the session according to the specific index and I rebind my List. Also in NeedData Source event my List stored in the session is binded. There is no problem when Allowpaging is off in Listview. However when I turn on Allowpaging the items I added last to my List comes out at the beginning of the List. They are not listed according to the Index I assigned while adding.  

Thanks,
Regards.

<telerik:RadListView ID="RadListView1" runat="server" ItemPlaceholderID="ProductsHolder"
            OnNeedDataSource="RadListView1_NeedDataSource" OnItemDataBound="RadListView1_ItemDataBound"
            OnItemCommand="RadListView1_ItemCommand" DataKeyNames="RID">
            <LayoutTemplate>
                <asp:Panel ID="ProductsHolder" runat="server" />
                <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                    PageSize="50" AllowSEOPaging="False" AllowRouting="False">
                    <Fields>
                        <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                        <telerik:RadDataPagerButtonField FieldType="Numeric" />
                        <telerik:RadDataPagerButtonField FieldType="NextLast" />
                        <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                        <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                            TextBoxWidth="15" />
                        <telerik:RadDataPagerTemplatePageField>
                            <PagerTemplate>
                                <div style="float: right">
                                    <b>Items
                                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                        to
                                        <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                        of
                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                        <br />
                                    </b>
                                </div>
                            </PagerTemplate>
                        </telerik:RadDataPagerTemplatePageField>
                    </Fields>
                </telerik:RadDataPager>
            </LayoutTemplate>
            <ItemTemplate>
                <div id="segment<%#Eval("RID") %>" class="segment">
                    <table>
                        <tr>
                            <td style="width: 50px">
                                <telerik:RadButton ID="RadButton1" runat="server" Text="X" CommandName="deleteSegment">
                                </telerik:RadButton>
                                <input name="Button11" type="button" onclick="javascript:deleteSegment('#segment<%#Eval("RID") %>');"
                                    value="X" />
                            </td>
                            <td style="width: 100%">
                                <textarea id="sourceTextarea" name="sourceTextarea" style="width: 98%"><%#Eval("Segment") %></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                   
                            </td>
                            <td>
                                <telerik:RadButton ID="RadButton2" runat="server" Text="+" CommandName="yapAfter">
                                </telerik:RadButton>
                                <input name="Button11" type="button" onclick="javascript:yapAfter_source('#segment<%#Eval("RID") %>');"
                                    value="+" />
                                <input name="Button11" type="button" onclick="javascript:splitSegment('#segment<%#Eval("RID") %>');"
                                    value="-/-" />
                                <input name="Button11" type="button" onclick="javascript:segmentMerge('#segment<%#Eval("RID") %>');"
                                    value=">|<" />
                            </td>
                        </tr>
                    </table>
                </div>
            </ItemTemplate>
        </telerik:RadListView>


protected void RadListView1_NeedDataSource(object sender, Telerik.Web.UI.RadListViewNeedDataSourceEventArgs e)
    {
        if (!IsPostBack)
        {
            if (String.IsNullOrEmpty(HiddenField1.Value))
                return;
            decimal m_ProjectRef = Convert.ToDecimal(HiddenField1.Value);
            List<prepdata> mList = new List<prepdata>();
            mList = PreprocessHelperDB.getDataSource(m_ProjectRef);
            Session["myList"] = mList;
            RadListView1.DataSource = mList;
        }
        else
        {
            List<prepdata> mList = (List<prepdata>)Session["myList"];
            RadListView1.DataSource = mList;
        }
              
  
    }
  
protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
  
if (String.Equals(e.CommandName, "yapAfter"))
        {
            decimal m_ProjectRef = Convert.ToDecimal(HiddenField1.Value);
  
            RadListViewDataItem dataItem = (RadListViewDataItem)e.ListViewItem;
  
            List<prepdata> mList = new List<prepdata>();
            mList = (List<prepdata>)Session["myList"];
  
            mList.Insert(0, new prepdata { Segment = "asdsadaAA index:" + 0});
  
            mList.Insert(1, new prepdata { Segment = "asdsadaAA:" + 1 });
  
            mList.Insert(5, new prepdata { Segment = "asdsadaAA:" + 5 });
  
            Session.Remove("myList");
  
            Session["myList"] = mList;
  
            RadListView1.Rebind();
  
        }
    }


Pavlina
Telerik team
 answered on 07 Jul 2011
2 answers
92 views
Dear Telerik Team,

In my VS2010 solution, I refer to the newest telerik .dll libraries:
- Telerik.Web.UI.dll (version 2011,1,519,40)
- Telerik.Web.Design.dll (version 2011,1,519,40)

My VS2010 designer have nearly permanently problem to show the RadChart (and not only the RadChart) in the design of my aspx page. Refresh helps, however sometimes... :(

After drag-and-drop from Toolbox, the designer produces this error message:
"Error Creating Control - RadChart1[A]Telerik.Web.UI.RadChart cannot be cast to [B]Telerik.Web.UI.RadChart. Type A originates from 'Telerik.Web.UI, Version=2011.1.519.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\koterec\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\vcxqtkpk01\Telerik.Web.UI.dll'. Type B originates from 'Telerik.Web.UI, Version=2011.1.519.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\koterec\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\pccl1usa01\telerik.web.ui.dll'."

Provide me the solution, please.
Thanks in advance.
SCT
Top achievements
Rank 1
 answered on 07 Jul 2011
4 answers
134 views
I'm going to build a hierarchy structure. Each layer contains about 12 columns and in total I'll have 7 layers of hierarchy.

I have used RadGrid Hierarchy nested table features on some of the pages which had 1-2 nested tables and it works fine, however, on this page because mainly there are 7 layers of hierarchy I can't use RadGrid Nested Tables as the 7th Nested table gets opened in the middle of the page in that case!

What other control could I use to represent such structure?

E.g. Master Detail View, not sure?

Thanks,
Pooya
Top achievements
Rank 1
 answered on 07 Jul 2011
4 answers
119 views
Hi!

I have been trying to put some rad objects inside tooltips as i followed some tutorials, but my problem is when i put radcombobox and raddatepickerit wont work. The radcombobox just let me write thing as the raddatepicker i can't neither do dropdown or make de date window appear.

Many thanks,
Fábio
FEST
Top achievements
Rank 1
 answered on 07 Jul 2011
4 answers
113 views
Hi! I have tried to understand grid basics by following the demos in the website but i can't get the selection right. I'm trying to select an item by selecting a row (i'm not sure that is possible), and i even tried to creat a column (GridButtonColumn) where i set the button as image button and the imageurl for the image i want but i can't get it right, cause it is always appearing a checkbox instead of the image and, althought it selectes the row it does not selects the item in the row (i put a breakpoint in the grid_SelectedItemChanged and it doesn't do anything).
I also tried to do this as an gridtemplatecolumn and it makes appear the image i want but every time i click on it, instead of selecting the row and the item, it gives me an error witch i don't really know whatit means.


Code for the gridButtoncolumn (and grid):
<telerik:RadGrid runat="server"
      style="z-index: 1; left: 10px; top: 450px; position: absolute" 
      CellSpacing="0" DataSourceID="processos" 
      GridLines="None" ID="rg_processos" AutoGenerateColumns="False">
      <headercontextmenu cssclass="GridContextMenu GridContextMenu_Default">
      </headercontextmenu>
      <mastertableview 
      datasourceid="processos">
      <commanditemsettings exporttopdftext="Export to PDF" />
      <rowindicatorcolumn 
      filtercontrolalttext="Filter RowIndicator column">
      <HeaderStyle Width="20px" />
      </rowindicatorcolumn>
      <expandcollapsecolumn 
      filtercontrolalttext="Filter ExpandColumn column">
         <HeaderStyle Width="20px" />
         </expandcollapsecolumn>
         <Columns>
         <telerik:GridClientSelectColumn ButtonType="ImageButton" 
         FilterControlAltText="Filter column1 column" 
         ImageUrl="~/images/select_16_mouse.png" Text="Seleccionar" UniqueName="column1">
                  </telerik:GridClientSelectColumn>
                  <telerik:GridBoundColumn DataField="Sinistrado_ID" DataType="System.Int32" 
                       FilterControlAltText="Filter Sinistrado_ID column" 
                       HeaderText="Sinistrado_ID" SortExpression="Sinistrado_ID" 
                       UniqueName="Sinistrado_ID">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Data_sinistro" DataType="System.DateTime" 
                       FilterControlAltText="Filter Data_sinistro column" HeaderText="Data_sinistro" 
                       SortExpression="Data_sinistro" UniqueName="Data_sinistro">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Nome" 
                       FilterControlAltText="Filter Nome column" HeaderText="Criado/Alterado" 
                       SortExpression="Nome" UniqueName="Nome">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="quando" DataType="System.DateTime" 
                       FilterControlAltText="Filter quando column" HeaderText="Criado/Alterado" 
                       SortExpression="quando" UniqueName="quando">
                       </telerik:GridBoundColumn>
                       </Columns>
                       <editformsettings>
                       <editcolumn 
                filtercontrolalttext="Filter EditCommandColumn column">
                    </editcolumn>
                    </editformsettings>
                    </mastertableview>
                    <clientsettings>
                    <selecting allowrowselect="True" />
                    </clientsettings>
                    <filtermenu enableimagesprites="False">
                    </filtermenu>
                </telerik:RadGrid>

code for the gridtemplatecolumn:
<Columns>
   <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Middle" >
   <ItemTemplate>
   <asp:ImageButton runat="server" ImageUrl="~/images/select_16_mouse.png" />
   </ItemTemplate>
   </telerik:GridTemplateColumn>
   <telerik:GridClientSelectColumn ButtonType="ImageButton" 
   FilterControlAltText="Filter column1 column" 
   ImageUrl="~/images/select_16_mouse.png" Text="Seleccionar" UniqueName="column1">
   </telerik:GridClientSelectColumn>
      <telerik:GridBoundColumn DataField="Sinistrado_ID" DataType="System.Int32" 
      FilterControlAltText="Filter Sinistrado_ID column" 
      HeaderText="Sinistrado_ID" SortExpression="Sinistrado_ID" 
      UniqueName="Sinistrado_ID">
      </telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField="Data_sinistro" DataType="System.DateTime" 
      FilterControlAltText="Filter Data_sinistro column" HeaderText="Data_sinistro" 
      SortExpression="Data_sinistro" UniqueName="Data_sinistro">
      </telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField="Nome" 
       FilterControlAltText="Filter Nome column" HeaderText="Criado/Alterado" 
       SortExpression="Nome" UniqueName="Nome">
      </telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField="quando" DataType="System.DateTime" 
      FilterControlAltText="Filter quando column" HeaderText="Criado/Alterado" 
      SortExpression="quando" UniqueName="quando">
      </telerik:GridBoundColumn>
      </Columns>

One more thing, i only know vb.net and not very much. I can handle html so if possible and the solution calls for code i would appreciate for it to be in vb.net, if is as to be in c# or javascript so be it.

Thanks,
FEST
FEST
Top achievements
Rank 1
 answered on 07 Jul 2011
2 answers
72 views
As a follow up to the earlier question beneath, I'm trying to write some code to assign contacts to facilities.

http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-reference-parent-data-items-in-edititemtemplate.aspx

I'm following samples such as the one beneath but I'm unable to find the correct event that I need to use. I'm currently trying to use 'RadGrid1_InsertCommand' but I imagine that's not working because it's the event that would be used for inserting the parent 'Facilities'.

http://www.telerik.com/community/code-library/aspnet-ajax/grid/automatic-operations-in-hierarchical-grid-with-sqldatasource-control.aspx

Can someone tell me what event I need to be looking at?

Thanks,
Tim


Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
 
    'This event is not firing when I click on the 'Insert' link. What event do I need to use instead?
 
    Dim insertedItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
 
    Dim parentItem As GridDataItem = e.Item.OwnerTableView.ParentItem
    Dim datakey As String = parentItem.OwnerTableView.DataKeyValues(parentItem.ItemIndex)("FacilityID").ToString()
    Dim contactId As Integer = (TryCast(insertedItem("colContactId").Controls(0), DropDownList)).SelectedValue
 
    Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
 
    Try
        conn.Open()
 
        Dim insertQuery As String = "INSERT into FacilityContacts(FacilityId, ContactID) values('" & datakey & "','" & contactId & "')"
        Dim cmd As New SqlCommand(insertQuery, conn)
        cmd.ExecuteNonQuery()
        conn.Close()
 
    Catch ex As Exception
        RadGrid1.Controls.Add(New LiteralControl("Unable to insert contact. Reason: " + ex.Message))
        e.Canceled = True
    Finally
    End Try
 
 
End Sub

<telerik:RadGrid ID="RadGrid1" ShowStatusBar="True" DataSourceID="dsFacilityList"
    runat="server" PageSize="7" AllowSorting="True" AllowPaging="True" GridLines="None"
    CellSpacing="0" AllowAutomaticInserts="True"
    AllowAutomaticUpdates="True" >
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView DataSourceID="dsFacilityList" AllowMultiColumnSorting="True"
        PageSize="20" CommandItemDisplay="Top" DataKeyNames="FacilityID" EditMode="EditForms" >
        <EditItemTemplate>
 
        </EditItemTemplate>
        <DetailTables>
            <telerik:GridTableView runat="server" DataKeyNames="FacilityID"
                DataSourceID="dsFacilityContactList" CommandItemDisplay="Top"
                AutoGenerateColumns="False" AllowAutomaticDeletes="True"
                AllowAutomaticInserts="False">                   
                 
                <EditItemTemplate>
               
                </EditItemTemplate>
                 
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="FacilityID"
                        MasterKeyField="FacilityID" />
                </ParentTableRelation>
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn DataField="ContactID"
                        FilterControlAltText="Filter column column" UniqueName="colContactId" EditFormHeaderTextFormat="">
                        <EditItemTemplate>
                               Select Contact:
                                    <asp:DropDownList ID="cboContactID" runat="server">
                                   </asp:DropDownList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="ContactIDLabel" runat="server" Text='<%# Eval("ContactLongDesc") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
 
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </telerik:GridTableView>
        </DetailTables>
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
        </ExpandCollapseColumn>
        <SortExpressions>
 
        </SortExpressions>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
     
    </MasterTableView>
 
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>

Tim
Top achievements
Rank 1
 answered on 07 Jul 2011
1 answer
80 views
Hi,
Can you please tel me how to validate the DataDescription Fields and Some others Custom Fields Which we added in Scheduler, I m using Defalut Data Forms.
Plamen
Telerik team
 answered on 07 Jul 2011
1 answer
44 views
2011 Q2, the default loading panel that blocks the entire grid when grid is refreshing takes a long time over RDP beause it paints each line by line of the "block". 

Is there a way to optimize this behavior other than changing the loading panel for all?    When viewing over LAN it's fine.

IE8 is noticeably slower than FF5.
Pavel
Telerik team
 answered on 07 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?