<
telerik:GridTemplateColumn
HeaderText
=
"Select Countries"
ItemStyle-Width
=
"240px"
UniqueName
=
"List_of_Countries"
>
<
ItemTemplate
>
<%# DataBinder.Eval(Container.DataItem, "List_of_Countries")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"rdComboCountries"
DataTextField
=
"country_name"
CheckBoxes
=
"true"
Width
=
"250px"
DataValueField
=
"country_id"
DataSourceID
=
"SqlDataSourceCountries"
SelectedValue='<%#Bind("List_of_Countries") %>'>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
asp:SqlDataSource
runat
=
"server"
ID
=
"SqlDataSourceCountries"
ConnectionString="<%$ ConnectionStrings:mydbConnectionString %>"
ProviderName="<%$ ConnectionStrings:mydbConnectionString.ProviderName %>"
SelectCommand="SELECT country_id, Country_names FROM lu_countries">
</
asp:SqlDataSource
>
Private
Sub
rgCountries_UpdateCommand(sender
As
Object
, e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
rgCountries.UpdateCommand
Dim
editItem
As
GridDataItem = e.Item
'Pass the parameter values to the SqldataSource
oDSMySqlCountries.UpdateParameters.Add(
New
Parameter(
"list_of_countries"
))
oDSMySqlCountries.UpdateParameters(
"list_of_countries"
).DefaultValue = GetCheckedItems(
DirectCast
(editItem.FindControl(
"rdComboCountries"
), RadComboBox))
'Update the values
oDSMySqlCountries.Update()
'Bind the RadGrid again
rgCountries.Rebind()
End
Sub
Private
Function
GetCheckedItems(
ByVal
comboBox
As
RadComboBox)
As
String
Dim
sb
As
New
StringBuilder()
Dim
collection
As
IList(Of RadComboBoxItem) = comboBox.CheckedItems
For
Each
item
As
RadComboBoxItem
In
collection
sb.Append(item.Value +
", "
)
Next
Return
sb.ToString.TrimEnd(
" "
).TrimEnd(
","
)
End
Function
foreach (CampaignHeader campaignItem in oCH)
{
ChartSeriesItem chartItem = new ChartSeriesItem();
chartItem.ActiveRegion.Url = string.Format("campaignviewer.aspx?CampaignId={0}", campaignItem.RecordId);
chartItem.Name = campaignItem.CampaignName;
chartItem.YValue = campaignItem.OAStart;
chartItem.YValue2 = campaignItem.OAEnd;
rcCampaign.Series[0].Items.Add(chartItem);
}
public void PopulateGrid()
{
try
{
DataTable dtDocList = new DataTable();
dtDocList = createDataTable(dtDocList);
DataRow docListRow = null;
if (FileExplorerDataSource.Count > 0)
{
foreach (DMSDocument currentDoc in FileExplorerDataSource)
{
docListRow = dtDocList.NewRow();
foreach (AspenDocumentListWebControlShowColumnsConfigurationElement column in AspenDocumentListUIConfig.ColumnsToShow)
{
foreach (DMSMetadata currProperty in currentDoc.Properties)
{
if (currProperty.Name == column.DataField)
{
docListRow[column.Name] = currProperty.Value;
break;
}
}
}
if (String.IsNullOrEmpty(filterExpression))
{
dtDocList.Rows.Add(docListRow);
}
else if (docListRow["DocumentType"].ToString() == filterExpression.ToString())
{
dtDocList.Rows.Add(docListRow);
}
}
if (String.IsNullOrEmpty(filterExpression))
{
Documents = dtDocList;
DataView sortedDocListView = new DataView(dtDocList);
if (dtDocList != null)
{
sortedDocListView.Sort = dtDocList.Columns["CreationDate"] + " DESC";
}
docListGrid.DataSource = sortedDocListView;
docListGrid.DataBind();
}
else
{
DataView sortedDocListView2 = new DataView(dtDocList);
if (dtDocList != null)
{
sortedDocListView2.Sort = dtDocList.Columns["CreationDate"] + " DESC";
}
//docListGrid.SortExpressions.Clear();
docListGrid.DataSource = sortedDocListView2;
docListGrid.Rebind();
}
}
else
{
//docListGrid.MasterTableView.NoRecordsTemplate = new NoRecordsTemplate();
}
}
catch (Exception)
{
// LogError(ex.Message + " /n Stack Trace :" + ex.StackTrace);
}
}
The filter expression will have the value of the tree node clicked.
This is quite urgent. Any help is very much appriciated.
Thanks in advance.
Regards
Rajeev
<style type="text/css">
.RadInput
{
display: none;
}
</style>