Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
116 views
Hi,

I have been looking at this issue for the best part of 2 days now and have scoured through these forums looking for a pointer or two but to no avail.

Basically I have a programatically created Grid, that has 3 levels of grouping on the page load. I have set the grid to use  GroupLoadMode=Client. When the page first comes up the grid looks great, however as soon as I collapse any of the groups the page styling goes totally AWOL.

For nested groups, the collapse command correctly hides all of the rows within all of the groups however it doesn't hide the nested group headers. It also leaves some of the borders of the original rows still visible on the screen. This is occuring in IE6 (tested in FireFox the page looks fine).

From what I can make out in tools like Firebug and IE Dev Toolbar the display:none and display:table-row commands are being correctly applied on the rows, however the internal DIV's (the other group headers) are not inheriting this value and are remaining present. If I switch the Group Load Mode to Server the issue dissapears, but I want the grid to be responsive for users when they show and hide groups.

These are the main settings I have on my Grid currently:
            reportGrid.Skin = "WebBlue"
            reportGrid.BackColor = Color.White; 
            reportGrid.GridLines = GridLines.Vertical; 
            reportGrid.PageSize = 50; 
            reportGrid.AllowPaging = true
            reportGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; 
            reportGrid.PagerStyle.Position = GridPagerPosition.Top; 
 
            reportGrid.AutoGenerateColumns = false
            reportGrid.AllowSorting = true
            reportGrid.ClientSettings.Resizing.AllowColumnResize = true
            reportGrid.ClientSettings.Scrolling.AllowScroll = true
            reportGrid.ClientSettings.Resizing.ResizeGridOnColumnResize = true
            reportGrid.ClientSettings.ClientEvents.OnGroupCollapsed = "TestHide"
            reportGrid.ClientSettings.ClientEvents.OnGroupExpanded = "TestShow"
             
            reportGrid.ClientSettings.Scrolling.UseStaticHeaders = true
 
            reportGrid.Width = Unit.Percentage(100); 
            reportGrid.Height = Unit.Percentage(100); 
             
            reportGrid.MasterTableView.TableLayout = GridTableLayout.Auto; 
            reportGrid.MasterTableView.GroupLoadMode = GridGroupLoadMode.Client; 

Any help would be massively appreciated.

Thanks,

Carlos

Dimo
Telerik team
 answered on 26 Mar 2009
5 answers
248 views
I've noticed a problem with the RadGrid control when I call rebind and I have a calculated column in the my grid.

I'm trying to use the AjaxManager example you show in your online documentation on rebinding the grid by using the AjaxManager's AjaxRequest to rebind the grid when the RadWindow gets closed. The problem I'm getting is that when the ajax request is called the first time after the RadWindow object is closed nothing happens to the grid, only subsequent requests does the code work.

I looked at the code and it appears that on the first request it throws an error "An item with the same key already exists" from the grid control, which is the same error I received from another application which I reported to you when I used rebind in the delete command. I understand that it's unneccesary to call rebind in the delete command, but calling rebind in another event that has nothing to do with the grid it still throws that error.

Is there some bug with the calculated column that prevents rebind to be called twice in a row or something? If you could suggest a work-around for this situation that would be great.
Yavor
Telerik team
 answered on 26 Mar 2009
11 answers
251 views
I am in a sub-site and I want to link an image that is in the image library of the site above my current site. I have full access to both sites but I am unable to move up a directory. I am clicking the directory buttons but it stil only shows the Documents, Pages, and PublishingImages folders for my current sub-site.

Also, since I couldn't do the above I tried it manually. If I have a link to an image (in SharePoint)... how do I insert that image? I opened the image manager, pasted the link, and either have the option of close or insert, neither of which saves and creates the images.

I'm not to crazy about the RadEditor Image Manager and in fact would rather just use the SharePoint version for this part but I need the ability to strip the absolute paths for my development server when uploading. The main thing is I would like to have thumbnails of pictures to select like the MS version has. Is this a possiblity?

Thanks, 

When I can get these minor issues solved, I am going to purchase the standard version so that I have the Flash Manager, etc.

Curtis Shirley
Webmaster
Millikin University 
Markus
Top achievements
Rank 1
 answered on 26 Mar 2009
1 answer
167 views
Hi Svetlina ,


I want to display

Pivot Data

with RadGrid control , i have gone through the link
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/pivot/defaultcs.aspx

it helps me but i want some modification

like i dont want to bind grid with automatically generated columns
bcz i need some image fileds and hyperlink fileds and gridtemplate columns
so I want to work with atugeneratedcolumns set to false
and manually adding labels to itemtemplates.

Any help really appreciated (Need help with code)

Thanks
Sebastian
Telerik team
 answered on 26 Mar 2009
