Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
Hi all

I am using RadGrid with HeaderContextMenu enabled, I disabled grouping and I'd like to hide it from the HeaderContextMenu, I added the following code:

foreach (GridColumn column in RadGrid1.MasterTableView.Columns)
        {
            column.Groupable = false;
        }


and it works correctly, but when I tried to hide it from AutoGeneratedColumns I used the following code:

        foreach (GridColumn column in RadGrid1.MasterTableView.AutoGeneratedColumns)
        {
            column.Groupable = false;  
            
        }


but Group by, and Ungroup remains...

of course I used:

RadGrid1.ShowGroupPanel = false;
RadGrid1.GroupingEnabled = false;
RadGrid1.ClientSettings.AllowDragToGroup = false;

anyhelp please ASAP.......

Regards...

Idwaikat--










Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
1 answer
55 views
hello to all expert in telerik control,

                      i tried to follow the tips and tricks of grids hiding a gridbuttoncolumn and showing the  boundcolumn holding the data ,
and export to excel but it wont work what was wrong there. please kindly revised or check this code that someone give it to me..
 
my codes..

 

switch (e.Item.Value)//parentroot

 

{

 

case "2"://Excel

 

 

RadMenuItem Excel = e.Item;

 

 

 

foreach (GridDataItem item in RdGridMainpage.Items)

 

{

 

string requestid = item["Request ID"].Text.ToString();

 

 

 

 

if (item.Selected == true)

 

{

 

//SendtoMicrOffice(requestid);

 

 

this.RdGridMainpage.Columns.FindByUniqueNameSafe("SubjectButton").Visible = false;

 

 

this.RdGridMainpage.Columns.FindByUniqueNameSafe("Subjectdata").Visible =true;

 

 

}

 

else

 

{

item.Visible =

false;

 

}

}

 

 

RdGridMainpage.ExportSettings.ExportOnlyData =

true;

 

RdGridMainpage.ExportSettings.IgnorePaging =

true;

 

RdGridMainpage.ExportSettings.OpenInNewWindow =

true;

 

RdGridMainpage.MasterTableView.ExportToExcel();

 

break;

and this the source,

 

 

<telerik:RadGrid ID="RdGridMainpage" runat="server" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnItemCommand="RdGridMainpage_ItemCommand" OnItemDataBound="RdGridMainpage_ItemDataBound" Width="909px" Skin="Vista" AllowMultiRowSelection ="True" OnSelectedIndexChanged="RdGridMainpage_SelectedIndexChanged" OnNeedDataSource="RdGridMainpage_NeedDataSource" >

 

 

 

 

 

<MasterTableView DataKeyNames ="fxRequestKey" >

 

 

 

 

 

 

<PagerStyle Mode ="NumericPages" />

 

 

<RowIndicatorColumn>

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

</RowIndicatorColumn>

 

 

 

 

 

<ExpandCollapseColumn>

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

 

<Columns>

 

 

 

 

 

 

<telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

 

</telerik:GridClientSelectColumn>

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="fxRequestKey" HeaderText="Request ID" UniqueName="Request ID" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="fcReqCategoryName" HeaderText="Category" UniqueName="Category" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridButtonColumn CommandName="Select" DataTextField="fcSubject" HeaderText="Subject"

 

 

UniqueName="SubjectButton" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridButtonColumn>

 

 

 

 

 

<telerik:GridBoundColumn Visible ="False" DataField="fcSubject" HeaderText="Subject" UniqueName="SubjectData" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="fcRequestStatusName" HeaderText="Status" UniqueName="Status" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Stage" HeaderText="Stage" UniqueName="Stage" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Initiator" HeaderText="Initiator" UniqueName="Initiator" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Institution" HeaderText="Institution" UniqueName="Institution" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="DATE" HeaderText="Date" UniqueName="Date" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="AGE" HeaderText="Age" UniqueName="Age" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="fxUserKeyOwner" HeaderText="Assign To" UniqueName="Assign To" >

 

 

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

<ExportSettings>

 

 

 

 

 

<Pdf PaperSize ="Legal" PageHeight="14in" />

 

 

</ExportSettings>

 

 

<ClientSettings>

 

 

 

 

 

<Selecting AllowRowSelect="True" />

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

<FilterMenu EnableTheming="True" Skin="Vista">

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

</telerik:RadGrid><br />

sample codes is highly appreciated

thanks

 

Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
1 answer
131 views
We have a requirement where we need a radgrid with two level hierarchy and the child radgrid should have an add functionality ( a new row could be added to it) and should also be editable. Please let us know if it could be done, and any code reference for the same.
Thanks you,
Anil
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
3 answers
235 views
I have grid with some readonly columns.  When entering to edit mode I want the user to be able to see the value of the readonly column.  Readonly column values disappear in edit mode.
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
1 answer
153 views
Hello Dear Telerik Support,
Well Iam creating my own skins for radcontrols, but I have a problem with this RadGrid. The problem is this:

I have this on one of the columns:
   <telerik:GridBoundColumn
                            HeaderText="Task"
                            HeaderStyle-Width="150px"
                            HeaderStyle-HorizontalAlign="Center"
                            DataField="Name"/>
So that when i go to edit, i can have a Textbox for editing the name.
The problem is that this textbox displays without any skin. Hay have a custom skin for RadTextbox but doesnt work here.
I tried using the embedded skin Gray, and when I go to edit happens the same. All the other controls displays with the correct skin, except this TextBox.

Here is the entire code Iam using:
<telerik:RadGrid ID="trgTasks" runat="server" AutoGenerateColumns="false"
                    DataSourceID="ocdsTasks"
                    OnItemDataBound="trgTasks_ItemDataBound"
                    OnRowDrop="trgTasks_RowDrop"
                    AllowAutomaticUpdates="true"
                    AllowPaging="true"
                    PageSize="8"
                    SkinID="RadGrid">
                    <ClientSettings AllowRowsDragDrop="true">
                        <Selecting AllowRowSelect="true" />
                    </ClientSettings>
                    <ValidationSettings ValidationGroup="GRID" EnableValidation="false" />
                    <MasterTableView ShowHeadersWhenNoRecords="true" ShowHeader="true" EnableNoRecordsTemplate="true" EditMode="InPlace"
                        DataKeyNames="TaskId">
                         <SortExpressions>
                               <telerik:GridSortExpression FieldName="PositionInt" SortOrder="Ascending" />
                         </SortExpressions>
                       <Columns>
                        <telerik:GridTemplateColumn
                            HeaderText="#"
                            HeaderStyle-Width="50px"
                            HeaderStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblNumber" runat="server" SkinID="Label" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn
                            HeaderText="Task"
                            HeaderStyle-Width="150px"
                            HeaderStyle-HorizontalAlign="Center"
                            DataField="Name"/>
                        <telerik:GridDropDownColumn
                            HeaderText="Status"
                            HeaderStyle-Width="100px" 
                            HeaderStyle-HorizontalAlign="Center"
                            DataSourceID="ocdsStatus"
                            DataField="StatusId"
                            ListTextField="Name"
                            ListValueField="TaskStatusId"/>
                        <telerik:GridDropDownColumn
                            HeaderText="Priority"
                            HeaderStyle-Width="100px"
                            HeaderStyle-HorizontalAlign="Center"
                            DataSourceID="ocdsPriority"
                            DataField="PriorityId"
                            ListTextField="Name"
                            ListValueField="TaskPriorityId"/>
                        <telerik:GridDateTimeColumn
                            HeaderText="Deadline"
                            DataFormatString="{0:d}" 
                            HeaderStyle-Width="100px"
                            HeaderStyle-HorizontalAlign="Center"
                            DataField="DeadLine"
                            PickerType="DatePicker" />
                        <telerik:GridEditCommandColumn />
                       </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

Please, I will appreciate your help. 
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
1 answer
106 views
Is it possible to set TreeNode CheckState in the client side. If yes how?

It seems that only retrieving the value is documented. I have also set the class of the created span elements to change display but when it goes back to the server, the check state remains at unchecked.
Princy
Top achievements
Rank 2
 answered on 15 Apr 2009
1 answer
94 views
hi

Is it possible to have the update and cancel link buttons as that are displayed in edit mode as push buttons while keeping the link for the action (i.e. Edit) on the grid as a link?

regards
Kieran
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2009
8 answers
204 views
Really weird problem.  The popup icon on my calendar controls in my entire application have vanished.  They are vanished in the IDE,they are vanished when we push it out to the server.

The "placeholder" is still there, it still has the pointer cursor, and if you click it it works...but there is no visible image there...just an empy space.

Changing Skins does not help.

We have a huge demo coming up and this looks ridiculous.

Thanks

Steve
Sid
Top achievements
Rank 1
 answered on 15 Apr 2009
1 answer
83 views
I have implemented all of Todd's code and updated the template references as indicated and I still get a blank white space where the control is being rendered in Sharepoint.  If I take the same code and put it in a standard web site, the code renders fine.

See article reference: http://blogs.telerik.com/stoyanstratev/posts/08-08-20/radrotator_for_asp_net_ajax_using_dynamic_templates.aspx

I am using Visual Studio Extensions for Windows Sharepoint Services.  I have other web parts deployed using the RadGrid and RadChart controls and they work just fine.

Any ideas?

Thanks,

Terry
Terry Webster
Top achievements
Rank 2
 answered on 15 Apr 2009
6 answers
1.0K+ views
I'm just trying to understand what the purpose of ReloadOnShow is for... anybody want to help enlighten me?  In my instance, I am using a javascript method to call the RadWindow as such (example taken from the RadScheduler external edit example):

window.radopen("/dnndev/DesktopModules/MACU.Calendar/EventDetails.aspx?TabId=59&ItemId=" + apt.ID + "&Instance=" + start, "AdvancedForm");

So that reloads it everytime anyway... but maybe I'm just missing the point somewhere.  Since I have a lot of future uses I plan on doing with this, I'd really like to understand where/why I'd use that property.

Thanks in advance.
Roger
Top achievements
Rank 1
 answered on 15 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?