I am using Radgrid to display the number of attachements under each category. currently the boundcolumn has the datafield = "Name" (Name of the category) alone. If each category row from the master table view is clicked then it will be expanded to show the list of attachments under it, but now i have the requirement to show the count of the attachments also along with the Name of the Category in the Bouncolumn of the MasterTableview.
BoundColCategory.DataField = "NAME" + (deatailtable Items Count)
I want the output in the below format
Output Example: Attachment1(s) (20)
Attachment2(s) (10)
Attachment3(s)
Attachment4(s) (5)
Attachment4(s) (11)
.........
.............
.............
I tried to set the datafield/text of the Boundcolumn in events like Item cretead or Pre- render and also in page load but not able to succeed Please help me how to achieve this programmmatically.
Below is the Grid in m
thanks
jose
BoundColCategory.DataField = "NAME" + (deatailtable Items Count)
I want the output in the below format
Output Example: Attachment1(s) (20)
Attachment2(s) (10)
Attachment3(s)
Attachment4(s) (5)
Attachment4(s) (11)
.........
.............
.............
I tried to set the datafield/text of the Boundcolumn in events like Item cretead or Pre- render and also in page load but not able to succeed Please help me how to achieve this programmmatically.
Below is the Grid in m
<
am:aMGridID
=
"amGrdNotesMaster"
runat
=
"server"
TabIndex
=
"212"
AutoGenerateColumns
=
"false"
AllowSorting
=
"false"
AllowPaging
=
"false"
ClientSettings-AllowColumnsReorder
=
"false"
ClientSettings-AllowDragToGroup
=
"false"
ShowGroupPanel
=
"false"
>
<
MasterTableViewDataKeyNames
=
"ID"
HierarchyDefaultExpanded
=
"false"
NoMasterRecordsText
=
""
NoDetailRecordsText
=
""
GroupLoadMode
=
"Client"
>
<
Columns
>
<
telerik:GridBoundColumnHeaderText
=
"Category"
DataField
=
"Name"
UniqueName
=
"Category"
/>
<
telerik:GridTemplateColumnUniqueName
=
"Reorder"
>
<
ItemTemplate
><
tm:TMButtonID
=
"btnReorder"
runat
=
"server"
CommandName
=
"reorder"
Text
=
"Reorder based on sort"
/></
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableViewName
=
"Detail"
AllowSorting
=
"true"
AllowPaging
=
"false"
DataKeyNames
=
"ID"
NoMasterRecordsText
=
""
NoDetailRecordsText
=
""
EditMode
=
"InPlace"
>
<
Columns
>
<
telerik:GridBoundColumn
Uniquename
=
"ID"
DataField
=
"ID"
Aggregate
=
"Count"
Visible
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridHyperLinkColumnUniqueName
=
"Subject"
HeaderText
=
"Subject"
DataNavigateUrlFormatString
=
"~/notedisplay.aspx?id={0}"
DataNavigateUrlFields
=
"ID"
DataTextField
=
"Subject"
SortExpression
=
"Subject"
ItemStyle-CssClass
=
"gridhyperlink"
HeaderStyle-Width
=
"500px"
/>
<
telerik:GridHyperLinkColumnUniqueName
=
"Attachment"
HeaderText
=
"Attachment"
DataNavigateUrlFormatString
=
"javascript:void(window.open('imageviewer.aspx?a=3&b=Attachment&c={0}', '_blank', 'left=0, top=0, width=785, height=585, titlebar=yes, location=no, status=no, toolbar=no, menubar=no, scrollbars=no, resizable=yes'));"
DataNavigateUrlFields
=
"ID"
DataTextField
=
"AttachmentName"
SortExpression
=
"AttachmentName"
ItemStyle-CssClass
=
"gridhyperlink"
/>
<
telerik:GridBoundColumnUniqueName
=
"AddDate"
HeaderText
=
"Created"
DataField
=
"AddDate"
SortExpression
=
"AddDate"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumnUniqueName
=
"ModDate"
HeaderText
=
"Last Modified"
DataField
=
"ModDate"
SortExpression
=
"ModDate"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumnUniqueName
=
"ModUser"
HeaderText
=
"Modified By"
DataField
=
"ModUser"
SortExpression
=
"ModUser"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
HeaderText
=
"Position"
DataField
=
"SortOrder"
SortExpression
=
"SortOrder"
UniqueName
=
"SortOrder"
/>
<
telerik:GridEditCommandColumnUniqueName
=
"EditColumn"
>
<
ItemStyleCssClass
=
"gridhyperlink"
/>
</
telerik:GridEditCommandColumn
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
</
MasterTableView
>
<
ClientSettingsAllowExpandCollapse
=
"true"
>
</
ClientSettings
>
</
am:aMGrid
>
jose