Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
I'm trying to add a highlight effect to newly added rows in the radgrid.  I have a timer that will all me to rebind the radgrid to my datasource but I am unable to determine which row has been added to the grid so I will be able to call my highlight effect.

The code below will display for all rows whenever the timer fires.  Is there a way to attach my highlight effect only on newly added rows instead of everything already in the grid too?
    <script src="/scripts/prototype.js" type="text/javascript"></script> 
    <script src="/scripts/scriptaculous.js" type="text/javascript"></script> 
    <script type="text/javascript"> 
        function RowCreated(sender, eventArgs) 
        { 
            new Effect.Highlight(eventArgs.get_gridDataItem().get_element(),  
                      { 
                        startcolor: "#ffff99", 
                        endcolor: eventArgs.get_gridDataItem().get_element().style.backgroundColor, 
                        duration: 8 
                      })             
        } 
    </script> 
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> 
        <telerik:RadGrid ID="RadGrid1" runat="server" Width="100%" DataSourceID="LinqDataSource1" 
            GridLines="None" Skin="Telerik"> 
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="RequestId" DataSourceID="LinqDataSource1"> 
                <RowIndicatorColumn Visible="False"> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Visible="False" Resizable="False"> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="RequestId" DataType="System.Decimal" HeaderText="RequestId" 
                        ReadOnly="True" SortExpression="RequestId" UniqueName="RequestId"> 
                    </telerik:GridBoundColumn> 
                    <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="DateOfBirth" DataType="System.DateTime" HeaderText="DateOfBirth" 
                        SortExpression="DateOfBirth" UniqueName="DateOfBirth"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="CreatedDate" DataType="System.DateTime" HeaderText="CreatedDate" 
                        SortExpression="CreatedDate" UniqueName="CreatedDate"> 
                    </telerik:GridBoundColumn> 
                </Columns> 
                <EditFormSettings> 
                    <PopUpSettings ScrollBars="None"></PopUpSettings> 
                </EditFormSettings> 
            </MasterTableView> 
            <ClientSettings> 
                <ClientEvents OnRowCreated="RowCreated" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="MyDataContext" 
            TableName="MyTable" OrderBy="CreatedDate desc"> 
        </asp:LinqDataSource> 
        <asp:Timer ID="Timer1" runat="server" Interval="15000" OnTick="Timer1_Tick"> 
        </asp:Timer> 
    </telerik:RadAjaxPanel> 
 

Princy
Top achievements
Rank 2
 answered on 10 Jul 2008
1 answer
141 views
When I click the "add new record" default button - i want it to have onclick javascript.  Is there a way I can access this button from the codebehind and do a "attributes.add" to it?
Shinu
Top achievements
Rank 2
 answered on 10 Jul 2008
4 answers
359 views
I have a RadGrid bound to a LinqDataSource for Products.  I want to set 1 of the product values manually (in code behind) while the user can set the rest using bound controls.  THe problem is I can not figure out how to manually set the value.

I tried to create a hidden bound column (Display=false) for the field, and then in the UpdateCommand event of the RadGrid, I did the following:

        protected void rgProducts_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            // re show the edit column  
            rgProducts.Columns[0].Visible = true;   
 
            // set some values manually  
            GridEditFormItem item = e.Item as GridEditFormItem;  
            item.ParentItem["UpdatedBy"].Text = UserId.ToString();  
        } 

I stepped through the code and the value is set properly, but it never gets updated in the database.  I can only assume my approach is not correct and further searches through the forums has yielded no results either.

How can I get access to the current linq object being updated and set this one member in the codebehind when the user updates so that my value is saved along with their values?

Thanks so much!

Michael
Michael
Top achievements
Rank 1
 answered on 10 Jul 2008
1 answer
187 views
i am adding 2 controls dynamically, a textbox, and a button. they add ok, to each of the 3 tabs, i add them to a pageview.

the problem is that when i click the button in any tab, is causing a postback, and then the controls disapear.

how can i do to persist the controls after the postback is made?

i am using version 2008.1.415.20
Kevin Babcock
Top achievements
Rank 1
 answered on 10 Jul 2008
