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

I am building a list of questions with controls. One of the question returns with a radiobutton list, that when the user selects "other" a textbox will display for them to enter in additional information. I must be missing something, when I debug it looks like the textbox should work fine however the textbox never shows up... can somone help me to see what i am missing? My guess is that I somehow need to add this new textbox I am building to the AjaxManager ( if so can someone show me how to do this ? )...

I would have thought it would be ok as it is in the Placeholder that is already in the AjaxManager ?

here is the class:

public

 

partial class Tools_Workforce_OUT_PulseSurveyQuestions : EDCC.PageBase

 

{

private string _login = string.Empty;

 

private string _user = string.Empty;

 

private string _location = string.Empty;

 

private string _roll = string.Empty;

 

private string _sup = string.Empty;

 

string surveyType = "Video";

 

protected override void Page_Load(object sender, EventArgs e)

{

 

// Use to get user info from Active diretory

 

ActiveDirectoryBase ad = new ActiveDirectoryBase(User.Identity.Name.Split('\\')[1]);

 

base.lblMaster("PageName", "~/Tools/Workforce/OUT_PulseSurveyQuestions.aspx");

 

base.lblMaster("LastMod", "06/11/2009");

 

base.lblMaster("lblHeader", "Pulse Survey");

 

base.showMasterControl("pnlFooterLinks", base.m_CharterBase.GetSiteKey("ShowFooterLinks"));

 

base.showMasterControl("pnlUserInfo", "false");

 

base.showMasterControl("pnlMenu", "false");

 

(EDCC.
User)Master.curUser = (EDCC.User)base.curUser();

 

// assign user info from Active diretory

 

_login = ad.DomainLogin;

_user = ad.DisplayName;

_location = ad.Location ==
string.Empty ? ad.Department : ad.Location;

_roll = ad.Title;

_sup = ad.Supervisor.FullName;

Page.Header.Title =
"Pulse Survey";

 

 

//surveyType = Request.QueryString["Type"];

 

lblPageTitle.Text = surveyType + " Pulse Survey ";if (!Page.IsPostBack)

{

GetPLSS_State();

 

//GetQuestions();

 

}

 

base.Page_Load(sender, e);

}

 

// questions & controls stay if there is a postback

 

protected override void OnInit(EventArgs e)

{

base.OnInit(e);

GetQuestions();

}

 

#region DropDownsprivate void GetPLSS_State()

{

 

CharterBaseNew db = new CharterBaseNew("EDCCConnectString");

 

DataSet ds = db.ExecuteDataSet("PLSS_GetState", CommandType.StoredProcedure, CharterBaseNew.DbConnectionState.CloseOnExit);int i = ds.Tables.Count;

ddlState.DataSource = ds.Tables[0];

ddlState.DataTextField =

"State";

 

ddlState.DataValueField =

"State";

ddlState.DataBind();

ddlState.Items.Insert(0,
new RadComboBoxItem("** Pick A State **"));

}

private void GetPLSS_City()

{

CharterBaseNew db = new CharterBaseNew("EDCCConnectString");

db.AddParameter(

"@State", ddlState.SelectedValue);

 

DataSet ds = db.ExecuteDataSet("PLSS_GetCity", CommandType.StoredProcedure, CharterBaseNew.DbConnectionState.CloseOnExit);int i = ds.Tables.Count;

ddlCity.DataSource = ds.Tables[0];

ddlCity.DataTextField =

"City";

 

ddlCity.DataValueField =

"City";

ddlCity.DataBind();

ddlCity.Items.Insert(0,
new RadComboBoxItem("** Pick A City **"));

}

 

// show only cities in that state

 

protected void ddlState_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

{

lblCity.Visible =
true;ddlCity.Visible = true;

GetPLSS_City();

}

 

// to find out if other is selected, show textbox

 

protected void ddlCity_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

{

if (ddlCity.SelectedValue == "Other")

{

txtOther.Visible =
true;lblOther.Visible = true;

}

 

else

 

{

txtOther.Visible =
false;lblOther.Visible = false;

}

}

#endregion

 

//BUILD THE CONTROLS FROM THE LIST OF QUESTIONS

 

public void GetQuestions()

{

foreach (PulseSurveyQuestions q in PulseSurveyQuestions.getQuestions(surveyType))

{

string refType = q.RefListType;

 

// creates an HTML line break

 

HtmlGenericControl lineBreak = new HtmlGenericControl("br");

 

//builds questions

 

Label lblquestion = new Label();

lblquestion.ID =

"lblquestion" + surveyType + q.QuestionID;

 

lblquestion.Text = q.Question +

"<br/>";

lblquestion.CssClass =

"LblName";

 

lblquestion.EnableViewState =

true;

ph1.Controls.Add(lblquestion);

 

 

//builds Radiobutton list based on surveyType (ie: video, HSI, phone)

 

 

// and based on ControlType

 

if (q.ControlType == PulseSurveyQuestionTypes.RadioButtonList)

{

RadioButtonList rbl = new RadioButtonList();

rbl.ID =

"rbl" + surveyType + q.QuestionID;

 

rbl.CssClass =

"LblName";

rbl.Font.Size = 11;

rbl.DataSource =
DataGateway.Instance.GetList(refType).Tables[0];

rbl.DataTextField =

"DisplayText";

 

rbl.DataValueField =

"ValueText";

rbl.DataBind();

rbl.AutoPostBack =
true;rbl.EnableViewState = true;

ph1.Controls.Add(rbl);

ph1.Controls.Add(lineBreak);

rbl.SelectedIndexChanged +=
new EventHandler(rbl_SelectedIndexChanged);

}

 

//builds a textbox based on controlType

 

else if (q.ControlType == PulseSurveyQuestionTypes.TextBox)

{

TextBox txt = new TextBox();

txt.ID =

"txt" + surveyType + q.QuestionID;

 

txt.CssClass =

"LblName";

txt.Font.Size = 11;

txt.Width = 300;

txt.EnableViewState =
true;

ph1.Controls.Add(txt);

ph1.Controls.Add(lineBreak);

}

 

//builds a radiobutton list based on controlType (yes/no)

 

else if (q.ControlType == PulseSurveyQuestionTypes.YesNoRadio)

{

RadioButtonList rblYesNo = new RadioButtonList();

rblYesNo.ID =

"rbl" + surveyType + q.QuestionID;

 

rblYesNo.CssClass =

"LblName";

rblYesNo.DataSource =

DataGateway.Instance.GetList(refType).Tables[0];

 

rblYesNo.DataTextField =

"DisplayText";rblYesNo.DataValueField = "ValueText";

rblYesNo.DataBind();

rblYesNo.EnableViewState =
true;

ph1.Controls.Add(rblYesNo);

ph1.Controls.Add(lineBreak);

}

 

//builds a dropdown based on controlType

 

else if (q.ControlType == PulseSurveyQuestionTypes.DropDown)

{

RadComboBox ddl = new RadComboBox();

ddl.ID =

"ddl" + surveyType + q.QuestionID;

 

ddl.Skin =

"WebBlue";

ddl.DataSource =

DataGateway.Instance.GetList(refType).Tables[0];

 

ddl.DataTextField =

"DisplayText";ddl.DataValueField = "ValueText";

ddl.DataBind();

ddl.Items.Insert(0,

new RadComboBoxItem("** Box Type **"));

 

ddl.CssClass =

"LblName";ddl.EnableViewState = true;

ph1.Controls.Add(ddl);

ph1.Controls.Add(lineBreak);

}

 

//builds a textbox with an add button based on controlType

 

 

// this is for account number

 

else if (q.ControlType == PulseSurveyQuestionTypes.TextBoxAddToList)

{

TextBox txtAdd = new TextBox();

txtAdd.ID =

"txtAdd" + surveyType + q.QuestionID;

 

txtAdd.CssClass =

"LblName";

txtAdd.Font.Size = 11;

txtAdd.EnableViewState =
true;

ph1.Controls.Add(txtAdd);

ph1.Controls.Add(lineBreak);

 

// add button to add another textbox

 

Button bt = new Button();

bt.ID =

"btAdd";

 

bt.Text =

"Add another account";

ph1.Controls.Add(bt);

}

 

//builds a multiLine textbox based on controlType

 

else if (q.ControlType == PulseSurveyQuestionTypes.multiTextBox)

{

TextBox txtMulti = new TextBox();

txtMulti.ID =

"txtMulti" + surveyType + q.QuestionID;

 

txtMulti.CssClass =

"LblName";

txtMulti.Font.Size = 11;

txtMulti.TextMode =
TextBoxMode.MultiLine;

txtMulti.Width = 300;

txtMulti.Height = 100;

txtMulti.EnableViewState =
true;

ph1.Controls.Add(txtMulti);

ph1.Controls.Add(lineBreak);

}

}

}

 

// will build a textbox when "Other" or "Error code on Box") is selected

 

protected void rbl_SelectedIndexChanged(object sender, EventArgs e)

{

RadioButtonList rdbl = (RadioButtonList)sender;if (rdbl != null)

{

if (surveyType == "Video")

{

if ((rdbl.Text == "Other") || (rdbl.Text == "Error code on Box"))

{

 

TextBox txtOther = new TextBox();

 

txtOther.ID =

"txtRblOther";txtOther.CssClass = "LblName";

txtOther.Font.Size = 11;

ph1.Controls.Add(txtOther);

}

}

}

}

protected override void LoadViewState(object savedState)

{

base.LoadViewState(savedState);

}

}

 