1 answer
87 views
Hey there folks...

I'm running into a problem that seems to be new to the 2009.1.311 Radgrid.

Please note, the radgrid I am using is in a User control in Sitefinity 3.6

I have a grid using paging, and the paging style is set to NextPrevNumericAndAdvanced.

The Numeric buttons work fine.  However the "Page xxxx of xxxx" function stops firing after using any pager control the first time.

For example.  I start my page, I click the Next page button to go to page two.  If I try to enter page #  "100" and click Go, it does not work.

Another example.  I start my page, I enter page # 100 and click go... It works.  I then enter page # 105, and click Go.  It does not work.

This started happening with the 2009.1.311 Radgrid, and it only happens using ajax.

Anybody else running into this, or is this a new bug?

Thanks,

Kuba
Sebastian
Telerik team
 answered on 26 Mar 2009
2 answers
128 views
I want to disable (or hide) pager controls (for example, when a user edits a record (or adds a new record)).

How do I do this on the server-side w vb code?
Bruce
Top achievements
Rank 1
 answered on 26 Mar 2009
1 answer
139 views
I want to by able to Add a record to my datagrid using Ajax.

I'm using inline EditMode and the GridEditCommandColumn.
                            <rad:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="~/RadControls/Grid/Skins/WebBlue/Update.gif"
                                EditImageUrl="~/RadControls/Grid/Skins/WebBlue/Edit.gif" InsertImageUrl="~/RadControls/Grid/Skins/WebBlue/Insert.gif" CancelImageUrl="~/RadControls/Grid/Skins/WebBlue/Cancel.gif"
                                UniqueName="EditCommandColumn" >
                            </rad:GridEditCommandColumn>


