16,014,591 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 .NET 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 saimanisha (Top 65 by date)
saimanisha
21-Aug-18 8:08am
View
Deleted
DataTable dt=new DataTable();
dt.columns.add("name");
DataRow dr=null;
for(int i=0;i<4:i++)
{
dr=dt.newrow();
dr["name"]="sai";
dt.rows.add(dr);
}
datagrid.itemsource=dt.defaultview;
saimanisha
24-May-18 7:48am
View
yes i already saw that and it doesn't satisfy the requirement as i was new to mvc iam not finding better ways where i can get clear idea.
saimanisha
23-Mar-18 3:08am
View
if this solution helped then accept the solution
saimanisha
22-Mar-18 5:47am
View
i answered below check it
saimanisha
21-Mar-18 9:08am
View
will tell u tmrw
saimanisha
20-Mar-18 8:18am
View
you explain me clearly .do u want take multiple names from single textbox at a time or from multiple textboxes ..
saimanisha
17-Mar-18 1:53am
View
how could you open textarea a one form control in other form .if you wanna show the text which is there in txtarea juss create same textarea control i other form and pass this text to other form textarea.
saimanisha
13-Mar-18 6:42am
View
see i dont know how to do it exactly but i was juss discussing with you what am gng to say to u will be benificial or not .when u select combobox using binding to a variable .lets say of class model
variable selection
using query fetch data of varibale model(this may be fruits or pet names etc..)
bind fetched data to list ..
add list to itemsource of listview
saimanisha
13-Mar-18 5:22am
View
Deleted
from where you are fetching the data like fruits details when you select fruit in combobox.
saimanisha
28-Feb-18 5:22am
View
see set a timer set interval as 10 sec or whatever as per your requirement.for every few sec make it refresh .like when time is elapsed then it hits to the code where you are writing to fetch data who is online .
this one works well.if you think there will be any drawbacks if you use this .let me know.i ll try to get new idea which overcome those drawbacks.
saimanisha
26-Feb-18 1:24am
View
once you are updating online how you are displaying as online the same way you update busy too.
where you have doubt exactly
saimanisha
21-Feb-18 5:23am
View
once you run that code and let me know
saimanisha
21-Feb-18 5:19am
View
but tell me the correct requirement iam juss posting a sample .try the below code and let me know is that works fine for you.
saimanisha
21-Feb-18 5:07am
View
ok i will send you sample code by doing it.
saimanisha
14-Feb-18 2:33am
View
it works you have to add column..i juss given sample to adding data from list to datatable row..
saimanisha
8-Feb-18 5:34am
View
https://stackoverflow.com/questions/34869412/convert-image-into-pdf-using-itextsharp-in-c-sharp
saimanisha
8-Feb-18 5:34am
View
Deleted
https://stackoverflow.com/questions/34869412/convert-image-into-pdf-using-itextsharp-in-c-sharp
check this link
saimanisha
20-Dec-17 6:32am
View
suppose you make a count of each record
if count > 10 then in the condition you write code for disabling that button.
saimanisha
11-Dec-17 23:06pm
View
here we wont get file not found exception though the path is incorrect it throws load report failed exception..
saimanisha
11-Dec-17 6:29am
View
ok, "D:\Vel-Git\VelRooms\\Checkoutbilling.rpt" this is the path i have given here also the same scenario not working through setup file..can you please tell me how we have to take path when running through setup file.
saimanisha
28-Nov-17 22:32pm
View
this is the name space added in the xaml
xmlns:Viewer="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer"
clystal report viewer added :
<Viewer:CrystalReportsViewer x:Name="reportviewer" Margin="10,64,10,10" Background="#FFABEAE7" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}" BorderThickness="0"/>
if i remove this iam not getting the above provided exception .but if i navigate to this page for the second time where crystal reports viewer is present
this exception is occuring
'system.argumentnullexception' occurred in sapbusinessobjects.wpf.viewershared.dll and value cant be null
what is the solution to avoid occuring of this exception.
if i remove crystal report viewer and if i check then iam not getting this exception so the problem is with crystal report viewer when it is loading for the second time.
saimanisha
27-Nov-17 21:35pm
View
the exception is occuring when iload for second time.after intializing components and no other code is preset over there that too only while loading crystal report viewer page .so if you know the solution hope you share with us without unrelated answer
saimanisha
27-Nov-17 1:48am
View
ITS dll file .i had set it as class library we cant debug it.i added this dll in other project when am running the code the report is failed .
saimanisha
24-Nov-17 1:13am
View
report loaidng failed.how to load a crystal report of other project .reference is added as .dll
saimanisha
27-Oct-17 5:53am
View
actually we set binding properties for textbixes ryt so while loading the window
the validation should no take place..but vaidation is workig while loading of window..how do i restrict it to happen
saimanisha
27-Oct-17 0:11am
View
i did using lostfocus but the problem is to show the error content we are using style ryt .so the style must get applied to textboxes only when we run the window but the style is getting applied when we dont start debugging .and one more thing how to set tooltip to show error content for a particular textbox and validation is working while loading window .how to restrict to validate while loading of window
saimanisha
26-Oct-17 5:17am
View
can you please answer for the question what i have aske dabout validation when window is not running .
saimanisha
26-Oct-17 3:57am
View
i used the below code for binding.but the style which we have applied to show error content and s=error symbol is getting applied even when we are not running the window.
<TextBox Grid.Row="3" Grid.Column="1" Width="200" Height="30" DataContext="{Binding Source={StaticResource ViewModel}}"
Text="{Binding Path=Emailid,Mode=TwoWay,ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged}" />
saimanisha
7-Sep-17 4:51am
View
can you please explian me how to this irrespective of control evente.and the requirement is we have to use the same code for all the forms
saimanisha
18-Aug-17 7:49am
View
source code also got deleted .what is the way to get it back
saimanisha
18-Aug-17 7:33am
View
Deleted
where is visual sourcesafe explorer is located.
saimanisha
15-Jul-17 22:34pm
View
yeah i tried by converting text format to decimal and added two decimals then converted to text format and attached to textbox text.
saimanisha
5-Jul-17 7:12am
View
MY QUESTION IS NOT ABOUT CHECK OR NOT I WANT TO GET CHECKED CHECKBOX VALUE FROM GRIDVIEW OF THAT ROW AND I WANT TO UPDATE IT TO DATABASE
saimanisha
4-Jul-17 0:57am
View
actually here iam not using queries ..am retrieving the data from db using webapi with entity framework..it retrieves total data and i need to check category name which iis there in data ac and non-ac and delux etc it has to check with textbox text ..
in the above case its checking only with first inserted item..it has to check with all items that is item.categoryname.with textbox text
saimanisha
4-Jul-17 0:55am
View
actually here iam not using queries ..am retrieving the data from db using webapi with entity framework..it retrieves total data and i need to check category name which iis there in data ac and non-ac and delux etc it has to check with textbox text ..
saimanisha
28-Jun-17 7:17am
View
ok then how do i write code for triggering to downloading a file after print the current page ..
saimanisha
28-Jun-17 5:33am
View
my requirement is i have written function for print which is client side and pdf generation with download option server side ..thats why i used onlick and onclientclick events..is there any possibility to work both events at a time one after other with single click .
saimanisha
28-Jun-17 5:12am
View
so what is the solution if we want to provide print option to client ..
saimanisha
28-Jun-17 3:02am
View
i didnt get whats there in that link..i need to do both things at time cleint side code and server side code must work but its not firing on server side code how do i make it possible.if u have any idea in any other way then tell me.
saimanisha
28-Jun-17 2:45am
View
its working when am cancelling the print window..then onclick event is wokring .but it has to work when am not cancelling print window
saimanisha
21-Jun-17 0:57am
View
my question is iam generating a page which fetches the data from database the aspx page when i run i have to show a button as pdf if the user clicks that button then the generated aspx or html (webform) must be converted to pdf format and allow user to download .am not understanding how to do this .
saimanisha
25-May-17 0:12am
View
this code is written already its there in my code .whats the use of that.its completely diff from my requirement
saimanisha
23-May-17 2:18am
View
i have a doubt how do i send this gridview data to sql..here below code but before entering amount in amount cell and after clicking on checkbox it is connecting to sql..here i want the user to enter amount and then it has to check amount cell is empty or not..if not empty it has to insert into sql.
var amountCell = dataGridView1.Rows[e.RowIndex].Cells["AMOUNT"];
if (e.RowIndex > -1 && dataGridView1.CurrentCell == dataGridView1.Rows[e.RowIndex].Cells["CHECKBOX"])
{
if (amountCell.ReadOnly == true)
{
amountCell.ReadOnly = false;
amountCell.Style.BackColor = Color.White;
dataGridView1.Columns["AMOUNT"].Visible = true;
// TimeSpan ts = TimeSpan.FromMilliseconds(150000000);
// bool flag = false;
}
foreach (DataGridViewRow row in dataGridView1.Rows)
{
{
if (Convert.ToString(row.Cells["AMOUNT"].Value) == string.Empty)
{
MessageBox.Show("PLEASE ENTER THE AMOUNT"); return;
}
else
{
// CODE FOR SQL CONNECTION AND STROING THE DATA IN DB
SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-QDGHD7L;Initial Catalog=BANQUET HALL ;PASSWORD=Secret;Integrated Security=True;");
con.Open();
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
string StrQuery = @"INSERT INTO AMENITIES VALUES (@ID,@AMENITIESNAME,@DESCRIPTION,@CHECKBOX,@AMOUNT)";
SqlCommand CMD = new SqlCommand(StrQuery, con);
CMD.Parameters.AddWithValue("@ID", dataGridView1.Rows[i].Cells[0].Value);
CMD.Parameters.AddWithValue("@AMENITIESNAME", dataGridView1.Rows[i].Cells[1].Value);
CMD.Parameters.AddWithValue("@DESCRIPTION", dataGridView1.Rows[i].Cells[2].Value);
CMD.Parameters.AddWithValue("@CHECKBOX", dataGridView1.Rows[i].Cells[3].Value);
CMD.Parameters.AddWithValue("@AMOUNT", dataGridView1.Rows[i].Cells[4].Value);
CMD.ExecuteNonQuery();
}
}
else
{
dataGridView1.Rows[e.RowIndex].Cells["AMOUNT"].ReadOnly = true;
amountCell.Style.BackColor = Color.Gray;
dataGridView1.Columns["AMOUNT"].Visible = true;
}
lastCell = dataGridView1.CurrentCell;
}
}
}
}
saimanisha
19-May-17 0:45am
View
thank you very much ,its working.
saimanisha
18-May-17 5:54am
View
no yaar.its not working.when iam clicking on checkbox it has to allow to text in textbox else it must not..but its doing in reverse order..when am unchecking its allowing to edit..
saimanisha
18-May-17 4:35am
View
THE problem is when iam clicking on checkbox its not giving chance to edit..but when am unchecking it its allowing to enter amount..where should we change the code.
saimanisha
18-May-17 4:00am
View
IT WORKED THANK YOU..BUT HOW DO I STOP EDITING EVEN AFTER MAKING IT FALSE..ITS GETTING EDITED
saimanisha
18-May-17 3:19am
View
its working same as yesterday code..when i click checkbox of current row it must enable textbox of another column of the same row..but here its working like its enabling disabling the entire column of textbox which is nothing but amount column..
saimanisha
18-May-17 3:00am
View
Deleted
ITS HIDING THAT COLUMN COMPLETELY AFTER CLICKING ON CHECKBOX ALSO.what are the changes i have to do to make visible of that row textbox .
saimanisha
17-May-17 7:06am
View
iam getting a problem that is second time when am adding data to datagridview without clicking on check box its showing column amount textbox in datagridview.how to overcome this problem
saimanisha
17-May-17 6:58am
View
the textbox of amount column must not be visible till i click on checkbox .your answer is working partially like its correct but according to my requirement when i click the checkbox of column 4 row1 ,textbox of column 5 and row1 must be visible.
saimanisha
17-May-17 5:30am
View
THE chekcbox is a columntype in datagridview .
using grid event CellContentClick i checked whether checkbox is checked or not.but i want to make next column textbox to visile state only if checkbox is checked ..but as per the above code when i click second checkbox its displaying next row textbox column.but here i want to make visible only the current row.
saimanisha
16-May-17 7:08am
View
i kept for sample..but i dont know how to calaculate those values.
saimanisha
16-May-17 6:55am
View
allignment in the sense when lables are generated dynamically they are not getting placed in same row with top and left alliginment.in a row i have two labels and one check box..how should i allign it to display them dynamically in correct format
saimanisha
16-May-17 6:38am
View
AM ADDING THEM DYNAMICALLY ON BUTTON CLICK IT CALLS THOSE METHODS AND THEN ADDS LABELS..BUT THE ALLIGNMENT IS NOT PROPER..HOW CAN I SET TO CORRECT ALLIGNMENT
saimanisha
15-May-17 2:12am
View
i added already , but also its not working
saimanisha
12-May-17 7:41am
View
thats ok.i will try my self .
saimanisha
12-May-17 7:36am
View
textbox[ up.POSTAL_CODE = Convert.ToInt32(TextBox2.Text);] referes to id which am passing to webapi with entityframework.it fetches the data from db and sends response.if (response.issuccessstatuscode )then it executes the below code .here the problem is the data is not getting displayed in gridview.what am asking is is any thing wrong in my code and in previous post i added aspx design code of gridview.
below is the code
protected async void Button4_Click(object sender, EventArgs e)
{up.POSTAL_CODE = Convert.ToInt32(TextBox2.Text);
HttpResponseMessage response = await client.GetAsync("api/UpdateHotelInfoes/" + TextBox2.Text);
response.EnsureSuccessStatusCode();
if (response.IsSuccessStatusCode)
{
var data = await response.Content.ReadAsStringAsync();
//var a = JsonConvert.DeserializeObject<mainobject>(data);
MainObject w = (MainObject)new JavaScriptSerializer().Deserialize(data, typeof(MainObject));
GridView1.DataSource = w.UpdateHotelInfo;
GridView1.DataBind();
}
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns = "False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<AlternatingRowStyle BackColor=" White" />
<columns>
<asp:BoundField DataField="HOTEL_NAME" HeaderText="HOTEL_NAME" />
<asp:BoundField DataField="ADDRESS_LINE" HeaderText="ADDRESS_LINE" />
<asp:BoundField DataField="AREA" HeaderText="AREA" />
<asp:BoundField DataField="CITY" HeaderText="CITY" />
<asp:BoundField DataField="POSTAL_CODE" HeaderText="POSTAL_CODE" />
<asp:BoundField DataField="STATE" HeaderText="STATE" />
<asp:BoundField DataField="COUNTRY" HeaderText="COUNTRY" />
<asp:BoundField DataField="PHONE_NUMBER" HeaderText="PHONE_NUMBER" />
<asp:BoundField DataField="LANDLINE" HeaderText="LANDLINE" />
<asp:BoundField DataField="EMAIL_ID" HeaderText="EMAIL_ID" />
<asp:BoundField DataField="WEBSITE" HeaderText="WEBSITE" />
<asp:BoundField DataField="PROPERTY_TYPE" HeaderText="PROPERTY_TYPE" />
<asp:BoundField DataField="PROPERTY_GRADE" HeaderText="PROPERTY_GRADE" />
<asp:BoundField DataField="REGISTRATION" HeaderText="REGISTRATION" />
<FooterStyle BackColor="#CCCC99" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FBFBF2" />
<SortedAscendingHeaderStyle BackColor="#848384" />
<SortedDescendingCellStyle BackColor="#EAEAD3" />
<SortedDescendingHeaderStyle BackColor="#575357" />
and yes i tried of learning by doing modifications so many types but iam not understanding whats wrong iam doing.and the same types of que were there in stack overflow though the code is same then also its not working.i tried by watching many more ans too.
saimanisha
12-May-17 0:50am
View
yeah its there but the problem is here after if condition
if (response.IsSuccessStatusCode)
iam getting exceptions like json format can't converted to json array.if i write code like this
var h = await response.Content.ReadAsAsync<IEnumerable<updatehotelinfo>>()
up = JsonConvert.DeserializeObject<updatehotelinfo>(h);
GridView1.DataSource = up;
GridView1.DataBind();
Response.Write("alert('Data loaded successfully');");
}
i want to displayis wrong here..iam not understanding where do i change the code..
saimanisha
11-May-17 6:28am
View
public class UpdateHotelInfoesController : ApiController
{
private UpdateHotelInfoEntities db = new UpdateHotelInfoEntities();
// GET: api/UpdateHotelInfoes
public IQueryable<updatehotelinfo> GetUpdateHotelInfo()
{
return db.UpdateHotelInfo;
}
// GET: api/UpdateHotelInfoes/5
[ResponseType(typeof(UpdateHotelInfo))]
public IHttpActionResult GetUpdateHotelInfo(int id)
{
UpdateHotelInfo updateHotelInfo = db.UpdateHotelInfo.Find(id);
if (updateHotelInfo == null)
{
return NotFound();
}
return Ok(updateHotelInfo);
}
this is the api code using entity framework ..put delete and update methods are working but am unable display the data ..the request to api is working fine..but how can i display the respose into the gridview.
saimanisha
11-May-17 6:24am
View
later i mentioned "/" but also its not working.
saimanisha
6-May-17 2:22am
View
i installed Install-Package Microsoft.AspNet.WebApi.Client this package but also its not working
saimanisha
4-May-17 6:05am
View
AGGRAGATE EXCEPTION.ONE OR MORE ERRORS OCCURED
saimanisha
4-May-17 5:29am
View
here iam getting the exception: httpresponsemessage res=client.getasync("api/updatehotelinfoes").result;
saimanisha
4-May-17 5:28am
View
here iam getting the exception: httpresponsemessage res=client.getasync("api/updatehotelinfoes").result;
Show More