here is the front end :

 

<table>

 

 

<tr>

 

 

<td colspan="2" height="35px">

 

 

<asp:Label ID="Label1" runat="server" Text="What area are you receiving calls from in the last 10-15 mins?"

 

 

CssClass="LblName"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr >

 

 

<td valign="top">

 

 

<asp:Label ID="lblState" runat="server" Text="State" Width="25px" CssClass="LblName"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="ddlState" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlState_SelectedIndexChanged"

 

 

Skin="WebBlue">

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

<ExpandAnimation Type="OutQuart"></ExpandAnimation>

 

 

</telerik:RadComboBox>

 

 

<asp:Label ID="lblOther" runat="server" Text="Please enter in the missing city."

 

 

Style="z-index: 106; left: 190px; position: relative; top: -5px;" CssClass="LblName"

 

 

Font-Size="Small" Visible="False" ></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td valign="top">

 

 

<asp:Label ID="lblCity" runat="server" Text="City" Width="25px" CssClass="LblName"

 

 

Visible="false"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="ddlCity" runat="server" Skin="WebBlue" Visible="False" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged"

 

AutoPostBack="True"

 

ToolTip="Please select Other if you cannot find the city your looking for.">

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

<ExpandAnimation Type="OutQuart"></ExpandAnimation>

 

 

