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

I am looking for a simple drag and drop solution from one radgrid that simply has a ssn and name to antoher grid that has positions that personnel can fill.  When I drag from the personnel grid to the position it automatically updates the radgrid with that person whom was droped in and fills it.  I was trying to use example on the site but they use a lot of datasource objects I cannot use, mine is straight code behind.  this is what I ahve so far but the drop is not working to the other radgrid.  I guess I am not getting the Id of the row I am draggging and I need to get the Id of where I drop it to save to the database.  Here is what I have what do i need to add or do differently.


 <table width="100%">
                    <tr>
                        <td align="center" valign="top">
                             <telerik:RadGrid ID="myGridPersonnel" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                <ClientSettings AllowRowsDragDrop="true">
                                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                </ClientSettings>
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="SSN_SM" GridLines="Both" BorderWidth="1px"
                                    BorderColor="#404040" Font-Size="12" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center">
                                    <AlternatingItemStyle BackColor="#B0C4DE" />
                                    <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="Name" HeaderText="NAME" />
                                        </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                        <td align="center" valign="top">
                            <telerik:RadGrid ID="myGridPositions" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                <ClientSettings AllowRowsDragDrop="true">
                                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                </ClientSettings>
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="intPositionId" GridLines="Both" BorderWidth="1px"
                                    BorderColor="#404040" Font-Size="12" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center">
                                    <AlternatingItemStyle BackColor="#B0C4DE" />
                                    <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="strPosnTitle" HeaderText="TITLE" />
                                            <telerik:GridBoundColumn DataField="strpara" HeaderText="PARA" />
                                            <telerik:GridBoundColumn DataField="strLine" HeaderText="LINE" />
                                            <telerik:GridBoundColumn DataField="intPositionNum" HeaderText="POSITION" />
                                            <telerik:GridBoundColumn DataField="strGrade" HeaderText="GRADE" />
                                            <telerik:GridBoundColumn DataField="strMos" HeaderText="MOS" />
                                            <telerik:GridBoundColumn DataField="strFullName" HeaderText="Filled By" />
                                            <telerik:GridTemplateColumn HeaderText="Delete">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="Delete" runat="server" CommandArgument='<%# bind("intPositionId") %>' CommandName="Del">Delete</asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                </table>


 Protected Sub myGridPersonnel_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles myGridSoldier.RowDrop
        If String.IsNullOrEmpty(e.HtmlElement) Then
            If e.DraggedItems(0).OwnerGridID = myGridSoldier.ClientID Then
                Dim destinationIndex As Int32 = -1

                For Each dragged As GridDataItem In e.DraggedItems
                    Dim SSN As String = DirectCast(dragged.GetDataKeyValue("strssn"), String)
                    If SSN IsNot Nothing Then
                        If destinationIndex > -1 Then
                            If e.DropPosition = GridItemDropPosition.Below Then
                                destinationIndex += 1
                            End If
                            sql = "Insert tblMobUnitPersonnel (intpositionId, strssn) Values (45, " & SSN & ")"
                            Response.Write(sql)
                            Response.End()

                            insertUpdateDelete(sql)
                        Else

                        End If
                    End If
                Next
            End If
        End If
    End Sub

Tsvetina
Telerik team
 answered on 08 Aug 2011
3 answers
102 views
I have an application, where i have used RadEditor inside a page with uses master page, i have kept a button for export to PDF, the event fires when i click the button , but nothing happens on screen  , but when i remove master page the code works like a charm.

Below is the aspx code.

<asp:Button ID="ExportToPDFButton" runat="server" Text="Export to PDF" OnClick="ExportToPDFButton_Click" />
                            <telerik:RadEditor ID="ContentEditor" runat="server" ContentFilters="DefaultFilters,PdfExportFilter"
                                Width="100%">
                                <ExportSettings OpenInNewWindow="true" />
                                 
                                <Content></Content>
                            </telerik:RadEditor >


Below is the aspx.cs code

protected void ExportToPDFButton_Click(object sender, EventArgs e)
        {
            ContentEditor.ExportToPdf();
        }

Does any one have faced the problem?

Thank You in advance!
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
111 views
I've added this RadSlider on my page but it looks too big: http://demos.telerik.com/aspnet-ajax/slider/examples/default/defaultcs.aspx

I saw in the source code that <a> tags are generated for each part and their background-image property is set to an embedded image from the skin.

e.g.

<a id="RadSliderDecrease_RadSlider_NoItems" href="#" class="rslHandle rslDecrease" title="Decrease"><span>Decrease</span></a>
.RadSlider_Vista .rslHorizontal a.rslHandle {
  1. background-imageurl('/aspnet-ajax/WebResource.axd?d=YKXu0uPqzZODU8Rvlz3vm72tkkulHEpAptoZciRoZVlkUEitZoBEhzYTVh0eCOgf-fLcrTuvnjwnQ_9cFRN5uK_CqhEi4d5EpjV4QZJsc7vML6J0p5rJ5pc0vb-ym1DrvoWxCHvXbRk-MXl6bny980BwLduK0DqLMasbLoyPJ_o1&t=634460641060000000');
}

