Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
150 views
Is it possible to change the view of the row when you drag it? By default you get to see a full floating row when you start to drag it. I would like to change this to an icon, basically the way Windows Explorer works when you drag a row from the details view.

I'm looking at the row drag started client side event to achieve this but not sure if that is correct or if indeed this is possible?
Prasanna
Top achievements
Rank 1
 answered on 31 Dec 2012
4 answers
368 views
Hi There,

I'm trying to add some extra GridTemplateColumns on my Page_Init using my own custom template class. When the page loads the first time, everything is fine and dandy. Yet after a postback from a filter or paging command, things go horribly wrong. More specifically, the extra columns that I i'm adding on Page_Init remain, but for every postback, an extra set of blank columns are added to the grid. My initial thought was to just wrap my Page_Init inside a if(!isPostBack) statement, but then no extra columns show at all after a postback. Please help!

Here's my Page_Init:

protected void Page_Init(object sender, EventArgs e) 
    { 
        ListBuilderTableAdapters.listsTableAdapter listAdapter = new ListBuilderTableAdapters.listsTableAdapter(); 
        ListBuilder.listsDataTable dt = listAdapter.GetActive(); 
 
        foreach (ListBuilder.listsRow dr in dt.Rows) 
        { 
            GridTemplateColumn gtc = new GridTemplateColumn(); 
            gtc.HeaderText = dr.list_name; 
            gtc.ItemTemplate = new MailingListTemplate(dr.list_name, dr.id); 
            mlRadGrid.MasterTableView.Columns.Add(gtc); 
        } 
    } 

... and my custom template looks like this.

public class MailingListTemplate : ITemplate 
    { 
        protected string Text; 
        protected int listID; 
 
        public MailingListTemplate(string Text, int listID) 
        { 
            this.listID = listID; 
            this.Text = Text; 
        } 
 
        public void InstantiateIn(Control container) 
        { 
            HiddenField hf = new HiddenField(); 
            hf.Value = listID.ToString(); 
 
            CheckBox cb = new CheckBox(); 
 
            container.Controls.Add(hf); 
            container.Controls.Add(cb); 
        } 
    } 

Also, my NeedDataSource uses the same datasource that I bind to on my Page_Load:

protected void mlRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
            mlRadGrid.DataSource = recipientAdapter.GetUnique(); 
    } 

Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
87 views
hi there,
     i have set sorting in grid. its working good. but i want to do away with these sorting background colors. can somebody help me out pls. thanks in advance

savyo
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
110 views
Hi,
  I have a problem setting the allowfiltering to true in radgrid. Filtering is appearing in all the columns. How do I disable filtering in the first 2 bound columns.

thanks
Allen
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
4 answers
198 views

Hello,

I have attached code that will allow you to recreate the issue. I want to embed google maps in a tab lay out. I want the map to be on the last tab.

It seems if the tab is selected on page load, the map renders correctly but if not, it will not. To illustrate this, I made a tab strip with two tabs, each with an IFRAME inside. Play with SelectedIndex and what not to see what is happening.

Essentially, whichever pageview will render the IFRAME correctly. I need a way to display the IFRAME on a tab that is not selected on load. Please advise.

Thanks,
Nelson

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1"
EnablePartialRendering="true"
AsyncPostBackTimeOut="600"
runat="server" >
</telerik:RadScriptManager>

<div>

<telerik:RadTabStrip CausesValidation="false" ID="tabInspections" runat="server" Skin="Web20" Width="910px" CssClass="DetailsRadStrip" SelectedIndex="0" MultiPageID="mp1">

<Tabs>
<telerik:RadTab Text="1" Value="1" PageViewID="pv1" ></telerik:RadTab>
<telerik:RadTab Text="2" Value="2" PageViewID="pv2" ></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>

<telerik:RadMultiPage ID="mp1" runat="server" CssClass="pageView" Width="910px">
<telerik:RadPageView ID="pv1" runat="server" Selected="true">
<iframe ID="externalFrame" runat="server" frameborder="0" height="100%"
scrolling="no" marginheight="0" marginwidth="0" style="display: block; text-align: left; " width="100%"></iframe>
</telerik:RadPageView>
<telerik:RadPageView ID="pv2" runat="server">
<iframe ID="externalFrame2" runat="server" frameborder="0" height="100%"
scrolling="no" marginheight="0" marginwidth="0" style="display: block; text-align: left; " width="100%"></iframe>
</telerik:RadPageView>
</telerik:RadMultiPage>
</div>
</form>
</body>
</html>


Partial Class test
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
externalFrame.Attributes.Add("src", "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=495 Eastern Avenue, Chelsea, MA&aq=0&sll=42.348776,-71.072316&sspn=0.028482,0.026565&vpsrc=0&ie=UTF8&hq=&hnear=495 Eastern Ave, Chelsea, Massachusetts 02150&z=14&iwloc=A&output=embed")
externalFrame2.Attributes.Add("src", "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=495 Eastern Avenue, Chelsea, MA&aq=0&sll=42.348776,-71.072316&sspn=0.028482,0.026565&vpsrc=0&ie=UTF8&hq=&hnear=495 Eastern Ave, Chelsea, Massachusetts 02150&z=14&iwloc=A&output=embed")

