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

I have a rad grid with grouping.  My group totals show but I cannot get the FooterText for the group and the Footer style for the group. 


<

 

 

telerik:RadGrid ShowGroupPanel="true" AllowSorting="true" AutoGenerateColumns="false" ShowFooter="true" ID="gridPayCode" runat="server"

 

 

 

onneeddatasource="gridPayCode_NeedDataSource">

 

 

 

<MasterTableView ShowGroupFooter="true">

 

 

 

<Columns>

 

 

 

 

<telerik:GridBoundColumn DataField="facility_site_num" HeaderText="Site#"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn FooterText="Total:" FooterStyle-Font-Bold="true" FooterStyle-HorizontalAlign="Right" DataField="FacilityName" HeaderText="Facility"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Aggregate="Sum" FooterStyle-HorizontalAlign="Right" FooterStyle-Font-Bold="true" DataFormatString="{0:c}" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataField="PayAmount" HeaderText="Amount"/>

 

 

 

 

</Columns>

 

 

 

<GroupByExpressions>

 

 

 

<telerik:GridGroupByExpression>

 

 

 

<GroupByFields>

 

 

 

<telerik:GridGroupByField FieldName="PayCode" />

 

 

 

</GroupByFields>

 

 

 

<SelectFields>

 

 

 

<telerik:GridGroupByField FieldName="PayCode" HeaderText="Pay Code" />

 

<%

 

--<telerik:GridGroupByField Aggregate="Sum" FormatString="{0:c}" FieldName="PayAmount" HeaderText="Total" />--%>

 

 

 

</SelectFields>

 

 

 

</telerik:GridGroupByExpression>

 

 

 

</GroupByExpressions>

 

 

 

 

</MasterTableView>

 

</

 

 

telerik:RadGrid>

 

Mira
Telerik team
 answered on 20 Jul 2010
5 answers
133 views
I am getting this error (running site using VS2010 developer web service).  How do I prevent this?

  <Issues>
    <ErrorCode>The remote server returned an error: (500) Internal Server Error.</ErrorCode>
    <LineNumber>1</LineNumber>
    <LinePosition>0</LinePosition>
    <Url>/Telerik.Web.UI.WebResource.axd?compress=1&amp;_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2010.1.415.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-CA%3a1c53f111-a7b9-466f-ae26-3bd14c91dc5a%3a9e1572d6%3a3f3482cd</Url>
    <Index>-1</Index>
    <Id>0</Id>
    <Visible>true</Visible>
    <IsValidationIssue>true</IsValidationIssue>
    <Message>The remote server returned an error: (500) Internal Server Error.</Message>
  </Issues>
  <Issues>
T. Tsonev
Telerik team
 answered on 20 Jul 2010
2 answers
114 views
Howdy,

I have a custom button on my MOSSRadEditor which works great however I now need to change the button appearance. Ideally I'd like the button to say "Select" but I can't find how to specify text. All examples show using an image. So I went ahead and used and image and the button won't stretch with the image! I see "Se" in the button, can I stretch it out to fit the entire image? I've tried

<

 

style type="text/css">

 

.reTool

 

.SelectSome

 

{

 

background-image: url(select.gif);

 

 

width:200px

 

}

</

 

style>

Thanks,

 

Delphi
Top achievements
Rank 1
 answered on 20 Jul 2010
3 answers
203 views

Hi,

I have a RadBinaryImage control inside a usercontrol and when the page loads, the image in the control appears "broken". This RadBinaryImage control is inside a usercontrol, which is in turn inside a RadGrid. I have the RadBinaryImage control in another page and it works fine. The only difference is that in the other page I use it in a RadGrid and not inside a usercontrol that is inside a RadGrid. Below are the code snippets.

 

<telerik:RadGrid ID="RadGridHardware" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" DataSourceID="LdsHardware" OnItemCommand="RadGridHardware_ItemCommand" AutoGenerateColumns="False" OnItemCreated="RadGridHardware_ItemCreated" OnPreRender="RadGridHardware_PreRender" OnItemDataBound="RadGridHardware_ItemDataBound"> 
<MasterTableView DataSourceID="LdsHardware" DataKeyNames="ItemUID">  
    <EditFormSettings EditFormType="WebUserControl" UserControlName="HardwareDetails.ascx"></EditFormSettings>

    </MasterTableView>  
