Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
173 views

I have a grid which used an Insert/Edit form.

When you Insert a new record, it inserts fine except.

Then Insert from clears and stays open, I would like it to close automatically.

When you Update, the update form also stays open, but I would like that to remain.

Any ideas?


Thanks.

Cameron Arnott
Top achievements
Rank 1
 answered on 02 Nov 2009
1 answer
461 views
Hi Telerik Guys,

I have a problem with assigning the column width in percentage for rad grid.

Can any one tell me how we set the column width in percentage for the grid columns.

Please gives your responses ASPS.


<

 

telerik:RadGrid ID="RadGrid" runat="server" Width="97%" DataSourceID="ObjectDataSource"

 

 

SkinID="NoPostBackOnRowSelect" GridLines="Vertical" AllowSorting="true" Style="margin: 0px 10px 0px 10px"

 

 

AutoGenerateColumns="False" OnItemDataBound="EmailPhoneRadGrid_ItemDataBound">

 

 

<MasterTableView DataKeyNames="phoneEmailID" DataSourceID="EmailPhoneObjectDataSource"

 

 

Frame="Void">

 

 

<NoRecordsTemplate>

 

No records to display !

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Col1" HeaderText="Col1" SortExpression="Col1" UniqueName="Col1">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="48.5%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Col2" HeaderText="Col2" SortExpression="Col2"

 

 

UniqueName="Col2">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Col3" HeaderText="Col3"

 

 

SortExpression="Col3" UniqueName="Col3">

 

 

<HeaderStyle Font-Names="Trebuchet MS" Font-Size="14px" ForeColor="#3496b4" Width="15%" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>


I am using above code. Is this correct or not. Please guide me.

Thanks in Advance.

 

Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
2 answers
238 views
Hi,

Im triying to extract the primary key value for parent groupfooter item when i click on it (my gridfooteritems are links). I have two levels of groups

