Here is my RadGrid aspx :
Now in code behind i want to fill those labels inside TemplateColumns like this :
Here is the wrong output.
How can i access those labels & fill them?
<
telerik:RadGrid
ID
=
"grd_transactions"
runat
=
"server"
GroupPanelPosition
=
"Top"
AutoGenerateColumns
=
"False"
>
<
GroupingSettings
CollapseAllTooltip
=
"Collapse all groups"
></
GroupingSettings
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_Type column"
HeaderText
=
"Type"
UniqueName
=
"TemplateColumn_Type"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"100px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_Type"
runat
=
"server"
Text
=
"lbl_Type"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_Date_Time_UTC_GMT column"
HeaderText
=
"Date & Time (UTC/GMT)"
UniqueName
=
"TemplateColumn_Date_Time_UTC_GMT"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"200px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_Date_Time_UTC_GMT"
runat
=
"server"
Text
=
"lbl_Date_Time_UTC_GMT"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_BTC_Investment_Address column"
HeaderText
=
"BTC Investment Address"
UniqueName
=
"TemplateColumn_BTC_Investment_Address"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"600px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_BTC_Investment_Address"
runat
=
"server"
Text
=
"lbl_BTC_Investment_Address"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_Deposit_Amount column"
HeaderText
=
"Deposit Amount"
UniqueName
=
"TemplateColumn_Deposit_Amount"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"150px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_Deposit_Amount"
runat
=
"server"
Text
=
"lbl_Deposit_Amount"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_Payout_Amount column"
HeaderText
=
"Payout Amount"
UniqueName
=
"TemplateColumn_Payout_Amount"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"150px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_Payout_Amount"
runat
=
"server"
Text
=
"lbl_Payout_Amount"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn_Status column"
HeaderText
=
"Status"
UniqueName
=
"TemplateColumn_Status"
>
<
HeaderStyle
Font-Bold
=
"True"
Font-Size
=
"Medium"
Width
=
"150px"
HorizontalAlign
=
"Center"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
asp:Label
ID
=
"lbl_Status"
runat
=
"server"
Text
=
"lbl_Status"
></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Now in code behind i want to fill those labels inside TemplateColumns like this :
DataTable table =
new
DataTable();
table.Columns.Add(
"Type"
,
typeof
(
string
));
table.Columns.Add(
"Date & Time (UTC/GMT)"
,
typeof
(
string
));
table.Columns.Add(
"BTC Investment Address"
,
typeof
(
string
));
table.Columns.Add(
"Deposit Amount"
,
typeof
(
string
));
table.Columns.Add(
"Payout Amount"
,
typeof
(
string
));
table.Columns.Add(
"Status"
,
typeof
(
string
));
table.Rows.Add(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
);
table.Rows.Add(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
);
table.Rows.Add(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
);
table.Rows.Add(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
);
table.Rows.Add(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
);
grd_transactions.DataSource = table;
grd_transactions.DataBind();
Here is the wrong output.
How can i access those labels & fill them?