Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
214 views
Hello,

I am trying to use a H1 tag in a TitlebarTemplate of a RadDock.
My problem is that the H1 style I defined in my CSS file is not applied.

If I put the H1 tag outside RadDockZone it is working well.

Is there anything is the Dock skin which prevent the style to be applied?

How can I define H1 tag style in the TitlebarTemplate ?

Thank you for your help,

Read you soon
Petio Petkov
Telerik team
 answered on 13 Oct 2008
7 answers
469 views
Hello

I use my RadCombo to show some clients, the user can type the code for the client, if this code doesn't exist I want to open the radCombo items to force the users to select one.

Can I show RadCombo items manually?

Regards.
Rosi
Telerik team
 answered on 13 Oct 2008
3 answers
132 views
I would like to pass two parameters(strLocation and strParent) on double click event. If its a single parameter its working fine but i cant pass more than one. Im registring the event on databound. Does anyone see whats wrong with my code below:
C#: RadGrid2_ItemDataBound
item.Attributes.Add("OnDblClick", "return LocationOpenWindow('" + strLocation+ ',' + strParent + "');");

JavaScript:
function LocationOpenWindow(strLocation,strParent){
var value = document.getElementById('<%=tboSiteID.ClientID%>').value;
window.open("frmLocation.aspx?ID=" + strLocation + "&SiteID=" + value + "&IDS=" + strParent ,"", "location=0,status=0,scrollbars=0,width=545,height=450");}

On Calling the parameters
lngLocationID = Convert.ToInt64(Request.QueryString["ID"]);
lngSiteID =
Convert.ToInt64(Request.QueryString["SiteID"]);
ParentID =
Convert.ToInt64(Request.QueryString["IDS"]);
error mesage is in correct format on the first line.

i dont think the javascript is wrong since i have tested it with constant values. The error is on Adding the double click event, where there is more than one argument.

Thank you.
 
Omlac
Top achievements
Rank 1
 answered on 13 Oct 2008
3 answers
226 views
Hello,

When i have AutoPostback = true the selectedIndex chnaged event is fired correctly. But i do not want to have postback. But when i remove (AutoPostback = true) event do not fires. Could you please help me how both to hire this event and not to have a postback?

Thanks for your time.

Here are the sode examples:

 

<radAjaxC:RadComboBox ID="radComboAdressLine1" runat="server" Width="248px"

 

 

AllowCustomText="True" ShowToggleImage="false" ShowMoreResultsBox="false" Skin="Outlook"

 

 

EnableLoadOnDemand="True" MarkFirstMatch="True"

 

 

OnItemsRequested="radComboAdressLine1_ItemsRequested"

 

 

AutoPostBack = "true"

 

 

onselectedindexchanged="radComboAdressLine1_SelectedIndexChanged"

 

 

CausesValidation="false"

 

 

MaxLength="34"

 

 

>

 

protected

void radComboAdressLine1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e){
....

 

}

Yana
Telerik team
 answered on 13 Oct 2008
3 answers
160 views
Hi,

I am having one requirement wherein i need to display one button based some falg value. I tried with <Item Tmplate> tag but in this case for all the rows in the Rad Grid it is displaying the button. How can I show and hide the button based on some condition inside telerik radgrid.

Regards,
Medac
Sebastian
Telerik team
 answered on 13 Oct 2008
4 answers
112 views

i have page with a  New Button for Inserting Records  .on that button i am showing visibility  of Textbox , rad editor, when i click on the New Button, the text box , rad editor will be visible. i want to set focus in Textbox..but problem is,  when rad editor displpay in a page,  text box focus is lost.  can you give me the solutions for that.?



Gaurish
Top achievements
Rank 1
 answered on 13 Oct 2008
4 answers
186 views
Hi,
i have successfully added a label to the node template and populated this with a database field. (using Adding and Editing Templates at Runtime help).

I am trying to add more labels, which i can do, however...
How do i assign another fieldname to this label ?
ie; label1 shows EmailSubject, label2 needs to show EmailFrom, etc..

Thanks
Mark

Heres what i have working so far...

trvEmails.DataSource = myDataTable

trvEmails.DataTextField =

"EmailSubject"

 

trvEmails.DataBind()


 

Public Sub InstantiateIn(ByVal container As Control) Implements System.Web.UI.ITemplate.InstantiateIn

 

 

Dim lbl As New Label()

 

lbl.ID =

"Label"

 

 

AddHandler lbl.DataBinding, AddressOf lbl_DataBinding

 

 

Dim lbl2 As New Label()

 

lbl2.ID =

"Label2"

 

 

AddHandler lbl2.DataBinding, AddressOf lbl2_DataBinding

 

container.Controls.Add(lbl)