</telerik:RadComboBox>

 

<asp:TextBox ID="txtOther" runat="server" Visible="false" Style="z-index: 104; left: 190px;

 

position: relative; top: -20px;"></asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

 

<asp:PlaceHolder id="ph1" runat="server"></asp:PlaceHolder>

 

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="ddlState">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="ddlState" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="lblCity" />

 

<telerik:AjaxUpdatedControl ControlID="ddlCity" />

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="ddlCity">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="lblOther" />

 

<telerik:AjaxUpdatedControl ControlID="txtOther"

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="ph1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="ph1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

</

 

asp:Content>

 

 

Gina
Top achievements
Rank 1
 answered on 22 Jun 2009
6 answers
685 views
Hi,

I'm trying to use the custom sorting with my RadGrid. On SortCommand, I'm sorting the reocrds in db and rebinding the DataSource. After that, it's trying to run the default/internal sorting. Is there anyway to turn off the default sorting in RadGrid and just use the custom sorting?

Following is my sample code.

 

<telerik:RadGrid ID="grdStudentResult" runat="server" Width="99%"   
    AllowMultiRowSelection="false" AllowMultiRowEdit="false" AllowPaging="true"   
        AutoGenerateColumns="False" ShowStatusBar="False" PageSize="20"   
    GridLines="None" AllowSorting="true" Skin="Gray" BorderStyle="None" OnSortCommand="grdStudentResult_GridSortCommand" 
        OnNeedDataSource="grdStudentResult_NeedDataSource" OnItemDataBound="grdStudentResult_ItemDataBound">  
      
    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True" Position="TopAndBottom"   
                  PagerTextFormat="Records {2} - {3} of {5} | Displaying page {0} of {1} | {4}" /> 
 
 
    <HeaderStyle BackColor="White" CssClass="label" Font-Bold="True" Font-Underline="True" ForeColor="#222C80" />                  
    <MasterTableView Width="100%"  AutoGenerateColumns="False" DataKeyNames="StudentId" EditMode="InPlace" InsertItemDisplay="Bottom"   
        HeaderStyle-CssClass="label" BorderStyle="None" BackColor="White" HeaderStyle-ForeColor="#222C80" AlternatingItemStyle-BackColor="White"   
        HeaderStyle-Font-Size="11px" EditItemStyle-BackColor="#FFFF99" EditItemStyle-VerticalAlign="Middle"  AllowCustomSorting="true" AllowNaturalSort="false" AllowSorting="true" 
        CommandItemSettings-RefreshImageUrl="../../../App_Themes/Default/images/spacer.gif" NoMasterRecordsText="No records found for the selected search criteria.">  
 
        <CommandItemSettings RefreshText="" /> 
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Student Name" UniqueName="StudentName"  SortExpression="LastName" > 
                <ItemTemplate> 
                    <asp:LinkButton   
                            runat="server" 
                            ID="lnkStudentName"   
                            Text='' CSSClass="linkButton">  
                            </asp:LinkButton> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Student ID" UniqueName="StudentID" SortExpression="StudentId" > 
                    <ItemTemplate><asp:Label runat="server" ID="lblStudentID" Text=''></asp:Label></ItemTemplate>  
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Email Address" UniqueName="EmailAddress" SortExpression="EmailAddress" > 
                    <ItemTemplate> 
                        <asp:HyperLink CSSClass="linkButton" 
                                runat="server" 
                                ID="lnkEmailAddress"   
                                Text='<%# Eval("EmailAddress") %>'   
                                NavigateUrl=''>  
                                </asp:HyperLink> 
                    </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Waiver Status"  UniqueName="WaiverStatus" SortExpression="RecentWaiverResponseStatus" > 
                    <ItemTemplate><asp:Label runat="server" ID="lblWaiverStatus" Text=''></asp:Label></ItemTemplate>  
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Waiver Name"  UniqueName="WaiverName" SortExpression="RecentWaiverResponseName" > 
                    <ItemTemplate> 
                    <asp:HyperLink CSSClass="linkButton" 
                            runat="server" 
                            ID="lnkWaiverName"   
                            Text='<%# Eval("RecentWaiverResponseFormattedName") %>'   
                            NavigateUrl=''>  
                            </asp:HyperLink> 
                    </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Coverage Status"  UniqueName="CoverageStatus" SortExpression="CoverageStatus" > 
                    <ItemTemplate><asp:Label runat="server" ID="lblCoverageStatus" Text='<%# Eval("CoverageStatus") %>'></asp:Label></ItemTemplate>  
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 
 

