Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
360 views
Hi,

I am using RadGrid and doing a simple data binding to bind to a list. The enableviewstate is set to true. But the grid does not populate data after a postback. Am I doing any thing wrong.
Sebastian
Telerik team
 answered on 18 Oct 2011
1 answer
123 views
Hello Telerik Team,

I would like to first thank you for a constant and high quality product.

I have a RadGrid that is grouped with custom fields, I am currently opening RadWindows from the ImageButton click events like so:
protected void Play_Click(object sender, ImageClickEventArgs e)
{
    Geek.XTV7_Time_Start = DateTime.Now.ToString();
 
    string sql = "";
    var dt = new DataTable();
    sql += " Select ISNull( XTV7_VideoHits, 0) AS XTV7_VideoHits From Xtrain.XTV7_2_Videos WHERE  (XTV7_Videos_ID=" + Geek.XTV7_Videos_ID.ToString() + ")";
 
        dt = data.GetDataTable(sql);
        Geek.XTV7_VideoHits = (Int32.Parse(dt.Rows[0]["XTV7_VideoHits"].ToString()) + 1).ToString();
        VidHit();
 
        RadAjaxManager1.ResponseScripts.Add("radopen('Forms/View/VideoViewer.aspx','RadWindow1')");
 
}

 to open a RadWindow (depending on what button, as each button has its own windows via a RadWindow Manager) after passing a session variable via my session handler Geek.XTV7_Videos_ID from the SelectedValue. (this code is used to get the id and pass it to the session variable:

protected void RadGrid_ItemCommand(object source, GridCommandEventArgs e)
{
 
    if ((e.Item is GridDataItem) && (e.CommandName == "Select"))
    {
        var item = (GridDataItem)e.Item;
        string gvDataKey = item.GetDataKeyValue("XTV7_Videos_ID").ToString();
        Geek.XTV7_Videos_ID = gvDataKey;
    }
}

)

Then on RadWindowClose() there is a value written to the DataBase to reflect the hits, the window close method initiates the folowing code to refresh the grid and send update command to the DB:

videoselector.ascx.cs
#region Ajax Manager Request
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    switch (e.Argument)
    {
        case "closed":
            UpdateView();
            RadGrid1.Rebind();
            break;
    }
}
#endregion

videoselector.ascx
function onClose() {
    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("closed");
}
function RowSelected(row) {
}

sorry for the long intro but I need to be sure that the environment is understood.

THE PROBLEM:
we need to be able to pass a variable to Geek.XTV7_Videos_ID on mouse over and refresh or instantiate an AJAX request on the panel shown in the attached image (without breaking existing methods and events).
How would I go about this?

Thank you very much in advance.

Trent

Tsvetoslav
Telerik team
 answered on 18 Oct 2011
3 answers
992 views
Hi,

Can someone help me figure out how to get a label control text value from grid item template column?
<telerik:GridTemplateColumn DataField="Amount" HeaderText="Amount" UniqueName="Amount">
                   <ItemStyle BorderStyle="NotSet" CssClass="test" HorizontalAlign="Right" Width="75px" />
                   <HeaderStyle HorizontalAlign="Center" Width="85px" />
                   <ItemTemplate>
                       <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>'
                           Width="75"></asp:Label>
                   </ItemTemplate>
                   <EditItemTemplate>
                       <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount") %>'
                           Width="75"></asp:Label>
                   </EditItemTemplate>
               </telerik:GridTemplateColumn>
Label amount = (Label)item.FindControl("lblAmount");
double? amount= (item["Amount"].FindControl("lblAmount") as Label).Text;
I've tried both ways and neither seems to work. Thanks in advance.
Tsvetoslav
Telerik team
 answered on 18 Oct 2011
1 answer
91 views
Is it possible to drag a RadWindow by some other control (say a div) like you can with the RadDock?

Thanks
Marin Bratanov
Telerik team
 answered on 18 Oct 2011
4 answers
115 views

 Hi,

 I need to remove an hyperlink look from my tree nodes.  Tryed TreeNodeOver style like "text-decoration: none". However it is not working.

I used the below css code on aspx page:

<style type="text/css">
.myNodeHoveredCss .rtIn
{
    text-decoration: none !important;

.myNodeSelectedCss .rtIn
{
    text-decoration: none !important;
}
</style>

Code behind used below line:
stNode.HoveredCssClass = "myNodeHoveredCss";

Can you please tell me how to remove Hyperlink look from tree node?.

Venkadesh Babu
Top achievements
Rank 1
 answered on 18 Oct 2011
3 answers
1.0K+ views
Hey everyone,

How to get the value selected from datepicker in codebehind?...

Thanks
Amit
Maria Ilieva
Telerik team
 answered on 18 Oct 2011
1 answer
154 views
I am getting the following Javascript error:

Line: 8
Error: Object doesn't support this property or method

the following line of code is shown when debugging the code. 

!v&&b.length>1&&d(b,"")>-1&&(j=RegExp(this.source,e.replace.call(c(this),"g","")),e.replace.call(a.slice(b.index),j,function(){for(var a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(b[a]=void 0)

The javascript file that is purporting the error is in "itn.js". 

I am getting this error when a Rad combo box is used as an editor for a column and when I click the drop down button to display the list of items within the drop down. Now I get the error only in IE Version 8.0.7601.17514 and not the other browsers. I checked to see if it was something in my code but its not. I am also receiving the error from your Demo site on the following page:

http://demos.telerik.com/aspnet-ajax/treelist/examples/columns/columntypes/defaultcs.aspx

it is on the second treelist control where the "Title Of Courtesy" contains a RadComboBox. Again when I click the drop down button on the control it throws the above javascript error. It never drops down the list of items on the control.

Any help on this I would greatly appreciate it.

Thanks

Radoslav
Telerik team
 answered on 18 Oct 2011
1 answer
85 views
Hi,

I see the sample on how to resize RadGrid inside RadSplitter but how do i resize a RadGrid inside a User Control that is inside a RadSplitter from a Master Page?  I hope this make sense.  Any example is greatly appreciated.

Thank you.
Andrey
Telerik team
 answered on 18 Oct 2011
1 answer
133 views
I need to access controls in GroupTemplate when ever a new group is created.
Is that possible?
Andrey
Telerik team
 answered on 18 Oct 2011
3 answers
89 views
Hello,

I have a problem with my treeview events :

Normaly, the clickNode event is fired before the dataBound event.
But sometimes, it is the dataBound event which is fired before the clickNode.

Is there a solution to force clickNode first?


Donatien
Plamen
Telerik team
 answered on 18 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?