I need the Ajax request come to back to my codebehind page to perform the addition and then rebind. Is it possible to do something like this? (Hooked into the <ClientEvents OnCommand> If so, how do I get the values of the newly added row?

        function RaiseCommand(sender, args) { 
            if (args.get_commandName() === "PerformInsert") { 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('PerformInsert:' + <<NEEDVALUES>>); 
            } 
        } 
 
 

Or is there an easier way???

Many Thanks
Mike
Tsvetoslav
Telerik team
 answered on 26 Mar 2009
2 answers
236 views
I need to mark special days in RAD Calender, which are stored in a data base.
So What I need to know is: How to bind special days to RAD Calender using .vb code.
And I need to change the back ground colour of those special days, which colour also need to be get dynamically. 

Waiting for quick reply.
 
Princy
Top achievements
Rank 2
 answered on 26 Mar 2009
1 answer
216 views
Hi,
We have customized the rad Grid skin to suit our needs.We have problem with the header height.

Actually the header style image comes from the sprite.gif image.
For some rad Grids the hedaer style image seem to overflow a little bit.This happens when we set the AllowMultiRowSelection=true.

When we remove this multirow selection the rad grid header image seem to work fine.

Find below the code for radgrid

<

telerik:RadGrid ID="radGridFacts" runat="server" AllowMultiRowSelection="True" AllowPaging="True"

 

 

AutoGenerateColumns="False" GridLines="None" PageSize="30" AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowMultiRowEdit="True"

 

 

DataSourceID="objContDsFact" AllowFilteringByColumn ="True" Height="400px">

 

 

<AlternatingItemStyle BackColor="#EDEFF1" BorderColor="Blue" />

 

 

<PagerStyle AlwaysVisible="True" Mode="NextPrevNumericAndAdvanced" PageButtonCount="25"

 

 

Position="TopAndBottom" />

 

 

<MasterTableView CommandItemDisplay="Top" EditMode="InPlace" AllowFilteringByColumn="True"

 

 

DataSourceID="objContDsFact" TableLayout ="Fixed">

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" height="2px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="../images/Update.gif"

 

 

EditImageUrl="../images/Edit.gif" InsertImageUrl="../images/Insert.gif" CancelImageUrl="../images/Cancel.gif"

 

 

UniqueName="EditCommandColumn">

 

 

<HeaderStyle Width="4%" />

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"

 

 

ImageUrl="../images/Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">

 

 

<HeaderStyle Width="4%" />

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridButtonColumn>

 

 

<telerik:GridClientSelectColumn>

 

 

<HeaderStyle Width="4%" HorizontalAlign="center"/>

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

</telerik:GridClientSelectColumn>

 

 

<telerik:GridBoundColumn DataField="Tag" HeaderText="Tag" UniqueName="factTagCol">

 

 

<HeaderStyle Width="13%" />

 

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ShortDescription" HeaderText="Short Description"

 

 

UniqueName="colFactShortDesc">

 

 

<HeaderStyle Width="16%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="LongDescription" HeaderText="Long Description"

 

 

UniqueName="colFactLongDesc">

 

 

<HeaderStyle Width="20%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CurrencyDbMarketTag" HeaderText="Currency Market Tag"

 

 

UniqueName="colCurrencyDbMarketTag" ReadOnly="True">

 

 

<HeaderStyle Width="13%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CurrencyDbFactTag" HeaderText="Currency Fact Tag "

 

 

UniqueName="colCurrencyDbFactTag " ReadOnly="True">

 

 

<HeaderStyle Width="13%" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="FactRate" HeaderText="Fact Rate" UniqueName="colFactRate"

 

 

ReadOnly="True">

 

 

<HeaderStyle Width="13%" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<CommandItemTemplate>

 

<%

-- <div style="padding: 10px 0px;">--%>

 

 

<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="UpdateEdited"

 

 

Style="vertical-align: bottom"

 

 

Visible="<%# radGridFacts.EditIndexes.Count > 0 %>"><img alt=""

 

 

src="../images/Update.gif" style="border:0px;vertical-align:middle;" />

 

Update Products

</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnCancel" runat="server" CausesValidation="false"

 

 

CommandName="CancelAll"

 

 

Visible="<%# radGridFacts.EditIndexes.Count > 0 || radGridFacts.MasterTableView.IsItemInserted %>"><img

 

 

alt="" src="../images/Cancel.gif" style="border:0px;vertical-align:middle;" />

 

Cancel editing

</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnAddProduct" runat="server" CommandName="InitInsert"

 

 

Visible="<%# !radGridFacts.MasterTableView.IsItemInserted %>"><img alt=""

 

 

src="../images/AddRecord.gif" style="border:0px;vertical-align:middle;" />

 

Add new Product

</asp:LinkButton>

 

 

<asp:LinkButton ID="btnSaveProduct" runat="server" CommandName="PerformInsert"

 

 

Visible="<%# radGridFacts.MasterTableView.IsItemInserted %>"><img alt=""

 

 

src="../images/Insert.gif" style="border:0px;vertical-align:middle;" /> Add

 

this Product

</asp:LinkButton>

 

 

&nbsp;

 

 

<asp:LinkButton ID="btnUpdateEdited" runat="server" CausesValidation="false"

 

 

CommandName="EditSelected" Visible="<%# radGridFacts.EditIndexes.Count == 0 %>"><img

 

 

alt="" src="../images/Edit.gif" style="border:0px;vertical-align:middle;" />

 

Edit Selected Products

</asp:LinkButton>

 

 

<asp:LinkButton ID="btnDeleteSelectedProducts" runat="server"

 

 

CausesValidation="false" CommandName="DeleteSelected"

 

 

OnClientClick="javascript:return confirm('Delete all selected Products?')"><img

 

 

alt="" src="../images/Delete.gif" style="border:0px;vertical-align:middle;" />

 

Delete Selected Products

</asp:LinkButton>

 

 

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnRefresh" runat="server" CommandName="RebindGrid"><img

 

 

alt="" src="../images/Refresh.gif" style="border:0px;vertical-align:middle;" />

 

Refresh Product list

</asp:LinkButton>

 

<%

-- </div>--%>

 

 

</CommandItemTemplate>

 

 

</MasterTableView>

 

 

<ClientSettings AllowKeyboardNavigation="True" AllowColumnsReorder="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" ScrollHeight="300px" />

 

 

</ClientSettings>

 

 

<FilterMenu EnableTheming="True">

 

 

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

 

 

</FilterMenu>

 

 

<EditItemStyle BackColor="#A2A2A2" />

 

 

</telerik:RadGrid>

 



Thanks
Bala
Dimo
Telerik team
 answered on 26 Mar 2009
4 answers
466 views
I'm trying to connect a radgrid (rgCompDetail) to a stored procedure and I cannot get the records to display.  My stored procedure produces a 2 column grad with 5 lines. 

here's the code I'm attempting.  Any suggestions/corrections? 


 

Dim strConn2 As String = regKey.GetValue("DotNetConnectionString")

 

Dim sConn2 As New SqlConnection(strConn2)

 

 

 

Dim drDetail2 As SqlDataReader

 

 

 

Dim cmdShipdata As New SqlCommand("sp_ShipDetailInCompanyFields", sConn2)

 

 

 

cmdShipdata.CommandType = CommandType.StoredProcedure

cmdShipdata.Parameters.AddWithValue(

"@ProjectId", ProjectID)

 

 

cmdShipdata.Parameters.AddWithValue(

"@Company_Id", CustomerId)

 

 

 

sConn2.Open()

drDetail2 = cmdShipdata.ExecuteReader

 

rgCompDetail.DataSource = drDetail2

rgCompDetail.DataBind()

 

 


Rosen
Telerik team
 answered on 26 Mar 2009
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?