Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
199 views
How can I access the text inside txtProgram from code behind. I am able to use findcontrol to find the ID of the text box, but I cannot access the Text property of txtProgram to be able to process the data.
<radg:radgrid ID="grdProgram" runat="server"
        onneeddatasource="grdProgram_NeedDataSource"
        onitemdatabound="grdProgram_ItemDataBound"
        onitemcommand="grdProgram_ItemCommand">
    <MasterTableView EnableNoRecordsTemplate="True" AutoGenerateColumns="false" DataKeyNames="ProID">
        <Columns>
      
         <radG:GridTemplateColumn HeaderText="Program">
        <ItemStyle Width="80%" VerticalAlign="top" />
        <HeaderStyle Width="80%" />
        <ItemTemplate>
        <div><%#Eval("Pog")%> </div>
           Default Url: <br />
            <br />
    <asp:TextBox ID="txtProgram" runat="server"   Width="70%">Some Text From user</asp:TextBox>
        </ItemTemplate>
    </radG:GridTemplateColumn>
           <radG:GridButtonColumn ButtonType="linkButton"     Text="Save Custom Link" HeaderText="Edit" UniqueName="edit" CommandName="EDITME">
                    <ItemStyle HorizontalAlign="center" />
           </radG:GridButtonColumn>
        </Columns>
        <NoRecordsTemplate>
            No Current Programs</NoRecordsTemplate>
    </MasterTableView>
</radg:radgrid>
Todd Anglin
Top achievements
Rank 2
 answered on 23 Sep 2009
3 answers
483 views
I have a grid that contains a date field column. Depending on some business rules, I need to display one of three dates in that date field.

The grid is bound to a DataSet that I get back from a web service call in the NeedDataSource call. The dataset contains the 3 date fields, along with other relevant data.

Where is the proper place to put the logic to determine which date field to display? I can put it in the NeedDataSource call and do something like dynamically add a new column to the dataset and bind to that column, but I'm wondering if that's the best place to do it. I thought about doing it in the ItemDataBound event, but it doesn't appear that I have access to the non-bound columns in the dataset at that point (do I? how?).

Is there another, better place to do it? It's simple logic, I just need to know the correct place to do it - that is, the most efficient, and one that will not mess up autosorting or filtering - and also have access to the underlying data source and/or columns that I need.




Todd Anglin
Top achievements
Rank 2
 answered on 23 Sep 2009
2 answers
146 views
hi,

 i am trying to show dropdownlist automatically on mousehover and close on mouseout without clicking the imagebutton. is this achievable?

thanks all.
Benjamin
Top achievements
Rank 1
 answered on 23 Sep 2009
1 answer
167 views
Hello,

I have a radgrid with paging setup, setting allowpaging="true" and the page size to 20.  On the client, I set the virtualItemCount property to its proper value.  But no paging appears.  How can I make it appear, even if I have to call a JS method manually?  I don't know why it doesn't work, and I don't want to set it on the server-side....
Todd Anglin
Top achievements
Rank 2
 answered on 23 Sep 2009
1 answer
96 views
I am trying to programatically set the datasource of a level3 hierarchy based on a value of a field in the level 2 hierarchy in vb.net.
Any suggestions?
Thanks in advance.
Todd Anglin
Top achievements
Rank 2
 answered on 23 Sep 2009
4 answers
276 views

I'm trying to get a javascript block to work within a RadDock:

 

 

 

 

 

<telerik:RadDock ID="RadDock5" runat="server" Width="300px">

 

<ContentTemplate>

 

 

    <%= DateTime.Now %>

 

 

 

    <br />

 

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

        <script type='text/javascript' src='http://www.worldtimeserver.com/clocks/embed.js'></script>

 

 

        <script type="text/javascript">

 

 

        objGB = new Object; objGB.wtsclock = 'wtsclock001.swf';

 

 

        objGB.color =

'FFCC33'; objGB.wtsid = 'JP';

 

 

        objGB.width = 100; objGB.height = 100;

        objGB.wmode =

'transparent'; showClock(objGB);

 

 

        alert(

"after");
</script>

 

 

</telerik:RadScriptBlock>

 

</ContentTemplate>

 

</telerik:RadDock>

 

 

 

 


It always works on a full page refresh. On a partial page refresh, time is updated and the alert shows, but the javascript object disappears.

What's up? I've been banging my head for weeks with this and other possible solutions.

(the RadDock is part of a standard RadDockLayout set up, by the way) 

thanks

 

 

 

 

 

 

 

 

 

Rich Erwin
Top achievements
Rank 1
 answered on 23 Sep 2009
9 answers
346 views
I try to use FormTemplate in Grid:
 
