Write this function in Code Behind File
public static bool CheckValue(string txt)
{
if (txt == "Absent")
{
return false;
}
else
{
return true;
}
}
Using it in GRID
<asp:CheckBox ID="CheckBox1" runat="server" Checked=' <%# CheckValue
((string)Eval("TelephoneNo")) %>' />
Thanks & Regards
Amir
On Apr 6, 10:17 am, Jeena Ajiesh <[email protected]> wrote:
> By giving this bind, it will always be in the same value?
> The thing is that at the first time all the checkbox will be checked and
> inserted in the table. Then the user wil uncheck if the student is absent.
> After that grid values are updated into the table.In this time, if there is
> any unchecked checkbox, value stored in table is as 'Absent'.
> But, in this update, all the values except the checkbox value are correct.I
> need the unchecked checkbox value as 'Absent' in the database.
>
> On Mon, Apr 6, 2009 at 7:18 AM, Rajendra Prasad Majji <
>
> [email protected]> wrote:
> > <asp:CheckBox ID="cbAttStatus" runat="server" checked='<%#
> > Convert.ToBoolean("DBField") %>' />
>
> --
> ****************
> Thanks & Regards,
> Jeena Ajiesh
> Email: [email protected]
> [email protected]
>
> Sent from Dubayy, United Arab Emirates