Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
327 views
Hello,

I have two radgrid in which one contains two fields a check box and a name. The system checks what the user has access to and selects the appropiate check box if the user has rights to those feeds. Since there are a lot of feeds I would like the "Selected" checkbox items to appear first. I am unsure on how to do this. Here is my Rad Grid

 

 <telerik:RadGrid ID="RadFeedsList"   
                    DataSourceID="SqlDataSource2"   
                    AllowMultiRowSelection="True" 
                    runat="server"   
                    AllowSorting="True"   
                    GridLines="None"   
                    Width="300px"   
                    CssClass="FeedsList"   
                    AutoGenerateColumns="False" 
                    Skin="">  
                    <MasterTableView Width="100%">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
 
                        <Columns> 
                            <telerik:GridClientSelectColumn SortExpression="CategoryID" UniqueName="ClientSelectColumn" ItemStyle-Width="10px" /> 
                            <telerik:GridBoundColumn  DataField="CategoryID" UniqueName="id" Visible="false" HeaderText="Feeds"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn  DataField="Name" UniqueName="Name" HeaderText="Feeds"></telerik:GridBoundColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                        <Selecting EnableDragToSelectRows="true" AllowRowSelect="True"></Selecting> 
                    </ClientSettings> 
                    <SelectedItemStyle CssClass="SelectedItem"></SelectedItemStyle>   
                    <AlternatingItemStyle CssClass="" ></AlternatingItemStyle>  
                </telerik:RadGrid> 

And here is the code that I am trying to get to work:

 GridSortExpression expression = new GridSortExpression();  
            expression.FieldName = "CategoryID";  
            expression.SetSortOrder("Ascending");  
            RadFeedsList.MasterTableView.SortExpressions.AddSortExpression(expression);  
            RadFeedsList.MasterTableView.Rebind();  
 

But it clears all the checkboxes on the rebind/

 

 

 

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 31 Dec 2008
4 answers
306 views
Hi

I am having Employee combo,Date picker,Button with in Ajax panel.
Both employee name,Date are require fields.
If the user chage the Employee in combo or click the Button both having the same function loading the Employee detail grid. 
so i have given the causesvalidation property="True" for both button,Combo.If date is empty i select the employee its giving the error message "InvalidDate".then i gave the date and click the button .First the combo's SelectedIndexChanged Event is firing then button click event is firing.So LOADGIRD function calling dwice.Why both event's are firing at this time?

Thanks
Vairam
vairam
Top achievements
Rank 1
 answered on 31 Dec 2008
1 answer
287 views
Hi,

Iam bindning a RadGrid Datasource on a Button click event. In that case the empty Radgrid is not visible during the page load.
On button click the Databinding happens and then the Rad grid becomes visible.

Is there any setting that need to be chnaged for making the Radgrid visible with empty records during page load.

Thanks
Bala
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2008
3 answers
96 views
Hello,

Does anyone have an example of adding the checkbox or any control in a composite server control with RadGrid?  Or if you have any suggestion please let me know.

Thank you,
-Sal
Princy
Top achievements
Rank 2
 answered on 31 Dec 2008
3 answers
137 views
Hi all,
I am using a radgrid and allowing multi-row edit in inline edit form. I have 2 columns, 1 of which I would like to skip. Since the use only wants to tab though the one column, i need to figure out a way for him to hit tab and essentially skip the second column and go directly to the row below.

I have found zero on this topic on regular gridview or radgrid.

Could I programmatically get tab to equal tab +1 (i.e. add an additional tab to one tab click)

Help appreciated.

Ryan
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2008
0 answers
112 views
Hi buddies,
                  i am very new to Rad Controls, please help me out with this problem. today i have to release
my forms., so please give me solution as soon as u see this forum. i have a radtree in my page for that i
bind values by assigning dataset in server side. in binding no problem. a single node  contains more than
three or four subcategories. so when i click a parent node ,its child nodes are checked automatically that is
also not a problem after checking all the child node i need to add only the child nodes to listbox which is present
very next to radtree. as i told i have more subcategories under a single node so i need to only add childnodes to
listbox. could anybody give me solution for this. plz very urgent

mail to: ckarthick@ymail.com

Regards

karthick.c

