Hi,
My find control is always return null value.
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
</EditColumn>
<FormTemplate>
<table id="Table2" cellspacing="2" cellpadding="1" border="0" rules="none"
style="border-collapse: collapse; background: white;">
<tr>
<td>
<table >
<tr>
<td>
<b>MaxTickets</b>
</td>
<td>
<asp:TextBox ID="txtMaxTickets" Text='<%# Bind("MaxTickets") %>' runat="server"></asp:TextBox>
</td>
</tr>
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "cmdTicket")
{
GridDataItem item = (GridDataItem)e.Item;
TextBox txtMaxTickets = (TextBox)item.FindControl("txtMaxTickets");
DbConnection Con = new DbConnection();
SqlConnection Conn = new SqlConnection();
Conn = Con.SQLConnection();
Conn.Open();
string sqlStr = "CreateTicket";
SqlCommand cmd = new SqlCommand(sqlStr, Conn);
How can i use findcontrol?
lakmal
My find control is always return null value.
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
</EditColumn>
<FormTemplate>
<table id="Table2" cellspacing="2" cellpadding="1" border="0" rules="none"
style="border-collapse: collapse; background: white;">
<tr>
<td>
<table >
<tr>
<td>
<b>MaxTickets</b>
</td>
<td>
<asp:TextBox ID="txtMaxTickets" Text='<%# Bind("MaxTickets") %>' runat="server"></asp:TextBox>
</td>
</tr>
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "cmdTicket")
{
GridDataItem item = (GridDataItem)e.Item;
TextBox txtMaxTickets = (TextBox)item.FindControl("txtMaxTickets");
DbConnection Con = new DbConnection();
SqlConnection Conn = new SqlConnection();
Conn = Con.SQLConnection();
Conn.Open();
string sqlStr = "CreateTicket";
SqlCommand cmd = new SqlCommand(sqlStr, Conn);
How can i use findcontrol?
lakmal