15,893,663 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Kunjammu (Top 91 by date)
Kunjammu
19-Feb-16 6:51am
View
in my global.asax page i have given like below
GlobalFilters.Filters.Add(new GAFilter());
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
in My GA Filter class
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
}
In the above function how can i check the session. can you please advice
Kunjammu
19-Feb-16 6:11am
View
not in a single page. after logout if we type any url of that site should redirect to login page. is there any method for doing globally
Kunjammu
19-Feb-16 6:03am
View
is this can done globaly
Kunjammu
19-Feb-16 6:02am
View
after logout some other person use the system and can see the url rignt?
it will be an issue? I am trying to solve this
Kunjammu
5-Dec-14 2:43am
View
mY APP CONFIG FILE IS UPDATED IN MY QUERY
I AM USING LOCALHOST
PLZ HELP ME
Kunjammu
15-Oct-14 1:40am
View
I encrypted connection string by
ConfigurationSection section = config.GetSection("connectionStrings");
//Ensures that the section is not already protected
if (!section.SectionInformation.IsProtected)
{
//Uses the Windows Data Protection API (DPAPI) to encrypt the
//configuration section using a machine-specific secret key
section.SectionInformation.ProtectSection(
"DataProtectionConfigurationProvider");
config.Save();
}
but i can't encrypt system.web and sytem.serviceModel
How can i do this?
Kunjammu
26-Aug-14 6:47am
View
it is not allowing integers. i want a regular expression which allows positive integers and decimal numbers having two decimal points whose values ranges from 0-13
Kunjammu
1-Aug-14 8:12am
View
please try in reverse way. then it will work
Kunjammu
1-Aug-14 7:49am
View
Did u set foriegn key in table( i mean in the database)
Kunjammu
1-Aug-14 7:33am
View
you are entring customer name in userinterface right? then how will reflect that..
Kunjammu
21-Jul-14 1:57am
View
if i give exact reference its working...but i want to use bundles
Kunjammu
17-Jun-14 3:07am
View
if another user published the same project with another name, it will be an issue right? so i am asking how can resolve this
Kunjammu
17-Jun-14 3:03am
View
not working...is there any idea? :-(
Kunjammu
17-Jun-14 2:42am
View
if i use
url: "/wsm/api/Login/Authenticate?username=" + username + "&password=" + password,
then its working, wsm is the root folder, how can i get the same result without using the name of root folder
Kunjammu
9-Jun-14 5:03am
View
not working...
Kunjammu
9-Jun-14 4:56am
View
Deleted
not working, even the change event is not hitting. i updated my quetion, have a look on that please
Kunjammu
9-Jun-14 1:52am
View
yes
in mvc4
Kunjammu
9-Jun-14 1:25am
View
i want to do it using jquery
Kunjammu
29-May-14 2:33am
View
hi,
i am populating combobox with observablecollection. in the example you given, with static resource
Kunjammu
29-May-14 2:07am
View
i changes the version of dll ans created setup, the its ok...thanks for your support
Kunjammu
28-May-14 2:44am
View
i am using vsual studio installer in setup and deployment. i am using vs2010
Kunjammu
29-Apr-14 4:22am
View
no
mvc4
Kunjammu
11-Apr-14 7:33am
View
public ActionResult ViewWorkStatus()
{
WorkStatusController work = new WorkStatusController();
DataTable dt = work.GetWorkStatus();
CategoryBLL bllObj = new CategoryBLL();
DataTable dt1 = bllObj.GetCategory();
SelectList selectList = new SelectList((IEnumerable<category>)ConvertCategoryToList(dt1), "CategoryID", "CategoryName");
ViewData["categories"] = selectList;
return View(ConvertToList(dt));
}
Kunjammu
11-Apr-14 7:21am
View
DataBinding: 'System.Web.Mvc.SelectListItem' does not contain a property with the name 'CategoryID'.
this error showing
Kunjammu
11-Apr-14 7:14am
View
no..
Kunjammu
11-Apr-14 6:35am
View
can u plzz help for
http://www.codeproject.com/Questions/758047/dropdwonlist-not-showing-selected-value
Kunjammu
11-Apr-14 2:50am
View
my date picker is inside a html table like
<th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.TextBoxFor(model => item.Date, new { @id = "date", @class = "datepicker", Value = item.Date.ToString("MM-dd-yyyy"), })
</td>
</tr>
}
</table>
Kunjammu
11-Apr-14 2:49am
View
if i use id , datepicker shows only for the first textbox. wht will i do... any idea..
Kunjammu
11-Apr-14 2:22am
View
<th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.TextBoxFor(model => item.Date, new { @id = "date", @class = "datepicker", Value = item.Date.ToString("MM-dd-yyyy"), })
</td>
</tr>
}
</table>
Kunjammu
11-Apr-14 2:15am
View
i have no code on datepicker selection change. i just want to save the selected date to database
Kunjammu
9-Apr-14 5:33am
View
Error shows The name 'Session' does not exist in the current context
i am using apicontroller. in that i can't use session, viewbag and viewdata
Kunjammu
9-Apr-14 4:49am
View
okay..
Kunjammu
9-Apr-14 4:42am
View
thank u...it will work. my code is working now. i made a mistake in my for loop. i used 1++ instead of i++. This mistake take my 2 hrs. :(
anyway thank u so much
Kunjammu
8-Apr-14 7:46am
View
since i am a beginner in mvc, can you please give a simple example....
Kunjammu
8-Apr-14 7:27am
View
what i mean is from dynamically generated table i want to save data
Kunjammu
7-Apr-14 1:19am
View
i want to do it in mvc
Kunjammu
2-Apr-14 1:57am
View
what i mean is
i have a gridview with columns name and address. i enter some name and address. assume i entered 3 rowss in the gridview. i want to save these three rows to database on SAVE button click
Kunjammu
15-Jul-13 3:35am
View
public ActionResult Index(int id)
{
if (Session["CurrentSession"] != null)
{
this.currentSession = (SessionManager.CurrentSession)Session["CurrentSession"];
}
UserDAL userdal = new UserDAL();
DataSet ds = new DataSet();
ds = userdal.UserRetrieve(0,id);
DataSet dsRole = new DataSet();
int RoleID = 0;
if (this.currentSession.RoleID!=0)
{
RoleID = this.currentSession.RoleID;
}
dsRole = userdal.UserRoleRetrieve(RoleID);
List<role> roleList = (from drRow in dsRole.Tables[0].AsEnumerable()
select new Role()
{
RoleID = drRow.Field<int>("RoleID"),
RoleName = drRow.Field<string>("RoleName")
}).ToList();
ViewData["rolelist"] = roleList;
ViewData["roleid"] = id;
ViewData["data"] = ConvertToTankReadings(ds.Tables[0]);
return View("Index",ConvertToTankReadings(ds.Tables[0]));
}
private IEnumerable<user> ConvertToTankReadings(DataTable dataTable)
{
foreach (DataRow row in dataTable.Rows)
{
yield return new User
{
UserID = Convert.ToInt32(row["UserID"]),
RoleID =Convert.ToInt32(row["RoleID"]),
UserName = row["UserName"].ToString(),
Password = row["Password"].ToString(),
Address = row["Address"].ToString(),
MobileNumber = row["MobileNumber"].ToString(),
Gender=row["Gender"].ToString()
};
}
}
Kunjammu
14-Jul-13 23:46pm
View
thanks..:)
Kunjammu
11-Jul-13 3:53am
View
i am using MVC4....
Kunjammu
8-Jul-13 3:48am
View
i have an actionlick in each row. when click on that everything should happen
Kunjammu
10-Jun-13 7:19am
View
only tried in IE. physical part
Kunjammu
7-Jun-13 0:27am
View
error showing is "Internet Explorer cannot display the webpage"
yes checked...
Kunjammu
5-Jun-13 6:02am
View
not working....same result
Kunjammu
3-Jun-13 4:54am
View
yes..i tried like that..but "Internet Explorer cannot display the webpage" shows..
Kunjammu
10-Jan-13 23:44pm
View
Hi. its not worked for me . let me elaborate my question. i deleted a row from this table manually. i am using a wpf usercontrol as my userinterface. if i click on a button. the copies should update. i am using a storedprocedure for this. can u plz tell how can do this?
Kunjammu
10-Jan-13 23:43pm
View
Hi. its not worked for me . let me elaborate my question. i deleted a row from this table manually. i am using a wpf usercontrol as my userinterface. if i click on a button. the copies should update. i am using a storedprocedure for this. can u plz tell how can do this?
Kunjammu
9-Jan-13 4:44am
View
thank u...
Kunjammu
9-Jan-13 4:10am
View
yes. RECNO is my Pk
Kunjammu
9-Jan-13 4:09am
View
can u plz give me an example
Kunjammu
9-Jan-13 4:09am
View
yes. RECNO is my Pk
Kunjammu
9-Jan-13 4:01am
View
made some changes in my question
Kunjammu
2-Jan-13 4:45am
View
yes. its a generic pattern for all the ToValue with two words with hiphen
Kunjammu
20-Dec-12 5:27am
View
:( :(
any other way.......?
Kunjammu
6-Dec-12 23:32pm
View
i inserted a break point.then checked value of radiobutton is TRUE at the beginning and end of the method. there is no any other code to change the value of radiobutton
Kunjammu
6-Dec-12 7:16am
View
done
Kunjammu
6-Dec-12 7:05am
View
Deleted
done
Kunjammu
6-Dec-12 6:48am
View
done
Kunjammu
6-Dec-12 2:04am
View
MessageBoxResult result = MessageBox.Show("do u want to continue", "Confirm", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes) {}
Kunjammu
4-Oct-12 7:38am
View
.ctl00_LeftMenu_0 { background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.ctl00_LeftMenu_1 { text-decoration:none; }
.ctl00_LeftMenu_2 { }
.ctl00_LeftMenu_3 { border-style:none; }
.ctl00_LeftMenu_4 { }
.ctl00_LeftMenu_5 { border-style:none; }
.ctl00_LeftMenu_6 { }
.ctl00_LeftMenu_7 { border-style:none; }
.ctl00_LeftMenu_8 { }
this is the code
Kunjammu
4-Oct-12 7:11am
View
this link is talking about windows application... i want to do this in my web application... is there any other way...?
Kunjammu
4-Oct-12 6:47am
View
How i can add menuitemclick event dynamically from code...can u plz tell me?
Kunjammu
4-Oct-12 6:33am
View
no autopostback property for menu control.....
Kunjammu
3-Oct-12 8:28am
View
How can i use that. can u plz help me...?
Kunjammu
3-Oct-12 8:28am
View
asp.net
Kunjammu
3-Oct-12 7:03am
View
can u help me to make it...
Kunjammu
3-Oct-12 6:51am
View
I have a masterpage. In that i have a asp menu. Usually when click on a menu item, a new page will opens. instead of that i want to load that page into a <DIV>. is it possible
Kunjammu
22-Aug-12 5:37am
View
Thank you so much.....its working fine...:D:D:D
Kunjammu
22-Aug-12 5:23am
View
The above code is great and i created like that and i got the result. But i am populating my datagrid using the following code
_dbHandler.AddParameter("@PersonID", PersonID);
DataSet ds = _dbHandler.GetData("dbo.PersonRetrieve");
var result = from column in ds.Tables[0].AsEnumerable()
select new PersonBO
{
PersonID = Convert.ToInt32(column["PersonID"]),
Name = column["Name"].ToString(),
FatherName = column["FatherName"].ToString(),
State = column["State"].ToString(),
District = column["District"].ToString(),
DOB = Convert.ToDateTime(column["DOB"]),
Gender = Convert.ToBoolean(column["Gender"])
};
PersonDatagrid.ItemsSource=result.
but after doing like you said , a compilation error shows at Gender(cannot implicitely convert the type Genders to boolean.
How can i convert column["Gender"] to the type Genders
Kunjammu
22-Aug-12 2:05am
View
this is a seperate class.Radiobutton is not available here
Kunjammu
22-Aug-12 2:03am
View
ok. done...
Kunjammu
22-Aug-12 1:29am
View
in the same page
Kunjammu
22-Aug-12 1:13am
View
i used
Binding="{Binding Gender, Converter={StaticResource StringToBool}}"
in the datatextcolumn in the datagrid
and in radiobutton
IsChecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Male}"
Kunjammu
22-Aug-12 1:11am
View
Deleted
in the datagrid
<datagridtextcolumn header="Gender" width="50" binding="{Binding Gender, Converter={StaticResource StringToBool}}">
in the radiobutton
<radiobutton content="Male" height="16" margin="1,27,0,0" name="MaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Male}" grid.column="1" horizontalalignment="Left" width="42" grid.row="3">
<radiobutton content="Female" height="16" horizontalalignment="Left" margin="56,27,0,0" name="FemaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Female}" grid.column="1" grid.row="3">
Kunjammu
22-Aug-12 1:08am
View
Deleted
<pre lang="xml"><window x:class="WPFTestProject.MainWindow"
="" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converter="clr-namespace:WPFTestProject.Converter" title="MainWindow" height="484" width="1116" windowstate="Maximized" initialized="Window_Initialized">
<window.resources>
<converter:stringtobooleanconverter x:key="StringToBool">
<grid>
<grid.columndefinitions>
<columndefinition width="584*">
<columndefinition width="510*">
<grid height="421" margin="12,12,0,0" name="grid1" verticalalignment="Top" horizontalalignment="Left" width="558">
<grid.rowdefinitions>
<rowdefinition height="50*">
<rowdefinition height="42*">
<rowdefinition height="44*">
<rowdefinition height="43*">
<rowdefinition height="46*">
<rowdefinition height="45*">
<rowdefinition height="45*">
<rowdefinition height="44*">
<rowdefinition height="62*">
<grid.columndefinitions>
<columndefinition width="194*">
<columndefinition width="364*">
<Label Content="Name:" Height="28" HorizontalAlignment="Left" Margin="0,22,0,0" Name="label1" VerticalAlignment="Top" />
<textbox height="23" horizontalalignment="Left" margin="0,27,0,0" name="NameTextBox" verticalalignment="Top" width="211" text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" grid.column="1">
<Label Content="Father's Name:" Height="28" HorizontalAlignment="Left" Margin="0,14,0,0" Name="label2" VerticalAlignment="Top" Grid.Row="1" />
<textbox height="23" horizontalalignment="Left" margin="0,14,0,0" name="FatherNameTextBox" verticalalignment="Top" width="211" text="{Binding FatherName, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="1">
<Label Content="DOB:" Height="28" HorizontalAlignment="Left" Margin="0,16,0,0" Name="label3" VerticalAlignment="Top" Grid.Row="2" />
<datepicker height="25" horizontalalignment="Left" margin="0,19,0,0" name="DOBDatePicker" verticalalignment="Top" width="211" text="{Binding DOB, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="2">
<Label Content="Gender:" Height="28" HorizontalAlignment="Left" Margin="0,15,0,0" Name="label4" VerticalAlignment="Top" Grid.Row="3" />
<radiobutton content="Male" height="16" margin="1,27,0,0" name="MaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Male}" grid.column="1" horizontalalignment="Left" width="42" grid.row="3">
<radiobutton content="Female" height="16" horizontalalignment="Left" margin="56,27,0,0" name="FemaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Female}" grid.column="1" grid.row="3">
<Label Content="State:" Height="28" HorizontalAlignment="Left" Margin="0,18,0,0" Name="label6" VerticalAlignment="Top" Grid.Row="4" />
<combobox height="23" horizontalalignment="Right" margin="0,23,153,0" name="StateComboBox" verticalalignment="Top" width="211" text="{Binding State, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="4">
<Label Content="District:" Height="28" HorizontalAlignment="Left" Margin="1,17,0,0" Name="label5" VerticalAlignment="Top"
Kunjammu
22-Aug-12 1:01am
View
can you able to see my xaml code??
Kunjammu
22-Aug-12 1:00am
View
yes. i am able to debug. when double click on row breakpoint in Convert hits
<Label Content="Name:" Height="28" HorizontalAlignment="Left" Margin="0,22,0,0" Name="label1" VerticalAlignment="Top" />
<textbox height="23" horizontalalignment="Left" margin="0,27,0,0" name="NameTextBox" verticalalignment="Top" width="211" text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" grid.column="1">
<Label Content="Father's Name:" Height="28" HorizontalAlignment="Left" Margin="0,14,0,0" Name="label2" VerticalAlignment="Top" Grid.Row="1" />
<textbox height="23" horizontalalignment="Left" margin="0,14,0,0" name="FatherNameTextBox" verticalalignment="Top" width="211" text="{Binding FatherName, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="1">
<Label Content="DOB:" Height="28" HorizontalAlignment="Left" Margin="0,16,0,0" Name="label3" VerticalAlignment="Top" Grid.Row="2" />
<datepicker height="25" horizontalalignment="Left" margin="0,19,0,0" name="DOBDatePicker" verticalalignment="Top" width="211" text="{Binding DOB, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="2">
<Label Content="Gender:" Height="28" HorizontalAlignment="Left" Margin="0,15,0,0" Name="label4" VerticalAlignment="Top" Grid.Row="3" />
<radiobutton content="Male" height="16" margin="1,27,0,0" name="MaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Male}" grid.column="1" horizontalalignment="Left" width="42" grid.row="3">
<radiobutton content="Female" height="16" horizontalalignment="Left" margin="56,27,0,0" name="FemaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Female}" grid.column="1" grid.row="3">
<Label Content="State:" Height="28" HorizontalAlignment="Left" Margin="0,18,0,0" Name="label6" VerticalAlignment="Top" Grid.Row="4" />
<combobox height="23" horizontalalignment="Right" margin="0,23,153,0" name="StateComboBox" verticalalignment="Top" width="211" text="{Binding State, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="4">
<Label Content="District:" Height="28" HorizontalAlignment="Left" Margin="1,17,0,0" Name="label5" VerticalAlignment="Top" Grid.Row="5" />
<combobox height="23" horizontalalignment="Right" margin="0,22,153,0" name="DistrictComboBox" verticalalignment="Top" width="211" text="{Binding District, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="5">
<Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="1,22,0,0" Name="SaveButton" VerticalAlignment="Top" Width="75" Click="SaveButton_Click" Grid.Column="1" Grid.Row="6" />
<Button Content="Delete" Height="23" HorizontalAlignment="Left" Margin="84,22,0,0" Name="DeleteButton" VerticalAlignment="Top" Width="75" Grid.Column="1" Grid.Row="6" Click="DeleteButton_Click" />
<Button Content="Refresh" Height="23" HorizontalAlignment="Left" Margin="165,22,0,0" Name="RefreshButton" VerticalAlignment="Top" Width="75" Grid.Column="1" Grid.Row="6" Click="RefreshButton_Click" />
<datagrid autogeneratecolumns="False" grid.column="1" height="200" horizontalalignment="Left" margin="0,12,0,0" name="PersonDatagrid" verticalalignment="Top" width="498" mousedoubleclick="PersonDatagrid_MouseDoubleClick">
<datagrid.columns>
<datagridtextcolumn header="Name" width="100" binding="{Binding Name}">
<datagridtextcolumn header="Father's name" width="100" binding="{Binding FatherName}">
Kunjammu
22-Aug-12 0:55am
View
Deleted
yes. i am able to debug. when double click on row breakpoint in Convert hits.
this is my xaml code
<window x:class="WPFTestProject.MainWindow"
="" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converter="clr-namespace:WPFTestProject.Converter" title="MainWindow" height="484" width="1116" windowstate="Maximized" initialized="Window_Initialized">
<window.resources>
<converter:stringtobooleanconverter x:key="StringToBool">
<grid>
<grid.columndefinitions>
<columndefinition width="584*">
<columndefinition width="510*">
<grid height="421" margin="12,12,0,0" name="grid1" verticalalignment="Top" horizontalalignment="Left" width="558">
<grid.rowdefinitions>
<rowdefinition height="50*">
<rowdefinition height="42*">
<rowdefinition height="44*">
<rowdefinition height="43*">
<rowdefinition height="46*">
<rowdefinition height="45*">
<rowdefinition height="45*">
<rowdefinition height="44*">
<rowdefinition height="62*">
<grid.columndefinitions>
<columndefinition width="194*">
<columndefinition width="364*">
<Label Content="Name:" Height="28" HorizontalAlignment="Left" Margin="0,22,0,0" Name="label1" VerticalAlignment="Top" />
<textbox height="23" horizontalalignment="Left" margin="0,27,0,0" name="NameTextBox" verticalalignment="Top" width="211" text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" grid.column="1">
<Label Content="Father's Name:" Height="28" HorizontalAlignment="Left" Margin="0,14,0,0" Name="label2" VerticalAlignment="Top" Grid.Row="1" />
<textbox height="23" horizontalalignment="Left" margin="0,14,0,0" name="FatherNameTextBox" verticalalignment="Top" width="211" text="{Binding FatherName, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="1">
<Label Content="DOB:" Height="28" HorizontalAlignment="Left" Margin="0,16,0,0" Name="label3" VerticalAlignment="Top" Grid.Row="2" />
<datepicker height="25" horizontalalignment="Left" margin="0,19,0,0" name="DOBDatePicker" verticalalignment="Top" width="211" text="{Binding DOB, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="2">
<Label Content="Gender:" Height="28" HorizontalAlignment="Left" Margin="0,15,0,0" Name="label4" VerticalAlignment="Top" Grid.Row="3" />
<radiobutton content="Male" height="16" margin="1,27,0,0" name="MaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Male}" grid.column="1" horizontalalignment="Left" width="42" grid.row="3">
<radiobutton content="Female" height="16" horizontalalignment="Left" margin="56,27,0,0" name="FemaleRadioButton" verticalalignment="Top" ischecked="{Binding Gender, Mode=TwoWay,UpdateSourceTrigger=LostFocus, Converter={StaticResource StringToBool}, ConverterParameter=Female}" grid.column="1" grid.row="3">
<Label Content="State:" Height="28" HorizontalAlignment="Left" Margin="0,18,0,0" Name="label6" VerticalAlignment="Top" Grid.Row="4" />
<combobox height="23" horizontalalignment="Right" margin="0,23,153,0" name="StateComboBox" verticalalignment="Top" width="211" text="{Binding State, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" grid.column="1" grid.row="4">
<Label Content="District:" Height="28"
Kunjammu
22-Aug-12 0:49am
View
i used IValueConverter like below
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value == false)
{
return "Female";
}
else
{
return "Male";
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (parameter.ToString() == "Male")
{
return true;
}
else
{
return false;
}
}
but not working...
Kunjammu
22-Aug-12 0:48am
View
no.i have a datagrid with a column GENDER. when double click on datagrid rows, if the gender is Male , then MaleRadioButton should select
i used IValueConverter like below
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value == false)
{
return "Female";
}
else
{
return "Male";
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (parameter.ToString() == "Male")
{
return true;
}
else
{
return false;
}
}
but not working...
Kunjammu
21-Aug-12 7:20am
View
thanks...i got solution from the second link given by you
Kunjammu
21-Aug-12 6:59am
View
sorry..i want to do it using radiobutton. is there any solution?
Kunjammu
8-Aug-12 7:50am
View
its the logic...:(
Kunjammu
8-Aug-12 7:30am
View
u have to write it in RowDataBound event. By using a for loop we can go through all the cells of gridview.so we can easily find the cell. we can compare dates like this also if(DateTime.Today>Date1) { ---- }
Kunjammu
8-Aug-12 3:11am
View
Hi Kenneth Haugland
i got the result..Thanks...
Kunjammu
8-Aug-12 1:31am
View
i did like below. but not working. can you please tell whats wrong<datagridtemplatecolumn width="10"> <datagridtemplatecolumn.celltemplate> <datatemplate><checkbox name="select"> <datagridtextcolumn width="100" binding="{Binding Path=IsChecked, ElementName=select, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource persondata}}">
Kunjammu
3-Aug-12 7:03am
View
May i get some example on binding method...?
Kunjammu
3-Aug-12 5:19am
View
i want to do it using databinding... is there any way?
Kunjammu
3-Aug-12 5:18am
View
i want to do it using databinding...is there any way?
Kunjammu
3-Aug-12 4:01am
View
ok.. its a simple approach.Thanks. But i don't want to disable my textbox. When something selected in combobox, an image should show nearer to the textbox indicating that the textbox value is mandatory. is there any way..?
Kunjammu
3-Aug-12 0:16am
View
Deleted
i have a function
public IEnumerable<countrybo> GetCountries()
{
XDocument oDoc = XDocument.Load("../../App_Xml/Country.xml");
var result = from info in oDoc.Descendants("Item")
select new CountryBO
{
Code = Convert.ToString(info.Element("Code").Value),
Description = Convert.ToString(info.Element("Description").Value)
};
return result;
}
i want to populate my combobox with "result" returning from this function....
can anybody help me...?
Show More