container.Controls.Add(lbl2)

 

End Sub

 

 

Private Sub lbl_DataBinding(ByVal sender As Object, ByVal e As EventArgs)

 

 

Try

 

 

Dim target As Label = sender

 

 

Dim node As RadTreeNode = DirectCast(target.BindingContainer, RadTreeNode)

 

 

Dim itemText As String = DirectCast(DataBinder.Eval(node, "Text"), String)

 

target.Text = itemText

 

Catch ex As Exception

 

 

End Try

 

 

End Sub

 

 

Private Sub lbl2_DataBinding(ByVal sender As Object, ByVal e As EventArgs)

 

 

Try

 

 

Dim target As Label = sender

 

 

Dim node As RadTreeNode = DirectCast(target.BindingContainer, RadTreeNode)

 

 

Dim itemText As String = DirectCast(DataBinder.Eval(node, "Text"), String)

 

target.Text = itemText

 

Catch ex As Exception

 

 

End Try

 

 

End Sub

 

Yana
Telerik team
 answered on 13 Oct 2008
1 answer
92 views
Hi iam trying to extract part of a Radgrid and display it as simple html in a RadEditor (iam then going to allow my users to send this as an email.

However my problem arises with columns using

 

<ItemTemplate>

 

<%

# string.Format("{0} {1}",DataBinder.Eval(Container.DataItem, "ingredient_parcelquantity") ,DataBinder.Eval(Container.DataItem, "parcel_unit"))%>

 

 

</ItemTemplate>

 


these does not hold the result data in the Text property.
How can i make this possible ?
Is there any easier way for me to achieve my goal ?
HtmlTable mTable = new HtmlTable();  
            System.IO.StringWriter s = new System.IO.StringWriter();  
            HtmlTextWriter htw = new HtmlTextWriter(s);  
            foreach (GridDataItem a in RadGrid_Ingredient.SelectedItems)   
            {  
 
                HtmlTableRow tr = new HtmlTableRow();  
                for (int i = 5; i < 19; i++)  
                {  
                    HtmlTableCell tc = new HtmlTableCell();  
                    tc.InnerHtml = a.Cells[i].Text;  
                    tr.Cells.Add(tc);  
                }  
                mTable.Rows.Add(tr);  
                  
            }  
            mTable.RenderControl(htw);  
            RadEditor1.Content = s.ToString(); 
Yavor
Telerik team
 answered on 13 Oct 2008
2 answers
177 views
Hi there

[WebMethod]  
    public RadTreeNodeData[] GetManufacturers(RadTreeNodeData node, object context)  
    {  
        IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;  
        String sql = "";  
        String parentname = "";  
        if (node.Value == "HardwareType")  
        {  
            sql = "SELECT 'Manufacturer' as [value], manufacturer as [text], hardwareType as [parentName] from tHardwareCatalog WHERE hardwareType = '" + node.Text + "' GROUP BY hardwareType, manufacturer ORDER BY manufacturer";  
        }  
        else if (node.Value == "Manufacturer")  
        {  

            parentname = node.Attributes["parentName"].ToString();  

            sql = "SELECT id as [value], model as [text], manufacturer as [parentName] from tHardwareCatalog WHERE hardwareType = '" + parentname +"' AND manufacturer = '" + node.Text + "' ORDER BY model";  
        }  
 
        SqlDataAdapter adapter = new SqlDataAdapter(sql, ConfigurationManager.ConnectionStrings["RemoteSqlServerData"].ConnectionString);  
        DataTable data = new DataTable();  
        adapter.Fill(data);  
        List<RadTreeNodeData> result = new List<RadTreeNodeData>();  
        foreach (DataRow row in data.Rows)  
        {  
            RadTreeNodeData itemData = new RadTreeNodeData();  
            itemData.Text = row["text"].ToString();  
            itemData.Value = row["value"].ToString();  
            itemData.Attributes.Add("parantName",row["parentName"].ToString());  
            if (row["value"].ToString() == "Manufacturer")  
            {  
                itemData.ExpandMode = TreeNodeExpandMode.WebService;  
            }  
            result.Add(itemData);  
        }  
        return result.ToArray();  
    } 

When I create nodes with a web service, I also want to add attibutes to the node, so that I can read it some other stage.

It does not seem to work."The given key was not present in the dictionary" Error.

Please advise
Guss
Top achievements
Rank 2
 answered on 13 Oct 2008
4 answers
104 views
Hi, I used the version RadControls For ASP.NET Q3 2007, however now make an update to RadControls is ASPNET AJAX Q2 2008, my project is not running normally, this presents several errors of inconsistency, I have to redo my entire project ?
Silderado
Top achievements
Rank 1
 answered on 13 Oct 2008
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?