Thanks
Sathish

protected void grdStudentResult_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
{  
    if (Page.IsPostBack)  
    {  
        presenter.SearchStudents();  
    }   
}  
 
protected void grdStudentResult_GridSortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e)  
{  
    if (e.Item.ItemType != GridItemType.Header)  
        return;  
 
    SortOrder sortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), e.NewSortOrder.ToString());  
    e.Item.OwnerTableView.DataSource = presenter.SortResult(e.CommandArgument.ToString(), sortOrder);  
    e.Item.OwnerTableView.Rebind();  
}  
 
protected void grdStudentResult_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
{  
 
} 


Sathish
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
99 views
I'm not sure I quite understand how the extension of GridTextColumnEditor goes, say I have extended the class like this:

public
 class CustomEditor : GridTextColumnEditor 
{ 
    private TextBox textBox; 
 
    protected override void LoadControlsFromContainer() 
    { 
        this.textBox = this.ContainerControl.Controls[0] as TextBox; 
    } 
    public override bool IsInitialized 
    { 
        get 
        { 
            return this.textBox != null; 
        } 
    } 
    public override string Text 
    { 
        get 
        { 
            return "salmon"; 
        } 
        set 
        { 
            this.textBox.Text = value; 
        } 
    } 
    protected override void AddControlsToContainer() 
    { 
        this.textBox = new TextBox(); 
        this.ContainerControl.Controls.Add(this.textBox); 
    } 
} 
But the field still gets updated with the value entered in the textBox, instead of "salmon". Why is this? I want to implement a custom editor which consists of two TextBoxes, which contain the cell value splitted by the first whitespace character, and it returns the the value combined from the two TextBoxes.
Veli
Telerik team
 answered on 22 Jun 2009