How would that be possible to resize the RadSlider images to appear e.g. 50% smaller than the default images?

I hope it had a better design and instead had an <img> tag inside the <a> tag so that I could resize them easily.

Thanks,
Bozhidar
Telerik team
 answered on 08 Aug 2011
3 answers
163 views
Hello,

I'm wonder if I can create a 3D RadChart (Pie).

Please, if it is possible explain to me how to do that

Regards,
Bader
Giuseppe
Telerik team
 answered on 08 Aug 2011
0 answers
65 views
Hi,

I am new to telerik controls
scenario
    I am using formtemplate under editformsetting to generate the fields for insert and updating the records in grid. Alongside the textbox I have customized browse button in which end user select his choice of product and when he hits on complete button of popup, the item selected from the pop up grid should be displayed in the textbox. 

I am unable to assign the value to textbox on close of the window(using AJAX update) as I am not able to get the ID of the same.
<td width="10%"
    <asp:TextBox ID="ProductID" MaxLength="7" Width="200 px" Visible='<% # (Container as  GridItem).OwnerTableView.IsItemInserted %>'  runat="server"> 
  </asp:TextBox
</td
<td width="75%"
<asp:Button ID="btnBrowse" runat="server" Text="..." OnClientClick="popUp('SelectProduct');return false;" /> 
</td>


Thanks     
Vibhor
Top achievements
Rank 1
 asked on 08 Aug 2011
1 answer
313 views
hi,
i need some help/recommendations on making the header height smaller.
it seems that when we are using static-header set to True, the header get to large.

i want the static header so can someone guide us in the right direction?.

here is some of our code:

  <div style="position: absolute; top: 220px; left: 0px; right: 0px; bottom: 0px">
                    <telerik:RadGrid ID="gridGrid" runat="server" GridLines="None" AllowPaging="True"
                        AllowCustomPaging="True" Skin="Office2007" PageSize="5" AllowMultiRowSelection="True">
                        <MasterTableView DataKeyNames="Key" AlternatingItemStyle-BorderStyle="NotSet" RowIndicatorColumn-ItemStyle-VerticalAlign="Middle"
                            RowIndicatorColumn-Groupable="True" AllowFilteringByColumn="True" AllowMultiColumnSorting="True"
                            AllowSorting="True" EnableHeaderContextFilterMenu="True" EnableHeaderContextMenu="True"
                            RowIndicatorColumn-Display="False" 


  <ClientSettings AllowKeyboardNavigation="True" >
                       
                            <Resizing AllowColumnResize="True" AllowRowResize="true" EnableRealTimeResize="True"/>
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true"/>
                        </ClientSettings>




Shinu
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
147 views

i am running into a problem of returning a server side popup. here's my situation

 

1. I am having a grid with a edit command column as

       <telerik:GridEditCommandColumn UniqueName="actions" EditText="Go" ButtonType="PushButton">

            </telerik:GridEditCommandColumn>

2. the editform settings are

       <EditFormSettings PopUpSettings-Modal="true" InsertCaption="Actions" EditFormType="Template">

            <FormTemplate>

                <Action:actions ID="something" runat="server" />

            </FormTemplate>

        </EditFormSettings>

 

3. on the click of of the go button the popup displays a user control

4. on the user control i am displaying a list of link buttons ( can use any of the buttons rad or asp)

5. on the click of the link on the popup i want to navigate to a url built on the code behind for each button.

prior to  navigating to the url, i have to check if the some variables are valid or not for e.g.

if(x is true)

ask user a (some custom message as: this is the situation want to continue)

if user say yes navigate to the url otherwise do nothing or close the edit form popup.

 

the message is different for each linkbutton on the page.

 

I have tried few things nothing seems to be working (frustrated)
on the onclick of the link button, in the code behind:

1. tried using the scriptmanager in code behind as and call the confirmation method by passing in the messga parameter

string messgae = "some messagae"

 ScriptManager.RegisterStartupScript(Page, Page.GetType(), "confirm", "confirmation('&message&')", true);

 

this returns object not defined errorsonce the link is clicked

2. tried

string message = "so ethnugsa";

Page.ClientScript.RegisterStartupScript(this.GetType(), "radConfirm", "radConfirm('"message"', 200,200);", true);

 

not displaying any popup???? and am not sure even if it displays how would i be restricting the user to not navigate on cancel or No click on the popup.

 

 

helppppppp

 

Shinu
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
84 views
Hi,

I've created an onneeddatasource by double clicking the radgrid and this creates a code behind event that work nicely.

I also need to create an update and insert event in the code behind. Writing directly into the ASPX 'source' seems to fail since the events never fire in the code behind. Please tell me the way to use design mode to create an update and insert event on the code behind.

thanks,
Minh Bui

Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
67 views
hi

I have 2 stored proc and i need to bind the result of 2 Proc into a single Radgrid. How should i go about it? thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
87 views
hi i new to telerik. i added the RadComboBox  with autocomplete to my website
its working perfect on Firefox but in chrome  and internet explorer its not working.
Shinu
Top achievements
Rank 2
 answered on 08 Aug 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?