End Sub
End Class

Justin Wong
Top achievements
Rank 1
 answered on 31 Dec 2012
1 answer
169 views
Hi,
I have a radgrid. I have added a dropdown in the radgrid, which is as follows:

<ItemTemplate>
<asp:DropDownList ID="ddlGender" runat="server" SelectedValue='<%# Eval("UGender") %>' />
<asp:TextBox ID="txtUserId" ReadOnly="true" runat="server" Text='<%# Eval("UserId") %>'  />
  </ItemTemplate>
  
                                                <InsertItemTemplate>
                                                    <asp:DropDownList ID="ddlGender" runat="server">
                                                        <asp:ListItem Text="Male" Value="Male"></asp:ListItem>
                                                        <asp:ListItem Text="Female" Value="Female"></asp:ListItem>
                                                    </asp:DropDownList>
                                                    <asp:TextBox ID="txtUserId" runat="server" ></asp:TextBox>
                                                    </InsertItemTemplate>

In the Insertcommand, i am setting the value to a datatable as below:

DataTable test1 = new DataTable();
  
            GridDataInsertItem item = (GridDataInsertItem)e.Item;
  
            DropDownList ddlGender = (DropDownList)item.FindControl("ddlGender");
            string ddlGendervalue = ddlGender.SelectedValue;
        
            DataRow dr = test1.NewRow();
  
            dr["UGender"] = ddlGendervalue;
test1.Rows.Add(dr);
radgridl.DataSource = this.test1;

I am getting the selected value of the dropdown. However, i am getting the below javascript error and insert is not happening.

Sys.WebForms.PageRequestManagerServerErrorException: 'ddlGender' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

How to fix this?

Thanks
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
132 views
Hi all,

In my RadGrid, I have 3 columns. I need to give the Column header text dynamically. Please provide some solutions.
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
116 views
Telerik Support just explained why one of my RadDatePickers wouldn't pop up so I thought I'd pass it along.

I was using ClientIDMode="Static" to create non-changing IDs for my JavaScript routines. Bad Move!

Here's the explanation as to why you need to stick to AutoID:

"Since these are controls with complex hierarchies of child controls and templates, setting their ClientID mode to Static will break their functionality"

Maybe everyone else already knew this, but there you go.

Ken
vincent
Top achievements
Rank 1
 answered on 30 Dec 2012
2 answers
98 views
Hi All,

I am facing a peculiar design related problem, i have already wasted much time but i am not able to figure out the resolution of this problem. In one of the my page i have many rad controls including radcalender, radscheduler, Radgrid with paging. Now i have added radfilter, after adding radfilter design of the radgrid get distorted. Radfilter is just placed above the radgrid, if i put the radfilter below the radgrid in this case radfilter design get distorted. If i place radfilter anywhere on top of radgrid then design get distorted of only radgrid not any other control. If i remove radfilter it works fine.

Please let me know any solutions.

thanks
Puru
Puru
Top achievements
Rank 1
 answered on 30 Dec 2012
0 answers
86 views
Hi,

I have a tabstrip that has a few static tabs and upon a click of a button, a new tab and a new page user controls (from an ascx file) is attached to the tabstrip and multipageview - through the serverside as per the code below: 

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim mTab As New RadTab()
        mTab.Text = "New Release"
        mTab.SelectedCssClass = "Selected"
        mTab.CssClass = "TopTab"
        Me.tabItemTabs.Tabs.Add(mTab)
 
        Dim mPage As New RadPageView
        ' MsgBox("000" & CStr(Val(Trim(Mid(mMultipage.PageViews(mMultipage.PageViews.Count - 1).ID, 1, 2))) + 1))
        mPage.ID = Trim(Right("000" & CStr(Val(Trim(Mid(mMultipage.PageViews(mMultipage.PageViews.Count - 1).ID, 1, 2))) + 1), 2)) + "_mPage_ReleaseForm"
        Me.mMultipage.PageViews.Add(mPage)
        Me.tabItemTabs.Tabs(tabItemTabs.Tabs.Count - 1).Selected = True
        mMultipage.PageViews(mMultipage.PageViews.Count - 1).Selected = True
    End Sub
 
    Private Sub mMultipage_PageViewCreated(sender As Object, e As Telerik.Web.UI.RadMultiPageEventArgs) Handles mMultipage.PageViewCreated
        Select Case Trim(Mid(e.PageView.ID, 10))
            Case "ReleaseForm"
                Dim userControl As Control = Page.LoadControl("releaseform.ascx")
                userControl.ID = e.PageView.ID & "_userControl"
 
                e.PageView.Controls.Add(userControl)
        End Select
    End Sub

The issue is first dynamic tab/page is NOT persistent! meaning, when I click on the static tab and click on the dynamically generated tab, the page is no longer visible; however this is NOT the case with subsequent tabs. What am I missing here? 

Thank you in advance for your advise. 
Viswanathan
Top achievements
Rank 1
 asked on 30 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?