1 answer
129 views

Hi to all,
in my szenario i have a RadGrid with RadComboBoxes for every DataRow.

I have 12 DataRows and hide 10 of them, because of an Filter-Event by the user.

For the remaining 2 DataRows i change the values of the combo boxes on clientside.

Until here everything works.

But now i do a postback and would like to find the remaining 2 Datarow.
This does not work! Because i have no indicator.

The Indicator i needed i would like to set on clientside. The Indicator can be to set the datarow to selected or to check a checkbox in a GridTemplateColumn

<telerik:GridTemplateColumn> 
                          <ItemTemplate> 
                                <asp:CheckBox ID="chkbSelected" runat="server" /> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 

In this the JavaScript Code in which i try to set the Datarow to selected. But on the ParentObject this doesn´t work.

        //global DOM ID registry.  filled up by scripts rendered from templates.    
        var registeredElements = [];  
        //looks for an element that has been registered with the global array    
        //requires that we emit a registration script block for each server control    
        function GetRegisteredServerElement(serverID) {  
            var clientID = "";  
            for (var i = 0; i < registeredElements.length; i++) {  
                clientID = registeredElements[i];  
                var combo           = $find(clientID);  
                //Get the parent object, because this object has the visible attribute we need  
                var ParentObject    = $find(combo.get_parent().get_id());  
                //Check whether the value exists in the RadComboBox  
                var IsObject        = combo.findItemByText(ColumnDecisonCombo.get_text());  
                //declare a the dom elements to change the backgroundColor  
                var inputArea       = combo.get_inputDomElement();                  
                //Only if the parent object is visible true and the RadComboBox contains the value  
                if (ParentObject.get_visible() && (IsObject != null)) {  
                   /////HERE i NEED HELP   
                   ParentObject.set_selected();  
 
                    combo.set_value(ColumnDecisonCombo.get_value());  
                    combo.set_text(ColumnDecisonCombo.get_text());  
                      
                    inputArea.style.backgroundColor = "green" 
                }  
                else {  
                    inputArea.style.backgroundColor = "red" 
                }  
            }  
        } 

Thanks

Georgi Krustev
Telerik team
 answered on 22 Jun 2009
1 answer
113 views
I am trying to use the grid Header Context Menu to make sorting easier for the user.  Some of my columns use custom sort expressions that are not strictly alphabetical.  The sorting that occurs due to using the context menu doesn't seem to respect these custom expressions.  How can I get the context menu to use my custom sort expressions?
Georgi Krustev
Telerik team
 answered on 22 Jun 2009
2 answers
163 views
Hi

I have inserted a simple grid in a page, set up for automatic generation of edit and delete columns, allowing automatic
update insert and delete.  The edit and delete parts works fine but the 'add new' button does not show up.

I can't see why not. Can anyone help here?

Version is Q1 2009

Thanks