karthick
Top achievements
Rank 1
 asked on 31 Dec 2008
2 answers
79 views
I have implemented a test using the related grid example.  My difference is that I have an edit command column and a template for the edit form.  All the grids are updated via AJAX.  The grids interrelate correctly, but when clicking on the edit button or add record link the form doesn't display.  If I turn off AJAX the form displays, but the application slows down significantly.

 

Code behind:

 

Protected Sub grdFacilities_ItemCommand(ByVal source As ObjectByVal e As GridCommandEventArgs) Handles grdFacilities.ItemCommand  
 
If e.CommandName = "RowClick" Then 
    Dim id As Integer = Int32.Parse(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID"))  
    lblStatus.Text = "Selected Facility ID " & id  
Else 
    lblStatus.Text = "e.CommandName = " & e.CommandName  
End If 
End Sub 
 
 

ASPX grid code:

<telerik:RadGrid ID="grdFacilities" runat="server" GridLines="None" DataSourceID="FacilitiesGridObjectDataSource"   
     OnItemDeleted="grdFacilities_ItemDeleted" OnItemInserted="grdFacilities_ItemInserted" OnItemUpdated="grdFacilities_ItemUpdated"  OnItemCommand="grdFacilities_ItemCommand" 
     AllowMultiRowEdit="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" > 
     <MasterTableView DataKeyNames="ID" AutoGenerateColumns="False" DataSourceID="FacilitiesGridObjectDataSource" EditMode="PopUp" 
          CommandItemDisplay="Top" NoMasterRecordsText="No facilities on file"  > 
          <Columns> 
               <telerik:GridEditCommandColumn ButtonType="ImageButton">  
                    <ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn> 
               <telerik:GridBoundColumn DataField="ID" ReadOnly="True" HeaderText="ID" DataType="System.Int32" UniqueName="ID">  
                    <ItemStyle ForeColor="Gray" /></telerik:GridBoundColumn> 
               <telerik:GridBoundColumn DataField="FacilityName" ReadOnly="True" HeaderText="Facility" UniqueName="FacilityName" ></telerik:GridBoundColumn> 
               <telerik:GridButtonColumn ConfirmText="Delete this Facility?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" 
                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">  
               <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /></telerik:GridButtonColumn> 
          </Columns> 
          <EditFormSettings EditFormType="Template" PopUpSettings-Width="587px">  
               <FormTemplate> 
                    <table id="Table7" cellspacing="1" cellpadding="1" width="350" border="0"><tr><td>Name</td> 
                         <td><asp:TextBox ID="txtFirstName" runat="server" Text='<%# Bind( "FacilityName" ) %>'></asp:TextBox></td></tr> 
                    </table> 
                    <asp:ImageButton ID="btnUpdate" runat="server"    
                         ImageUrl="images/saveBtnBg.gif" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>'>  
                    </asp:ImageButton> 
                    <asp:ImageButton ID="btnCancel" runat="server" 
                         ImageUrl="images/cancelBtnBg.gif" CommandName="Cancel"></asp:ImageButton> 
               </FormTemplate> 
               <EditColumn UniqueName="EditCommandColumn1">  
          </EditColumn> 
          <FormCaptionStyle BorderColor="White" BorderStyle="None" ForeColor="Black" /></EditFormSettings>  
          <CommandItemSettings AddNewRecordText="Add Facility" /> 
     </MasterTableView> 
     <HeaderContextMenu EnableTheming="True" Skin="Vista">  
          <CollapseAnimation Duration="200" Type="OutQuint" /> 
     </HeaderContextMenu> 
     <ClientSettings enablepostbackonrowclick="true">  
          <Selecting AllowRowSelect="true" /> 
          <Scrolling AllowScroll="True" ScrollHeight="40%" UseStaticHeaders="True"  /> 
     </ClientSettings> 
</telerik:RadGrid> 

Thanks

Ken
Top achievements
Rank 1
 answered on 30 Dec 2008
3 answers
284 views

Hi

I have a grid with 2 tables hierarchy

System autogenerates <telerik:GridExpandColumn> columm. How I can remove it?
When I try to add ExpandCollapseColumn-Visible="false" for MasterTableView - no changes. Other properties works (for example ExpandCollapseColumn-ButtonType="ImageButton")

How I can remove this column?
(I wish to add expanding features to whole row)

When I try to add <telerik:GridExpandColumn></telerik:GridExpandColumn> System generates 2 expand columns

Current test grid is here:

<telerik:RadGrid ID="rgAttachmentsGrid" AllowPaging="False" runat="server"  Skin="CommonGrid" EnableEmbeddedSkins="false"  BorderStyle="Solid"  GridLines="None" AutoGenerateColumns="false" CellPadding="0" CellSpacing="0"    
OnItemCreated="rgAttachmentsGrid_ItemCreated" OnItemCommand="rgAttachmentsGrid_ItemCommand" > 
<MasterTableView DataKeyNames="AttGroupID" DataMember="Group" AutoGenerateColumns="False" EditMode="InPlace" InsertItemDisplay="Top" CommandItemDisplay="Top"  AllowAutomaticInserts="true"  BorderStyle="None" CellPadding="0" CellSpacing="0" 
      ExpandCollapseColumn-Visible="false"    > 
<CommandItemSettings AddNewRecordText="<%$ Language:Translate:str_Field_Editor_AddNewItem %>" RefreshText="<%$ Language:Translate:str_Field_Editor_Refresh %>" /> 
<DetailTables> 
<telerik:GridTableView DataKeyNames="AttachID" DataMember="Attachment" AutoGenerateColumns="false">  
     <ParentTableRelation> 
        <telerik:GridRelationFields DetailKeyField="AttGroupID" MasterKeyField="AttGroupID" /> 
    </ParentTableRelation> 
    <Columns> 
        <telerik:GridBoundColumn DataField="FileName" UniqueName="ID1" Visible="True" > 
        </telerik:GridBoundColumn> 
    </Columns>   
</telerik:GridTableView>   
</DetailTables> 
<Columns> 
 
 
<telerik:GridBoundColumn DataField="AttGroupID" UniqueName="ID" Visible="False" > 
</telerik:GridBoundColumn> 
<telerik:GridTemplateColumn> 
<ItemTemplate> 
<asp:LinkButton ID="lbGroup" runat="server" Width="100%"></asp:LinkButton> 
</ItemTemplate>   
</telerik:GridTemplateColumn> 
</Columns>   
</MasterTableView>   
</telerik:RadGrid> 



Matthew
Top achievements
Rank 1
 answered on 30 Dec 2008
0 answers
113 views
I'm in the process of utilizing RadTreeview for a project, and the data displayed in the treeview may be voluminous, so I was looking at using a webservice-based deferred loading setup.  This deferred loading will have a few layers, so the user can expand the root node, it will then fetch the sub-nodes, some of which may themselves be expandable, thus triggering subsequent calls to the webservice to populate their sub-nodes.  However, I have a need to sync the treeview with the page being viewed.  I was wondering if anyone had tried to implement something like this before and could perhaps give some pointers.

To provide more detail, my treeview may contain a nested data item that's two or three levels deep.  If the user is viewing a page associated with that data item, I'll need the treeview to load enough nodes to get to that item without the user having to re-open the nodes, and in the process re-fetch the sub-nodes from the webservice.  Ideally I'd like to pass the ID of the item and I can figure out on the webservice side what nodes have to be created.  My uncertainty centers around the fact that it's not a simple scenario of populating an expanded node.

Has anyone dealt with a similar issue in the past and if so how did you solve it?

Josh
Josh Anderson
Top achievements
Rank 1
 asked on 30 Dec 2008
2 answers
113 views
Hello,

I have a Scheduler control, which uses an advanced edit/insert form (which is a user control).  The scheduler is also using the AjaxManager to prevent postbacks.

I need to validate that form.  Whenever I use validators in this edit/insert user control, I get an error.  So I switched to processing it manually, and then trying to display text in a label.  I get errors too.

Essentially, I get a "RadLoadingPanel1 control is not a registered script control (because it didn't call RegisterScriptDescriptors)."

I assume this is related to the AJAX post back (as I get the ASP.NET AJAX web proxy framework code to appear that you get whenever you do an AJAX web service call and get an error; I'm familiar with this code sample as I get it a lot :-;).

Anybody ever use validation in the scheduler using the AJAX settings?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 30 Dec 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?