</telerik:RadGrid> 

 

 

 

The snippet for the HardwareDetails user control wher the RadBinaryImage resides is below:       

 

 

 

 

<tr>

<td style="width: 15%">  

<label> Image: </label>  

</td>

<td style="width: 85%">

<telerik:RadBinaryImage runat="server" ID="RadBinaryImageView" DataValue='<%# Eval("ImageContent") %>' AutoAdjustImageControlSize="false" Width="125px" Height="125px" ToolTip="" AlternateText="" />

</td>

</tr>

 

 

 

Please help. Thanks.

Marlon

 

 

 

 

Rosen
Telerik team
 answered on 20 Jul 2010
2 answers
139 views
Hi Sir

I am using telerik q1 2010 Trial Version Now.

Now i want to create look like Ajax Modal Popup extender.

Bur i can't find any control in telerik.

Please Suggest me how to i use that ?

- thanks
Kishor Dalwadi
Top achievements
Rank 2
 answered on 20 Jul 2010
1 answer
108 views
Hi,
I am having following problem when using RadTreeView within a WebUserControl which is dynamically loaded on a main aspx page. I use ExpandeMode=TreeNodeExpandMode.ServerSideCallBack for node expand event. The tree, whose root nodes are loaded within OnPreRender, keep getting rebuilt everytime i do NodeClick to load a RadGrid data. Is there a different place that I can put the code to built the tree  roots so it do not get refreshed within OnPreRender event.
Below are my source codes:
.vb

Partial

 

Class Controls_DocumentInquiry_BatchDetails

 

 

Inherits ContentControl

 

 

 

 

 

 

 

Protected Overrides Sub OnPreRender(ByVal e As EventArgs)

 

 

MyBase.OnPreRender(e)

 

 

If Not IsPostBack Then

 

 

 

 

 

End If

 

 

 

 

 

If StageName <> "" Then

 

 

 

 

 

Dim dsScanMainBatches As DataSet = ScanMainData

 

 

Dim dsBatchMainBatches As DataSet = batchmainData

 

 

Dim dsStages As DataSet = AllStagesData

 

 

Dim drStage() As DataRow

 

 

For Each dt As DataTable In dsStages.Tables

 

drStage = dt.Select(

"StageID = " & StageID)

 

 

If drStage.Length > 0 Then

 

 

 

 

 

Exit For

 

 

 

 

 

End If

 

 

 

 

 

Next

 

 

 

 

LoadRootNodes(rtvBatches, TreeNodeExpandMode.ServerSideCallBack, StageName, drStage, dsScanMainBatches, dsBatchMainBatches)

 

End If

 

 

 

 

 

End Sub

 

 

 






Protected
Sub Page_Load(ByVal source As Object, ByVal e As EventArgs)

 

 

 

End Sub

 

 

 

 

 

 

Protected Sub Page_Init(ByVal source As Object, ByVal e As EventArgs)

 

 

End Sub

 

 

 

 

 

 

Protected Sub rgBatchDetails_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rgBatchDetails.SelectedIndexChanged

 

 

'Display the image

 

 

 

 

 

 

Dim strBatchNumber As String = rgBatchDetails.SelectedItems(0).Cells(2).Text

 

 

Dim strImageFile As String = rgBatchDetails.SelectedItems(0).Cells(3).Text

 