Clive

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
            ConnectionString="<%$ ConnectionStrings:cotn_publicConnectionString %>"   
            DeleteCommand="DELETE FROM [WeeklySubs] WHERE [ID] = @ID"   
            InsertCommand="INSERT INTO [WeeklySubs] ([FirstName], [LastName], [Email], [Status], [CreateDate], [IP]) VALUES (@FirstName, @LastName, @Email, @Status, @CreateDate, @IP, @HTML, @Spare)"   
            SelectCommand="SELECT * FROM [WeeklySubs] ORDER BY [LastName]"   
            UpdateCommand="UPDATE [WeeklySubs] SET [FirstName] = @FirstName, [LastName] = @LastName, [Email] = @Email, [Status] = @Status, [CreateDate] = @CreateDate, [IP] = @IP WHERE [ID] = @ID">  
            <DeleteParameters> 
                <asp:Parameter Name="ID" Type="Int32" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="FirstName" Type="String" /> 
                <asp:Parameter Name="LastName" Type="String" /> 
                <asp:Parameter Name="Email" Type="String" /> 
                <asp:Parameter Name="Status" Type="String" /> 
                <asp:Parameter Name="CreateDate" Type="DateTime" /> 
                <asp:Parameter Name="IP" Type="String" /> 
                <asp:Parameter Name="HTML" Type="String" /> 
                <asp:Parameter Name="Spare" Type="String" /> 
                <asp:Parameter Name="ID" Type="Int32" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="FirstName" Type="String" /> 
                <asp:Parameter Name="LastName" Type="String" /> 
                <asp:Parameter Name="Email" Type="String" /> 
                <asp:Parameter Name="Status" Type="String" /> 
                <asp:Parameter Name="CreateDate" Type="DateTime" /> 
                <asp:Parameter Name="IP" Type="String" /> 
                <asp:Parameter Name="HTML" Type="String" /> 
                <asp:Parameter Name="Spare" Type="String" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 
        <table align="center" bgcolor="White" width="600px">  
            <tr> 
                <td> 
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True"   
                        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"   
                        AllowSorting="True" AutoGenerateDeleteColumn="True"   
                        AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1" GridLines="None"   
                        Skin="Forest" Width="800px" CommandItemDisplay="Top">  
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
         
        <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"   
            SortExpression="FirstName" UniqueName="FirstName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"   
            SortExpression="LastName" UniqueName="LastName">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Email" HeaderText="Email"   
            SortExpression="Email" UniqueName="Email">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Status" HeaderText="Status"   
            SortExpression="Status" UniqueName="Status">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="CreateDate" DataType="System.DateTime"   
            HeaderText="CreateDate" SortExpression="CreateDate"   
            UniqueName="CreateDate">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="IP" HeaderText="IP"   
            SortExpression="IP" UniqueName="IP">  
        </telerik:GridBoundColumn> 
          
    </Columns> 
</MasterTableView> 
                    </telerik:RadGrid> 
Clive Hoggar
Top achievements
Rank 1
 answered on 22 Jun 2009
0 answers
84 views
Under the new release of the tabstrip the property to set the tab as selected no longer works.

    Dim rootTab As RadTab = New RadTab  
    rootTab.Text = "TabText" 
    rootTab.ImageUrl = "http://www.mytabimage.com/image.jpg" 
    rootTab.Value = "TabValue" 
    rootTab.Selected = True 

    RadTabStrip1.Tabs.Add(rootTab) 

    


If you create several tabs with only one being set at as selected it always selects the first tab regardless of whether the tab was selected or not when it was added.  Now, this same code worked in the previous versions of the tab control without a problem.

My current workaround is tracking what the selected index should be and setting that

 RadTabStrip1.SelectedIndex = SelectedTabIndex 

Just thought I would let you know.
Doug
Top achievements
Rank 1
 asked on 22 Jun 2009
2 answers
199 views
I have a simple ConfirmDelete javascript function that runs when the user clicks the Delete button.

I want to ajaxify the Delete button.  When I click on it, the javascript runs, but upon confirm the script and ajax function seems to stop.  How can I have the ajax continue to run after the user confirms?
Matt
Top achievements
Rank 1
 answered on 22 Jun 2009
6 answers
135 views
Hi,
I have an editor in RAD window, and i want to insert a hyperlink into it content to open another window, with video. So i made a function OpenVideo() on a page where editor resides, and inserted following hyperlink into editor content:
this is test <a href="#" onclick="return OpenVideo('Video1');">video link</a>,
But when i click it - i get error object not found. Is it possible to make such hyperlink in editor content so i can run jscipt function on editor's page?
Thanks!

Alex
Alex Dybenko
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
63 views
Hi,

I have a RadMenu on my ASP.NET page and I have created my own skin.
I was wondering how to get, for example the home button to stay on the focus state when I'm on the home page.
The menu is on a master page and the other pages are loaded into the content place holder.

Thanks for your help

Harry
Yana
Telerik team
 answered on 22 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?