protected void tk_Grid_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
    if (e.Item is GridGroupFooterItem) 
        { 
 
            GridGroupFooterItem gridfooteritem = e.Item as GridGroupFooterItem;                         
 
            if (double.Parse(gridfooteritem["Enero"].Text) == 0) gridfooteritem["Enero"].Text = ""; 
            gridfooteritem["Enero"].Text = "<a class=linkstotal href=frmAnexoBalance.aspx?Periodo=ENERO&MesID=1&GGPPID=0>" + gridfooteritem["Enero"].Text + "</a>"; 

Regards Gino
Gino Suarez
Top achievements
Rank 1
 answered on 02 Nov 2009
1 answer
94 views
i am trying to load a tree server-side in a code behind page and need to set certain nodes to be initially hidden from the user. they are made visible based on the answers to certain questions via javascipt client-side (which works fine). i cannot figure out how cause them to be initially hidden or to set a css class on the <LI>. by appending "tree_node_hidden" to the CssClass property of the node - this only causes the caption to be hidden and does not collapse the node.

mynode.CssClass +=

" tree_node_hidden "

 


results in this...

<li class="rtLI"><div class="rtMid">
   <span class="rtSp"></span><img src="../images/eforms_blank.gif" alt="" class="rtImg" /><span class="rtIn tree_node tree_node_hidden">Employer</span>
  </div></li>

thanks for any help

paul
Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
1 answer
265 views
I am using the Office2007 skin for the Tabstrip control and need to change the background color from that light blue to another color.

Following instructions from another post, I created the following style:

.customBackground {
  background-color:  #eeeeee  !important;
}

Then added the style to the CssStyle property of the tabstrip.

It does not override the Office2007 background color.  

Is this possible?

Thanks,
Jaime
Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
3 answers
259 views
Hi,

I am using RadTreeView control in radCombobox. I am using get_checkedNodes() method to get the checked nodes. This method is returning the collection of checked nodes but the order of the collection depends upon the values checked by user. I want this order in the order of index of the items in treeview. For example treeview is structured to have nodes A,B,C,D,E. If user checks in the order as D,B,C than collection returned is also in the order D,B,C. I want this collection in the order of index as B,C,D. Is there any way to sort this collection in javascript or to get the collection in the order of index. I am using 1 level depth of treeview control and I want this sorting in javascript.

Thanks,
Pankaj
Usha Ganju
Top achievements
Rank 2
 answered on 02 Nov 2009
2 answers
134 views
Currently I have a user control which contains a RadGrid, RadWindow and RadAjaxManagerProxy.

On the page which contains the control, initially when tested it worked fine. I'd click a button on the RadGrid would bring up the RadWindow. I've since moved it into a RadDock, now when the button is clicked, a post back happens, but the window does not pop up.

Here is the code for the window itself.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" OnClientClose="OnClientCloseHandler"
DestroyOnClose=
"true" ReloadOnShow="true"> 
        <Windows> 
                <telerik:RadWindow ID="windowNotes" Behaviors="Close" KeepInScreenBounds="True" Modal="True" 
                             runat="server" Width="450px"   VisibleStatusbar="False"  ReloadOnShow="true"> 
                </telerik:RadWindow>  
        </Windows> 
    </telerik:RadWindowManager>   

The code from when the button is being pushed.

windowCustomerNotes.VisibleOnPageLoad = true; 
windowCustomerNotes.NavigateUrl = "~/Admin/Notes.aspx" 
 
windowCustomerNotes.Title = "Notes On" + firstName + " " + lastName 

And the page that contains it has a radAjaxManager which points to the panel which has the control inside of it.

 
<telerik:RadDockLayout ID="RadDockLayout1" runat="server"  
         storelayoutinviewstate="True"> 
   <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="350px" Width="180px"> 
      <telerik:RadDock ID="rdockUsers" runat="server" Width="1270px" Height="250px" 
                    BorderColor="Black" DefaultCommands="ExpandCollapse"  
                    EnableAnimation="True" Resizable="True" Title="Users"  
                    Collapsed="True" onclientinitialize="OnClientInitialize" 
                    OnClientDragStart="OnDragStart" OnClientDragEnd="OnDragEnd" 
                    onclientdockpositionchanged="OnClientPositionChanged"> 
                    <ContentTemplate> 
                        <div style="padding-left:5px;padding-right:5px;"> 
                            <asp:Panel ID="pnlUsers" runat="server"> 
                                <UC:Users id="users1" runat="server" /> 
                            </asp:Panel> 
                        </div> 
                    </ContentTemplate> 
                </telerik:RadDock> 
        </telerik:RadDockZone> 
    </telerik:RadDockLayout> 

As I said when I just had the panel on the page the rad window showed just fine. Also if I set the attribute "visibleonpageload" on the window itself. When the rdock initially loads on the page, the window will be shown.

Any reason why the window will not show any more?

Thanks
Derek
Top achievements
Rank 1
 answered on 02 Nov 2009
3 answers
172 views
Hi,
 
The icalender export is not working for me in Outlook 2003 ie if there is 3 records in outlook it is showing only the first record,
but in Outlook 2007 its working fine , showing all the records,
I follwed the following demo:

http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx

Please help.



Schlurk
Top achievements
Rank 2
 answered on 02 Nov 2009
3 answers
509 views
Hi ,

The OnCheckChanged event is not firing for me on the server side, when you click the checkbox.  It is just postingback, and returning the original value checked.  When something else causes a postback it is firing the event though. Any idea what it might be?

<telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1" 
            runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>   
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:radajaxloadingpanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
            InitialDelayTime="10" MinDisplayTime="10" Width="75px">  
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                style="border: 0px;" /> 
        </telerik:radajaxloadingpanel> 


<telerik:RadGrid ID="RadGrid1" runat="server" EnableViewState="False" GridLines="None" 
AllowPaging="True" AllowSorting="True" Skin="Web20" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="False"   
 OnInit="RadGrid1_Init" PageSize="30" Height="470px" HorizontalAlign="Center" Width="690px">  
    <MasterTableView  DataKeyNames="StudentID" ClientDataKeyNames="StudentID" CommandItemDisplay="Top" > 
    <RowIndicatorColumn> 
        <HeaderStyle Width="20px" /> 
    </RowIndicatorColumn> 
     <Columns> 
            <telerik:GridBoundColumn HeaderText="StudentID" DataField="StudentID" Visible="False" UniqueName="StudentID">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="SSID" HeaderText="Student ID" UniqueName="column5" DataType="System.Int64"  > 
             <HeaderStyle Width="70px" /> 
            <ItemStyle Width="70px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Grade" HeaderText="Grade" UniqueName="column1" > 
            <HeaderStyle Width="60px" /> 
            <ItemStyle Width="60px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="column2" > 
             <HeaderStyle Width="120px" /> 
            <ItemStyle Width="120px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="column3" > 
             <HeaderStyle Width="120px" /> 
            <ItemStyle Width="120px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="IEP" HeaderText="IEP" UniqueName="column6" DataType="System.Boolean"  > 
             <HeaderStyle Width="50px" /> 
            <ItemStyle Width="50px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="EligibleREA" HeaderText="Eligible Reading" UniqueName="column7" > 
             <HeaderStyle Width="70px" /> 
            <ItemStyle Width="70px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="EligibleMath" HeaderText="Eligible Math" UniqueName="column8" > 
             <HeaderStyle Width="70px" /> 
            <ItemStyle Width="70px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn UniqueName="GridTemplateRegister" DataField="Registered" HeaderText="Registered">    
            <ItemTemplate>    
                <asp:CheckBox ID="chkRegistered" runat="server"  TextAlign="Right"   OnCheckedChanged="chkRegistered_CheckedChanged"    
                     AutoPostBack="True"  Checked='<%#Bind("Registered") %>' />    
            </ItemTemplate>    
            <HeaderStyle Width="70px" /> 
            <ItemStyle Width="70px" /> 
            </telerik:GridTemplateColumn> 
        </Columns> 
        <CommandItemTemplate> 
            <asp:LinkButton Style="vertical-align: bottom" ID="btnAdd" runat="server" 
               OnClientClick="javascript:return AddStudent();"> <img style="border:0px" alt="" src="images/addstudent.gif" />Add Student Record</asp:LinkButton>       
          
        </CommandItemTemplate> 
 
    </MasterTableView> 
        <ClientSettings > 
            <ClientEvents  /> 
            <Scrolling AllowScroll="True" UseStaticHeaders= "True"/>  
            </ClientSettings> 
     <PagerStyle Mode="NumericPages" PageButtonCount="20" /> 
     </telerik:RadGrid> 

        protected void chkRegistered_CheckedChanged(object sender, EventArgs e)  
        {    
            CheckBox chkbx = (CheckBox)sender;   
            GridDataItem item = (GridDataItem)(sender as CheckBox).NamingContainer; //item is the row where the checkbox (that invoked the event) resides    
              
            // Update database  
 
        }   


Thanks,
Parth
Parth
Top achievements
Rank 1
 answered on 02 Nov 2009
2 answers
122 views
Hi

When the window content page is viewed on its own, there is no problem, but when the page is seen within a RadWindow, a single pixel artefact is visible when using IE7 or IE 8. Unfortunately it is white and the page background is black so it is very visible.
I attach a screenshot with IE at the top, Firefox below.

Can you help me get rid of it!

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 02 Nov 2009
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?