<
InsertItemTemplate
>
<
asp:DropDownList
ID
=
"ddlGender"
runat
=
"server"
>
<
asp:ListItem
Text
=
"Male"
Value
=
"Male"
></
asp:ListItem
>
<
asp:ListItem
Text
=
"Female"
Value
=
"Female"
></
asp:ListItem
>
</
asp:DropDownList
>
</
InsertItemTemplate
>
Dim selectColmn As New TreeListSelectColumn()
selectColmn =
New TreeListSelectColumn()
selectColmn.HeaderText =
"select"
selectColmn.UniqueName =
"select"
RadTreeList1.Columns.Add(selectColmn)
templateColumn =
New TreeListTemplateColumn()
templateColumn.HeaderText =
"Invoice #"
templateColumn.UniqueName = "inv_id"
templateColumn.ItemTemplate =
New InvTemplColumn(templateColumn.DataField)
RadTreeList1.Columns.Add(templateColumn)
After selecting few invoices I want to perform some actions like- export,print, for which I need inv_id of selected rows(inv_id is not visible in treelist), but I am not able to get inv_id of selected rows.Is there any option using which I can bind value to selectcolumn. Please let me know if you have any solution. It's very urgent.
Thanks in advance.
RadPane2 is hidden initially on my page. However, I have RadGrid1 in RadPane1, which is visible.
So when I select a row from RadGrid1, this causes the indexchanged event method to fire. RadPane2.Visible is set to True in that method and I populate the detail fields. Using the debugger, I see values going into those detail fields. Unfortunately, on my page RadPane2 does not refresh and show me those updated fields.
What am I missing? Any suggestions?
code:
----------------------------
public void RadDataGrid1_IndexChanged(object sender, EventArgs e) { RadGrid grid = (sender as RadGrid); if (grid != null && RadDataGrid1.SelectedIndexes.Count > 0) { int index = grid.SelectedIndexes[0].GetIntOrZeroIfError(); item = grid.Items[index];
// Detail fields lblDetail_Name.Text = item["Name"].Text;
lblDetail_Address.Text = item["Address"].Text;
RadPane2.Visible = true; } }
----------------------------
Thanks,
Tammie
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadGrid
ID
=
"RadGrid1"
Width
=
"100%"
AllowSorting
=
"True"
ShowFooter
=
"True"
OnPreRender
=
"RadGrid1_PreRender"
PageSize
=
"15"
AllowPaging
=
"True"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
AllowMultiRowSelection
=
"True"
ShowChooser
=
"true"
EnableLinqExpressions
=
"False"
runat
=
"server"
GridLines
=
"None"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
DataSourceID
=
"SqlDataSource1"
>
<
MasterTableView
Width
=
"100%"
Summary
=
"RadGrid table"
RetrieveAllDataFields
=
"false"
DataSourceID
=
"SqlDataSource1"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ProductID"
HeaderText
=
"ProductID"
DataType
=
"System.Int32"
SortExpression
=
"ProductID"
FilterControlAltText
=
"Filter ProductID column"
ReadOnly
=
"True"
UniqueName
=
"ProductID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ID"
HeaderText
=
"ID"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter ID column"
SortExpression
=
"ID"
UniqueName
=
"ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ProductName"
HeaderText
=
"ProductName"
FilterControlAltText
=
"Filter ProductName column"
SortExpression
=
"ProductName"
UniqueName
=
"ProductName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Price"
HeaderText
=
"Price"
SortExpression
=
"Price"
UniqueName
=
"price"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Price2"
HeaderText
=
"Price2"
SortExpression
=
"Price2"
UniqueName
=
Price2
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Rajeev_DBConnectionString %>"
SelectCommand="SELECT * FROM [product]"></
asp:SqlDataSource
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Business;
using
Telerik.Web.UI;
namespace
Telerik_Master_Pages
{
public
partial
class
TestSum : System.Web.UI.Page
{
Decimal total;
Decimal total2;
Decimal grantotal;
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem dataItem = e.Item
as
GridDataItem;
Decimal fieldValue = Convert.ToDecimal(dataItem[
"Price"
].Text);
Decimal Fieldvalue2 = Convert.ToDecimal(dataItem[
"Price2"
].Text);
total += fieldValue;
total2 += Fieldvalue2;
// grantotal = fieldValue + Fieldvalue2;
}
if
(e.Item
is
GridFooterItem)
{
grantotal = Convert.ToDecimal(total) + Convert.ToDecimal(total2);
GridFooterItem footerItem = e.Item
as
GridFooterItem;
footerItem[
"Price"
].Text =
"total: "
+ total.ToString();
footerItem[
"Price2"
].Text =
"total Price2: "
+ total2.ToString() +
" "
+
" Grand Total "
+ grantotal;
}
}
protected
void
RadGrid1_PreRender(
object
sender, EventArgs e)
{
}
}
}
#1 & #2 are absolute requirements. #3 is optional
Further to #1, I right-clicked in the Toolbox area of the VS2012 IDE and chose "Choose Items". On the ".NET Framework Components" tab of the dialog box I chose Browse. I navigated here: C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2012\Bin45
Three files appeared:
I tried clicking on the first two. It said "Loading the selected file(s)" Then later, when I pressed OK this message appeared: "The following controls were successfully added to the toolbox but are not enabled in the active designer:" After that, no Telerik tools appeared in the Toolbox.
While I had hoped I could save the cost of buying VS2012 Professional, this is not a very good start. Time is Money.
I would like a definitive answer from Telerik Support to my 3 questions above. Can I do all of that with the Express version of VS2012: Yes or No?
Robert