GridImageDetails.LoadData(

"Image.aspx?ImageLocation=C:\CMMain\CMData\Output\" & strBatchNumber & "\" & strImageFile)

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub rtvBatches_NodeClick(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs)

 

rgBatchDetails.Rebind()

 

End Sub

 

 

 

 

 

 

Public Function GetBatchViewData(ByVal nodeSelected As RadTreeNode) As DataSet

 

 

Dim ds As New DataSet

 

 

If nodeSelected.Value.Substring(0, 4) = "BATC" Then

 

 

 

 

 

ds = objRTLWebService.Retrieve_DocumentsByBatch(nodeSelected.Text, strError)

 

ElseIf nodeSelected.Value.Substring(0, 4) = "GROU" Then

 

 

 

 

 

ds = objRTLWebService.Retrieve_DocumentsByGroup(nodeSelected.ParentNode.Text, nodeSelected.Text, strError)

 

ElseIf nodeSelected.Text = "OPEN/PENDING" Then

 

 

 

 

 

 

End If

 

 

 

 

 

 

Return ds

 

 

End Function

 

 

 

 

 

 

Private Function CreateNode(ByVal strName As String, ByVal isExpanded As Boolean) As RadTreeNode

 

 

Dim node As New RadTreeNode(strName)

 

node.Expanded = isExpanded

 

Return node

 

 

End Function

 

 

 

 

 

 

Private Shared Sub LoadRootNodes(ByVal treeBatches As RadTreeView, ByVal expandMode As TreeNodeExpandMode, _

 

 

ByVal strStageName As String, ByVal drStage() As DataRow, _

 

 

ByVal dsScanMainBatches As DataSet, ByVal dsBatchMainBatches As DataSet)

 

 

If drStage.Length = 0 Then

 

 

 

 

 

 

Dim a = 0

 

 

Exit Sub

 

 

 

 

 

 

Else

 

 

 

 

 

treeBatches.Nodes.Clear()

 

Dim intCounter1 As Integer = 0

 

 

Dim intCounter2 As Integer = 0

 

 

Dim strOpenStatus As String = drStage(0).Item("OpenStatus").ToString

 

 

Dim strInProgressStatus As String = drStage(0).Item("InProgressStatus").ToString

 

 

Dim strCompleteStatus As String = drStage(0).Item("CompleteStatus").ToString

 

 

If strStageName = "SCANNING" Then

 

 

 

 

 

 

Dim drOpen() As DataRow = dsScanMainBatches.Tables(0).Select("BatchStatus = '" & strOpenStatus & "'")

 

 

Dim drInProgress() As DataRow = dsScanMainBatches.Tables(0).Select("BatchStatus = '" & strInProgressStatus & "'")

 

 

Dim drComplete() As DataRow = dsScanMainBatches.Tables(0).Select("BatchStatus = '" & strCompleteStatus & "'")

 

intCounter1 = drOpen.Length + drInProgress.Length

intCounter2 = drComplete.Length

 

Else

 

 

 

 

 

 

Dim drOpen() As DataRow = dsBatchMainBatches.Tables(0).Select("BatchStatus = '" & strOpenStatus & "'")

 

 

Dim drInProgress() As DataRow = dsBatchMainBatches.Tables(0).Select("BatchStatus = '" & strInProgressStatus & "'")

 

 

Dim drComplete() As DataRow = dsBatchMainBatches.Tables(0).Select("BatchStatus = '" & strCompleteStatus & "'")

 

intCounter1 = drOpen.Length + drInProgress.Length

intCounter2 = drComplete.Length

 

End If

 

 

 

 

 

 

Dim node As New RadTreeNode()

 

node.Text =

"Open/Pending" & "(" & intCounter1.ToString() & ")"

 

 

 

 

 

node.Value =

"0" & strStageName

 

node.ToolTip =

"ROOT"

 

 

 

 

 

 

If intCounter1 > 0 Then

 

 

 

 

 

node.ExpandMode = expandMode

 

End If

 

 

 

 

 

treeBatches.Nodes.Add(node)

 

Dim node1 As New RadTreeNode()

 

node1.Text =

"Complete" & "(" & intCounter2.ToString() & ")"

 

 

 

 

 

node1.Value =

"1" & strStageName

 

node1.ToolTip =

"ROOT"

 

 

 

 

 

 

If intCounter2 > 0 Then

 

 

 

 

 

node1.ExpandMode = expandMode

 

End If

 

 

 

 

 

treeBatches.Nodes.Add(node1)

 

End If

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

Protected Sub rtvBatches_NodeExpand(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs)

 

 

Dim dsScanMainBatches As DataSet = ScanMainData

 

 

Dim dsBatchMainBatches As DataSet = batchmainData

 

 

Dim dsStages As DataSet = AllStagesData

 

 

Dim drStage() As DataRow

 

 

For Each dt As DataTable In dsStages.Tables

 

drStage = dt.Select(

"StageID = " & StageID)

 

 

If drStage.Length > 0 Then

 

 

 

 

 

 

Exit For

 

 

 

 

 

 

End If

 

 

 

 

 

 

Next

 

 

 

 

 

PopulateNodeOnDemand(e, TreeNodeExpandMode.ServerSideCallBack, dsScanMainBatches, dsBatchMainBatches, drStage)

 

End Sub

 

 

 

 

 

 

Private Shared Sub PopulateNodeOnDemand(ByVal e As RadTreeNodeEventArgs, ByVal expandMode As TreeNodeExpandMode, _

 

 

ByVal dsScanMainBatches As DataSet, ByVal dsBatchMainBatches As DataSet, _

 

 

ByVal drStage() As DataRow)

 

 

Dim strNodeText As String = e.Node.Text

 

 

Dim strNodeValue As String = e.Node.Value

 

 

Dim strStageName As String = strNodeValue.Substring(1, strNodeValue.Length - 1)

 

 

If drStage.Length = 0 Then

 

 

 

 

 

 

Dim a = 0

 

 

Exit Sub

 

 

 

 

 

 

Else

 

 

 

 

 

 

Dim dtData As New DataTable

 

 

If strNodeText.ToUpper.IndexOf("OPEN/PENDING") >= 0 Then

 

 

 

 

 

 

If strStageName = "SCANNING" Or strStageName = "" Then

 

 

 

 

 

dtData = dsScanMainBatches.Tables(0)

 

Else

 

 

 

 

 

dtData = dsBatchMainBatches.Tables(0)

 

End If

 

 

 

 

 

 

Dim drData() As DataRow = dtData.Select("BatchStatus = '" & drStage(0).Item("OpenStatus") & "'")

 

 

For Each row As DataRow In drData

 

 

Dim node As New RadTreeNode()

 

node.Text = row(

"BatchNumber").ToString()

 

node.Value =

"BATCH" & row("BatchNumber").ToString()

 

node.ExpandMode = expandMode

e.Node.Nodes.Add(node)

 

Next

 

 

 

 

 

e.Node.Expanded =

True

 

 

 

 

 

 

ElseIf strNodeText.ToUpper.IndexOf("COMPLETE") >= 0 Then

 

 

 

 

 

 

If strStageName = "SCANNING" Then

 

 

 

 

 

dtData = dsScanMainBatches.Tables(0)

 

Else

 

 

 

 

 

dtData = dsBatchMainBatches.Tables(0)

 

End If

 

 

 

 

 

 

Dim drData() As DataRow = dtData.Select("BatchStatus = '" & drStage(0).Item("CompleteStatus") & "'")

 

 

For Each row As DataRow In drData

 

 

Dim node As New RadTreeNode()

 

node.Text = row(

"BatchNumber").ToString()

 

node.Value =

"BATCH" & row("BatchNumber").ToString()

 

node.ExpandMode = expandMode

e.Node.Nodes.Add(node)

 

Next

 

 

 

 

 

e.Node.Expanded =

True

 

 

 

 

 

 

ElseIf strNodeValue.Substring(0, 4) = "BATC" Then

 

 

 

 

 

dtData = GetGroupNodes(strNodeText)

 

For Each row As DataRow In dtData.Rows

 

 

Dim node As New RadTreeNode()

 

node.Text = row(

"DocTypeIndex").ToString("000")

 

node.Value =

"GROUP" & row("DocTypeIndex").ToString()

 

 

If dtData.Rows.Count > 0 Then

 

 

 

 

 

node.ExpandMode = expandMode

 

End If

 

 

 

 

 

e.Node.Nodes.Add(node)

 

Next

 

 

 

 

 

e.Node.Expanded =

True

 

 

 

 

 

 

ElseIf strNodeValue.Substring(0, 4) = "GROU" Then

 

 

 

 

 

dtData = GetDocumentNodes(e.Node.ParentNode.Text, strNodeText)

 

For Each row As DataRow In dtData.Rows

 

 

Dim node As New RadTreeNode()

 

node.Text = row(

"DocType").ToString & " " & row("ImageFile").ToString & " " & row("AccountNo").ToString & " " & row("Amount").ToString

 

node.Value =

"DOC" & row("ImageFile").ToString()

 

 

If dtData.Rows.Count > 0 Then

 

 

 

 

 

node.ExpandMode = expandMode

 

End If

 

 

 

 

 

e.Node.Nodes.Add(node)

 

Next

 

 

 

 

 

e.Node.Expanded =

True

 

 

 

 

 

 

End If

 

 

 

 

 

 

End If

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

Private Shared Function GetGroupNodes(ByVal strBatchNumber As String) As DataTable

 

 

Dim dsGroups As DataSet = objRTLWebService.Retrieve_GroupsByBatch(strBatchNumber, strError)

 

 

Return dsGroups.Tables(0)

 

 

End Function

 

 

 

 

 

 

Private Shared Function GetDocumentNodes(ByVal strBatchNumber As String, ByVal strGroupNumber As String) As DataTable

 

 

Dim dsDocuments As DataSet = objRTLWebService.Retrieve_DocumentsByGroup(strBatchNumber, strGroupNumber, strError)

 

 

Return dsDocuments.Tables(0)

 

 

End Function

 

Pero
Telerik team
 answered on 20 Jul 2010
12 answers
319 views
VS 2008
.net 2.0
RadChart Q3 2009

I am trying to get into the GUI screens that allow you set series information etc.  Right click properties in design view takes you to VS properties in solution explorer.

When in smart tag, when clicking "Chart Wizard"  I receive the following error:

"Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Telerik.Charting.Properties.Resources.resources" was correctly embedded or linked into assembly "Telerik.Web.UI" at compile time, or that all the satellite assemblies required are loadable and fully signed"

Any ideas?
Ves
Telerik team
 answered on 20 Jul 2010
3 answers
166 views
HI guys,

I am using two GridDropDownColumn inside RadGrid.

1- DropDownList is AssetType
2- DropDownList is Category

What I am trying to do is this:

When user select value from first dropdown list (AssetType), I need to get the asset type value so I can update the values in second dropdown list (category).

So bit of research I found some help, which is to attach an event to a GridDropDownColumn. I have found this code on many forums to attach an event


SomeList.ComboBoxControl.SelectedIndexChanged = New RadComboBoxSelectedIndexChangedEventHandler(AddressOf ComboBoxControl_SelectedIndexChanged)

 

 

 

Protected Sub ComboBoxControl_SelectedIndexChanged(ByVal sender as Object, ByVal e as RadComboBoxSelectedIndexChangedEventArgs)

    ' code goes here
End Sub



But when I try to attach an event in my code my list doesn't give me 'SelectedIndexChanged'  option instead it gives me 'SelectedIndex' option. 

To cut long story short can you please tell me with example how to attach an event to a GridDropDownColumn and also check below code and tell me what I am doing wrong.

 



Private Sub AssetGrid_ItemCreated(ByVal sender as Object, ByVal e as Telerik.Web.UI.GridItemEventArgs) Handles AssGrid.ItemCreated

If TypeOf e.Item Is GridEditableItem AndAlso (e.Item.IsInEditMode) Then

 

Dim editableItem as GridEditableItem = DirectCast(e.Item, GridEditableItem)

 

‘ Get the asset list

 

Dim assetList As GridDropDownListColumnEditor = TryCast(editableItem.EditManager.GetColumnEditor(“AssetTypeID”) , GridDropDownListColumnEditor)

 

AssetList.ComboBoxControl.AutoPostBack = True

 

AssetList.ComboBoxControl.SelectedIndex = New RadComboBoxSelectedIndexChangedEventHandler(AddressOf ComboBoxControl_SelectedIndexChanged)

 

End If

Protected Sub ComboBoxControl_SelectedIndexChanged(ByVal sender as Object, ByVal e as RadComboBoxSelectedIndexChangedEventArgs)

    ' code goes here
End Sub



Its urgent!

Many Thanks 

Mira
Telerik team
 answered on 20 Jul 2010
2 answers
206 views

Hi,

 

We are finding difficult to apply background color/image to the Rad Grid header as it is pointed in the screen shot attached.  I will appreciate if any one can give the solution. 

Thanks

Venkat

  

 

Venkatakrishna
Top achievements
Rank 1
 answered on 20 Jul 2010
1 answer
376 views
Alright, I've found a few posts on how to trigger a RadWindow (such as RadAlert, etc) from a server-side postback, but NONE work when the control generating the postback is 'ajaxified'. This is a huge letdown, since I had wanted to use radwindows for displaying exceptions,etc to the user.

Here are some of the notable posts I've found:

this, and this

A year ago I was using the Ajax Toolkit, and relied on the "Modal Popup" for this same thing. It worked wonderfully. I could create a popup with a label, and set the label text on exception and call 'myPopup.visible=true;' and guarantee that it would show up for the user regardless of whether or not the postback control was ajaxified. Is it possible to replicate this functionality with the radwindow stuff?
Petio Petkov
Telerik team
 answered on 20 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?