1 answer
159 views
Hi,

We are using Telerik conrols in our website and we want our wesbite to support back button functionality
The below link specifies that the latest Ajax supoorts Back Button and History
http://www.telerik.com/products/aspnet-ajax/controls/ajax/overview.aspx

But we did not find any demo in the telerik site for this feature.

Can you please give a sample project with back button functionality implemented.

Thanks
Kevin Babcock
Top achievements
Rank 1
 answered on 10 Jul 2008
2 answers
100 views
Hi,

I have implemented my own hierarchicaldatasource and when bound to the RadTreeView it works as expected.

However I have also implemented HierarchicalDataSourceDesigner so that I can place the datasource on a page visually.  The Microsoft Tree component picks this up and can list members no problem, but the RadTreeView does not even see the datasource.  If I manually type the DataSourceId in the designer and manually enter the bindings into the property box of radTreeView, the page will work as expected, but the design component reports an error that datarowview does not contain any of the property names I typed in.

It seems that RadTreeView does not recognise the custom hierarchical datasource in design mode but uses it ok when the page is running.

Is there anything I can do to get this working in design mode?

Thanks,

Darren
PeiQi
Top achievements
Rank 1
 answered on 10 Jul 2008
6 answers
549 views
I have a gridview with a loading panel on a user control on a page with a master page.  The loading panel displays on the first postback (sorting, refreshing, whatever), but after that, the loading panel does not display anymore.

The page it's on is fairly complex, and I can't seem to track down what is causing this to happen.  No errors are being thrown.  The same issue appears to break my datepickers as well.

Any suggestions on what could be causing this or what to look for?

Thanks.

EDIT: I'm beginning to suspect is because the user control on which the gridview is located is dynamically added to the aspx page on page load.  Could this be?
Neil Sloan
Top achievements
Rank 1
 answered on 09 Jul 2008
8 answers
1.4K+ views
Hi.  I have downloaded the most recent version of the Prometheus controls.  I noticed that when a tooltip pops up there are only two ways to close the tooltip for my current situation.

I have a hyperlink with a tooltip set to display on the BottomLeft of the hyperlink.  When the tooltip pops up OnMouseOver I move the mouse cursor so it is now on top of the tooltip.  When I move the mouse off of the tooltip the tooltip closes as expected.  However, if I do not move the mouse onto the tooltip but instead leave it only on the hyperlink the tooltip will not close unless I click elsewhere on the page. 

I have implemented javascript I have found among these help pages to close the tooltip on the "OnMouseOut" event of the hyperlink.  This in turn does not give the user the ability to move the mouse onto the tooltip because the "OnMouseOut" event fires before the user's pointer reaches the tooltip.  What is happening in my situation is logically what should be occuring. 

I am wondering if there is a way to get the best of both worlds and have the tooltip close only when the mouse is not on the tooltip or not on the hyperlink?
Dean Alexander
Top achievements
Rank 1
 answered on 09 Jul 2008
3 answers
180 views
Hi

I know you can hide the text input box for a datepicker using

<DateInput style="display:none"></DateInput
>

How do I get the inputbox to display but not allow the user to enter a date but only allow them to pick a date from the pop up?

Thanks

Richard
The Oracle
Top achievements
Rank 1
 answered on 09 Jul 2008
4 answers
363 views
I'm using the RadGrid as a worksheet.  On each row item, I have a series of textboxes in GridTemplateColumns and at the end a GridBoundColumn that has Aggregate="sum" so that I can have a grid group footer of the subtotal of total of each row.

The client wants the totals to update whenever the value of a textbox changes without submitting the page.  I've figured out the javascript to change the total column, but I'm stumped as to how to change the values of the grid group footer item and the footer item.

I can get the ClientID of the GridTableCell that contains the totals at the ItemDataBound event, but I won't have the complete list of ClientIDs until after it's finished.  I thought I'd be able to loop through the grid items in the PreRender event, but the GridGroupFooterItems don't show up there.   

Does anyone have an idea on how to accomplish this?
Steve
Top achievements
Rank 1
 answered on 09 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?