Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 views
Hi

We have a problem with one of our sites, where we are building the menu from codebehind, using images:

myMenuItem.ImageUrl =

"~/Images/" & intTraderID & "/" & strImage

 

myMenuItem.HoveredImageUrl =

"~/Images/" & intTraderID & "/" & strRollover

 

myMenuItem.Text =

""

The menu has a custom skin applied before the items are added:

 

mnMenu.Skin = strMenuSkin

mnMenu.EnableEmbeddedSkins = bUseTelerik

 

Thi sall worked perfectly well until we upgraded to the latest release, but now the menu displays a margin around each image.

Using fiirebug, it looks to me like the css for the skin is being overridden by the default skin - is this correct? If so, is there a workaround? I have tried applying the page skin to each element as it is created, and also setting the skin after adding the items, but it makes no difference.

Is there something I have missed?





 

Rob
Top achievements
Rank 1
 answered on 22 Jun 2009
2 answers
125 views
Attempting an in-place upgrade from Q3-2008 to Q2 2009 beta.
On a page with multiple controls I get the following error when the page goes to save viewstate.

Type 'Telerik.Charting.Styles.Unit' in Assembly 'Telerik.Web.UI, Version=2009.2.616.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.

Checking with Reflector, indeed the Serializable attribute is gone from 2009.2  but exists in 2008.3 .  Would there be something I am doing wrong causing this error?

Page works fine in Q3-2008.

Thanks,
Jason




Jafin
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
55 views
Anyone seen this before?

http://www.fredmastro.com/external/images/extraday.jpg

It's showing an extra day of the week before Sunday with a date and all.  You can click on the date and highlight it but it doesn't fire the date selected event or close the calendar.  It's weird. How do I get rid of it?

here's my code, the page has about 20 dates using one calendar and they all do this.

  function focusPicker(sender, args) { 
                sender.get_dateInput().focus(); 
            }  
 
 
        <telerik:RadAjaxPanel ID="upCal" runat="server"
            <telerik:RadCalendar ID="calShared" runat="server" EnableMultiSelect="false" /> 
        </telerik:RadAjaxPanel> 
 
<telerik:RadDatePicker ID="calDischargeDate" runat="server" SharedCalendarID="calShared" ClientEvents-OnDateSelected="focusPicker" ValidationGroup="BasicClaimFields"/> 

Fred
Top achievements
Rank 1
 answered on 22 Jun 2009
6 answers
303 views
Playing with the RadScheduler demo has been very enjoyable.  Quick question for the Telerik team though.  Did you guys write your own recurring date engine or use a 3rd party to generate the recurring dates based upon the parameters a user specifies?
Maged
Top achievements
Rank 1
 answered on 22 Jun 2009
2 answers
246 views
I currently have a RadGrid that has two PushButtons... 
<telerik:GridButtonColumn CommandName="Complete_Select" ConfirmDialogType="RadWindow" 
                                                Text="Complete" UniqueName="completeSelect" CommandArgument="ID" AutoPostBackOnFilter="True" 
                                                ButtonType="PushButton" ButtonCssClass="btn" ItemStyle-Font-Bold="True">  
                                            </telerik:GridButtonColumn> 
                                            <telerik:GridButtonColumn CommandName="Split_Select" ConfirmDialogType="RadWindow" 
                                                Text="Input to Appraisal" UniqueName="splitSelect" CommandArgument="ID" AutoPostBackOnFilter="True" 
                                                HeaderText="Appraisal Form" ButtonType="PushButton" ButtonCssClass="btn" ItemStyle-Font-Bold="True">  
                                            </telerik:GridButtonColumn> 
 

Based on the "OnItemCommand" I run some codeBehind.
What I would like to do is make the PushButtons for that row disappear and replace them with text once the "completeSelect" has been pressed.
Any help would be appreciated.

 

Tom
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
118 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
681 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
96 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
124 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
110 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?