<telerik:radgrid ID="RadGrid1" runat="server" GridLines="None" ShowGroupPanel="True" 
            Width="99%" AllowSorting="True" AllowMultiRowSelection="false" allowpaging="True" 
            pagesize="6" skin="Outlook" OnNeedDataSource="RadGrid1_NeedDataSource"   
            HorizontalAlign="NotSet" onitemcommand="ChangeAccount" 
              
        >                       
            <MasterTableView AutoGenerateColumns="false" DataKeyNames="Username"   
                CommandItemDisplay="Bottom">  
                <PagerStyle Mode="NextPrevAndNumeric" /> 
                <Columns> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" /> 
                    <telerik:gridboundcolumn headertext="Last Name" datafield="lastname" /> 
                    <telerik:gridboundcolumn headertext="First Name" datafield="firstname" /> 
                    <telerik:gridboundcolumn headertext="Phone #" datafield="Telephone"/>  
                    <telerik:gridboundcolumn headertext="Email" datafield="email" /> 
                    <telerik:GridButtonColumn headertext="Lock" CommandName="Lock" ButtonType="ImageButton"   
...etc.                  
</Columns> 
 
                <EditFormSettings EditFormType="Template">  
                        <FormTemplate> 
                            <table cellspacing="7" cellpadding="1" width="100%">  
                                <tr><td colspan="2"><b>Username:&nbsp;<span id="spanUname" runat="server"><%# Eval("username") %></span></b> 
                                    <asp:TextBox Width="200px" ID="tbUname" runat="server"/></td></tr>  
                                <tr><td><table class="update"><tr> 
...etc 
...etc.

Form works perfectly.

When I try to get values on update as shown in the example http://www.telerik.com/help/aspnet-ajax/grdupdatingvaluesusercontrolformtemplate.html:
 

 

 

 

 

 

switch (e.CommandName)  
            {  
                 case RadGrid.InitInsertCommandName:  
                GridEditableItem editedItem = e.Item as GridEditableItem;  
                string s = (editedItem.FindControl("tbUname"as TextBox).Text;  
...etc. 

It gives me NullReferenceException, because editedItem is null. When I try to debug, there are absolutely no Controls for e.Item.
I am confused how I can get values from my Textboxes in FormTemplate.
Elena

 

 

 

 

 

 

 

 

 

Elena Lavrinenko
Top achievements
Rank 1
 answered on 22 Sep 2009
0 answers
185 views
Hello!

We just upgraded from what I believe was 2009.1.422.20 to the newest; 2009.2 826.20
Each panelbar we use only have one item with one item with content. The content is fetched with a postback if the panelbar was currently closed. We use an RadAjaxPanel around the RadPanelBar which displays a loading panel, when the user clicks the panelbar. Once the user clicked the panelbar it opened with a height of minimum 40pixels and the resized itself to the full height it needed. This means the loadingpanel was displayed over both the "bar" itself and the content window. 

This worked perfectly in the latest version we used, but when we upgraded to the newest version, the loading panel is only displayed inside the "bar", and the content window displays nothing until the content is ready.

We have a created a custom style for the panelbar which was created for the Q1 version.
The problem is mostly IE related, it works sufficiently in FF and Chrome.

This shows the Q1 working version, which "ajaxifies" the whole Panelbar with content
http://img8.imageshack.us/i/correctp.png/

This shows the newest version 2009.2 826, which only displays the loadingpanel inside the "bar"
http://img8.imageshack.us/i/wrongrh.png/

I know you will probably tell me to create a ticket, but it will be some work for us to create a project with everything working. So I was hoping you had some tips based on my description. If not, I will try to provide one..

If anything is unclear, do not hesitate to ask me to clarify.

Thank you!

Ps. happy Independence day!
stiz0r
Top achievements
Rank 1
 asked on 22 Sep 2009
8 answers
164 views
I'm sure it's something stupid but I load a rad scheduler with appointments and they are all set visible to false. I then load a rad tree view with child nodes that have the same value as the radscheduler appointment's ids. However, when you check a child node I get the error in my JS debugger saying scheduler.get_appointments().findByID(value) is null

               //assume this is the correct ID for the rad scheduler
                var value = eventArgs.get_node().get_value();

                //the instance of the scheduler
                scheduler = $find('<%=RadScheduler1.ClientID %>');

                var appDivID = "#" + scheduler.get_appointments().findByID(value).get_element().id;
                    appDivID.parent().show();  

What am I doing wrong here? Thanks,

Web Services
Top achievements
Rank 2
 answered on 22 Sep 2009
2 answers
105 views
I am using the following method as per the documentation to style a GRid Edit Template PopUp window:

<style type="text/css">
.GridEditForm_Office2007  .GridHeader_Office2007
{

 

background-color: #FFD96F;

 

 

font-size: large;

 

 

font-style: italic;

 

 

font-weight: bold;

 

 

font-variant: normal;

 

 

text-transform: lowercase;

 

 

vertical-align: top;

 


</style>

I have put this in the head section of the document but nothing is being style to this. 

Anyone?
Robert
Top achievements
Rank 1
 answered on 22 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?