Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
140 views
I'm trying to populate a DropDownList on my editform (automatically generated), the only fancy thing is that I have 4 options to choose from and i dont want to create a table in a db just to bind it to that.

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" PageSize="20" Skin="Forest">
                   <Columns>
<telerik:GridBoundColumn HeaderText="Discount" UniqueName="ColDiscount" />
        <telerik:GridDropDownColumn HeaderText="
Type" UniqueName="ColDType" >
</Columns>    
 </telerik:RadGrid>


CodeBehind:

Protected Sub RadGrid1_onitemdatabound(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If e.Item.IsInEditMode Then
            Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
            If Not (TypeOf e.Item Is IGridInsertItem) Then
                Dim combo As RadComboBox = DirectCast(item.FindControl("ColDType"), RadComboBox)
                Dim selectedItem As New RadComboBoxItem()
                selectedItem.Text = DirectCast(e.Item.DataItem, DataRowView)("ColDType").ToString()
                selectedItem.Value = DirectCast(e.Item.DataItem, DataRowView)("ColDType").ToString()
                selectedItem.Attributes.Add("coldtype", DirectCast(e.Item.DataItem, DataRowView)("ColDType").ToString())
                combo.Items.Add(selectedItem)
                selectedItem.DataBind()
            End If
        End If
    End Sub



i tried this.
I tried populating it in the handler of the RadGrid1.ItemDataBound event and tried to find the dropdown control with DirectCast(item.FindControl("ColDType"), RadComboBox), but it came back as null so yeah, thats a thing. It couldn't find a ComboBox named ColDType on the autogenerated edit forms. Thats my best guess.

Your help is appreciated, thanks.
Shinu
Top achievements
Rank 2
 answered on 05 Sep 2012
4 answers
110 views
Hi,
I am using RadContextMenu on RadGrid.

I have a little problem with selection row. When I activate context menu with right click on grid, that row select which is fine.
But when I select another row previous row is still selected. 

How do I deselect that row?

thank you,
Jan
Jan
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
99 views
Hi,
I have a radgrid that is opening a new radwindow when i click on any row using this code...

Protected Sub RadGrid1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGrid1.SelectedIndexChanged
    If RadGrid1.SelectedItems.Count > 0 Then
        For Each item As GridDataItem In RadGrid1.SelectedItems
            Dim strid As String
            strid = item("UniqueID").Text
            Session("Selected") = "Selected"
            Session("ID") = strid
            'Response.Redirect("MessageForm1.aspx")
            'Dim script As String
            'script = "<script type='text/javascript'>"
            'script += "Message();"
            'script += "</" + "script>"
            'InjectScript.Text = "<script type='text/javascript'>Return Message();</" + "script>"
            Dim newwindow As New RadWindow
            newwindow.NavigateUrl = "MessageForm1.aspx"
            RadWindow1.Windows.Add(newwindow)
            newwindow.Width = Unit.Pixel(600)
            newwindow.Height = Unit.Pixel(650)
            newwindow.Title = "Message"
        Next
    End If
End Sub
This works fine, except one thing...
It runs twice which gives me two instances of "newwindow"

how do i stop it running twice?
Thanks
Ryan
Radoslav
Telerik team
 answered on 05 Sep 2012
6 answers
225 views
I want bind record in radmenuitem through server side take from data base ,
And also i want find in page load ,

  
<MasterTableView  AllowFilteringByColumn="true" IsFilterItemExpanded="false" HeaderStyle-Width="200px" ItemStyle-Width="200px" CommandItemDisplay="Top" DataKeyNames="lid"  ClientDataKeyNames="lid" Width="100%">
           <CommandItemTemplate>           
               <div style="padding: 5px 0px 5px 7px; text-align: left; font-weight:bold;">
               <span class="gridHeaderTitle">
                   <i><telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"><%= Resources.People.People_List %></telerik:RadCodeBlock></i>
                   </span>
               <table>
               <tr>
               <td align="left">
               <!--#include file = ../Shared/gridHeaderTemplates_Layout.htm-->
               </td>
               <td>
               <telerik:radbutton enablesplitbutton="true" id="SplitButton" autopostback="false"
                   runat="server" text="Transfer Item" onclientclicked="OnClientClicked">
               </telerik:radbutton>           
               <telerik:radcontextmenu id="RadContextMenu1" runat="server" OnClientItemClicked="OnClientItemClicked">
               <Items>
                   <telerik:RadMenuItem id="Temp" >
                   </telerik:RadMenuItem>
               </Items>
           </telerik:radcontextmenu>
               </td>
               </tr>
               </table>                 
               </div>
                
           </CommandItemTemplate>
           <Columns>                                                         
               <telerik:GridClientSelectColumn HeaderStyle-Width="6%" HeaderStyle-HorizontalAlign="Center">
                   <ItemStyle HorizontalAlign="Center" BorderStyle ="None" />
               </telerik:GridClientSelectColumn>                          
           </Columns>               
       </MasterTableView>


Thanks Advance,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
108 views
hello ...
i am here to know is this possible to work with Rad controls( chart controls) in .net because earlier i used this controls in Windows phone.Is it possible to do same thing in .net.

Thank you
Princy
Top achievements
Rank 2
 answered on 05 Sep 2012
1 answer
124 views
I have a situation where I need to allow things to be dragged from one TreeList to another.  Additionally, in the 2nd TreeList I need to be able to reorder the items by dragging and dropping.  I haven't been able to find anything yet on drag and drop capability for the Treelist so I was wondering if anyone has done drag and drop of this sort or whether it's supported, etc.

Thanks in advance for any info.

Steve
Princy
Top achievements
Rank 2
 answered on 05 Sep 2012
10 answers
205 views
Hi All!

Instead of using the session to save/load the DockState for a page, I would like to use the Profiles.  I've not been able to figure out how though.  Has anyone got a working example - including the web.config profile definitions?

I'm more than a little desparate.  hehe

Cheers
Mark.
Joff
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
996 views
Hi,
In our application we are trying to assign shortcut keys for options on the screen,
which requires us to trap keys on client side and accordingly call .click() event of targetted control.
We have some validations set for all these controls in OnClientClicking event.
According to validation conditions we have to stop postback by setting arguments.setCancel(true). Also, on some places we 
need to open rad window pop up after setting postback false.

Issue that we are facing is when we fire click event of these controls using mouse OnClientClicking is being called, but
when we are trying to achieve same by firing .click() from javascript for short cut keys functionality, OnClientClicking is not getting
called.

Please let me know if you have any solution for this. Or some other way to achieve our functionality.
Slav
Telerik team
 answered on 04 Sep 2012
4 answers
256 views
Win 7 64 bit, VS 2010 Pro.

I have installed the Q2 release.  I still see the Q1 items on the VS toolbox (Q1 2011 NET 40).  When I open the Toolbox Configurator, it allows me to choose the new release in the drop down v.2011.2..712.40.  It restarts VS, but nothing has changed, the Q1 items are there, the Q2 items are not.
Govinda
Top achievements
Rank 1
 answered on 04 Sep 2012
3 answers
88 views
We are facing some issues with validators when using the RadGrid (2011.3.1115.40) as follows:

1) The grid has two detail (child) tables
2) Since all rows in the grid are editable, each column uses ItemTemplates with input controls and various validators (server side validation only)
3) All tables are set with HierarchyLoadMode="Client"

When we press the Save button, we call Page.IsValid on the server. This works for the most part, however, we noticed that sometimes validators in detail tables are not firing. We can consistently reproduce the following behavior:

1) Load the page and grid normally
2) Expand any row. Don't enter any data
3) Press save
4) We see the validators have fired
5) Collapse that same row
6) Press save again
7) Now when we expand that same row again, we see that the validators have NOT fired

Please advise.
Ultravelocity
Top achievements
Rank 1
 answered on 04 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?