Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
79 views
Hello!

I have a grid with a GridTemplateColumn created dynamically on Page_Init.

Dim gtc As New GridTemplateColumn
 
With gtc
    .UniqueName = "gtcQuest"
    .HeaderTemplate = New clsGridViewTemplate(GridItemType.Header, "Quest", "Quest.", "")
    .FilterTemplate = New clsGridViewTemplate(GridItemType.EditItem, "", "", "")
    .ItemTemplate = New clsGridViewTemplate(GridItemType.Item, "pnlQuest", "", "")
    .HeaderStyle.Width = Unit.Pixel(60)
    .HeaderStyle.HorizontalAlign = HorizontalAlign.Center
End With
 
radGrid.MasterTableView.Columns.AddAt(0, gtc)

And in ItemCreated:

Dim btnQuest As New Button
 
btnQuest.ID = "btnQuest"
DirectCast(e.Item.FindControl("pnlQuest"), Panel).Controls.Add(btnQuest)

The column display correctly, but when I use the Pager to move around the other pages the Init is not fired, only the ItemCreated and a error is throw because the panel pnlQuest doesn´t exists.

How I put the column in the grid viewstate to don´t have to create everytime?

Thanks!
Wagner
Top achievements
Rank 1
 asked on 16 Mar 2011
3 answers
116 views
Hi!

Using IE8:

http://demos.telerik.com/aspnet-ajax/ribbonbar/examples/default/defaultcs.aspx

Fires upp some javscript errors:

Message: 'qsfSearchDropDownClosed' is undefined
Line: 755
Char: 5
Code: 0
URI: http://demos.telerik.com/aspnet-ajax/ribbonbar/examples/default/defaultcs.aspx

In Firefox 3.6.15 it works great!

Sincerely, Thomas
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 16 Mar 2011
1 answer
49 views
Hi,

As the post title says m kinda confused about this, i have a CascadingDropDown ASP control which is filled by a WebService but when i try to "Ajax-enable-it" with RadAjax i got a strange bug on a telerik resource which seems to be a RadAjaxManager caller and the only thing i can see in the error console from Firefox is "b is null" and obviously any postback raises the same error.
Taking out the control makes everything work perfect but as you may understand isn't a solution, also tried to mitigrate that control to RadComboBox but samething happen...
M gonna try to make some some example code tomorrow but maybe someone here already experience something similar and know the answer...

Best Regards
Josue
Top achievements
Rank 1
 answered on 16 Mar 2011
5 answers
436 views
I am trying to style the Header, Footer and Items in the dropdown list. I have created a custom style sheet which works fine for most things but I can't seem to able to control the padding in these sections. I don't see any padding syles defined in the style sheet I based my custom style from (Vista). I am able to style through code but I rather do it through the style sheet. This is what I am doing now:

Me.RadComboBox.Header.Style.Add("padding", "3px")
Me.RadComboBox.Footer.Style.Add("padding", "3px")

and in the RadComboBox_ItemsRequested():

Dim objItem As New RadComboBoxItem()
objItem.Style.Add("padding", "0px")
objItem.Style.Add("padding-left", "2px")
objItem.Style.Add("padding-bottom", "1px")

Why does this no work in my custom CSS:

.RadComboBoxDropDown_Vista .rcbHeader,
.RadComboBoxDropDown_Vista .rcbFooter
{
     background-color: #f1f2f4;
     background-position: 0 -110px;
     padding: 3px;      /*added this*/   
}

The other issue that I haven't found a solution for even through code is to eliminate the spacing that is automaticaly added between elements placed in the Head and Footer. Even after removing the padding and margins in these sections there are still spaces of about 4px placed between them.
Bort
Top achievements
Rank 1
 answered on 16 Mar 2011
0 answers
43 views

I am using Grid / Hierarchy with Templates to display data in tabs and grid. Is there anyway I can use Edit Popup??

Please help...
Thanks,
Lakshmi

kitty
Top achievements
Rank 1
 asked on 16 Mar 2011
2 answers
78 views
I have the code of my friend using ASP Textbox:

string customerName = (MultiView1.Views[3].FindControl("txtCustomerName") as TextBox).Text;
int age = int.Parse((MultiView1.Views[3].FindControl("txtAge") as TextBox).Text);

so,i replaced ASP Textbox with Rad Textbox but when i debug my code is fail.If i want to using RadTextbox how can i do?
Marin
Telerik team
 answered on 16 Mar 2011
1 answer
182 views
Dears,

I have an Telerik grid view with Automatic insert update delete ..but these events didnt call when i clicked to thier releted buttons
as following :


 

 

Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As GridInsertedEventArgs) Handles

RadGrid1.ItemInserted

 

 

 

 

 

 

If e.Exception IsNot Nothing

Then

 

 

e.ExceptionHandled =

 

True

 

 

e.KeepInInsertMode =

 

True

 

 

DisplayMessage(

 

True, "Employee cannot be inserted. Reason: " & Convert

.ToString(e.Exception.Message))

 

 

 

 

 

 

Else

 

 

DisplayMessage(

 

False, "Employee inserted"

)

 

 

 

 

 

 

End

If

 

 

 

 

Dim gridEditFormItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem

)

 

 

 

 

 

 

Dim dropDownList As DropDownList = DirectCast(gridEditFormItem.FindControl("ddlTOC"), DropDownList

)

 

 

 

 

 

 

Dim TextBox As TextBox = DirectCast(gridEditFormItem.FindControl("TextBox8"), TextBox

)

 

 

 

 

 

 

 

 

 

End

Sub


and this is the source code :

 

 

<telerik:RadPageView ID="RadPageView2" runat="server">

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" CssClass="RadGrid" GridLines="None"

 

 

 

AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False"

 

 

 

ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"

 

 

 

AllowAutomaticUpdates="True" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"

 

 

 

OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender">

 

 

 

<MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="الأجراء">

 



any help i will be grateful

 

 

Marin
Telerik team
 answered on 16 Mar 2011
1 answer
77 views
Hello there,

I have several telerik controls on the page and I am facing the issue of missing Styles, when I browse the site via IE.  However, it works good with Firefox.  I am using the "latest" Q3 2010 SP1 that came out in Feb 2011.

I did go through this link [still does not work well]

http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/question-on-2010-sp1.aspx

If you could "exactly" outline what I needed to do, to get this working, that would be much appreciated. My gridview is the one losing the styles.

Here's what I did

1) Added the entry to web.config <add key="Telerik.Web.UI.StyleSheetFolder" value="~/styles"/>
2) In the head section, I added [just guessed this URL]
<link rel="stylesheet" type="text/css" href="../styles/Skins/TabStrip.css" />
<link rel="stylesheet" type="text/css" href="../styles/Skins/Simple/TabStrip.Simple.css" />

Could you provide me "exact" fix to my solution?

-Rajesh
Simon
Telerik team
 answered on 16 Mar 2011
8 answers
203 views
Hi Everyone,

I have a treeview which has one root node and 2 child nodes each of whom has many children but they do not contain any children.
I have a button on the page which I would like to enable when a user has checked one of the nodes or disable if the user has unchecked all nodes.

I have added the following script:

function

 

 OnNodeChecked(sender,eventArgs) {

 

 

 

var tree = $find('rdtOutputColumns');

 

 

var button = $get("btnOK");

 

 

 

if (tree.get_checkedNodes().length > 0) {

 

 

button.disabled = false;

 

}

 

else {

 

button.disabled =

true;

 

}

}

This works fine for intially enabling the button when a user checks one or more of the child nodes but if previously checked nodes are unchecked then the get_checkedNodes().length reports that 1 node is still checked and so my button is never disabled again.

Has anybody got any ideas as to why the get_checkNodes() function is returning a node that is no longer checked?

Many thanks
Antony

Phil
Top achievements
Rank 1
 answered on 16 Mar 2011
2 answers
82 views
I want get my last inserted row with the primary key. How can I do that.  

I am using radgrid with linqdatasource with automatic insert operation. 

I don't want  do it with select query to database to get the last inserted row.  If multiple people doing insert from different places I will get wrong data. 


Thanks
Farid Hayati
Top achievements
Rank 1
 answered on 16 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?