|
Hi,
I am using the Infragistics calendar view control for displaying the booking activity...
I need to pass the date & time along with the parameter from the parent page to the child page.
Please help me in fetching the date & time through javascript and pass it as a parameter to the child window.
Thanks for your quick response.
Regards
Priya
|
|
|
|
|
Please guide me if any one have any solution.
|
|
|
|
|
I have a datagrid with AutoGenerateColumns="True". I also have 3 template columns in the datagrid. One with a checkbox for multiple selection of rows.
Now I need to iterate through the grid to know which are the rows selected.
But when I try to iterate like below:
foreach(DataGridItem i in grdResults.Items)
{
bool bChecked = ((CheckBox)i.FindControl("chkSelect")).Checked;
if(bChecked == true)
{
string locationTxt = ((TextBox)i.FindControl("txtLocation")).Text;
}
}
grdResults.Items gives "error: cannot obtain value"
I am not sure what is going wrong. I want to use autogeneratecolumns since the datasource is bound to ds.tables[2] and template columns since some of the data is bound to ds.tables[0] and tables[1].
Please help. Thanks in advance.
|
|
|
|
|
you better do a
foreach (Datarow row in grdResults.Rows)
you scan all the rows in the gridview.
than do a row.FindControl(). What you do now is checking each item and if the item is chkSelect. If it is not chkSelect you have a null reference. Only 1 item in each row is chkSelect, not all items in the grid can be chkSelect.
|
|
|
|
|
How to save an grid values in database (sql server 2005)at runtime..
Is there any link refer to me..
Thanx in advance..
|
|
|
|
|
|
|
No i dont want to edit,update,select command.For example if i am loading an xml file to the project during run time.that particular file details must stored in database automatically...
help me.
Thanx in advance.
|
|
|
|
|
in general you can export your xml data to sqlserver using SSIS(Integration Service)
but if you mean that your xml data binded to a grid and you want to insert these data into sqlserver from your grid, i think you can generate a datatable from your grid data, and then insert your datatable into sqlserver table completely.
|
|
|
|
|
for asp.net 2.0 What is difference between following methods for selecting XML data. which one is better interms of performace.
1) Dataset.select
2) dataview
3) xmlDocument.SelectNodes
4) xmlNavigator.select
modified on Monday, January 19, 2009 2:41 AM
|
|
|
|
|
Member 3981366 wrote: Dataset.select
There is no Select method in DataSet class. Also, DataSet is not designed for XML manipulations.
Member 3981366 wrote: dataview
What this has to do with XML?
Member 3981366 wrote: xmlDocument.SelectNodes
XMLDocument.SelectNodes or XMLDocument.SelectSingleNode with XPath expression will be fast.
Member 3981366 wrote: xmlNavigator.select
AFAIK, this class is no longer used.
|
|
|
|
|
Hi to all,
I have a datagrid in which there is a checkbox and a textbox.
The user can change the value in textbox.
below there is update button.When the user presses the update button
the textbox value should be updated.
For this I have done this:
protected void BtnUpdate_Click(object sender, EventArgs e)
{
dt = (DataTable)Session["data"];
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
CheckBox chkSelected = new CheckBox();
foreach (DataGridItem dgItem in DataGrid2.Items)
{
chkSelected = (CheckBox)dgItem.FindControl("chkSelection");
if (chkSelected.Checked != true)
{
TextBox TxtQTY = (TextBox)dgItem.Cells[2].FindControl("TxtQTY");
string Txt2 = TxtQTY.Text;
}
else
{
int a = 1;
}
}
}
The problem is that this functionality is not taking the user input.
In the starting I have done databing because of which it is taking the previous value.But if I will not bind the data It is not going in the foreach loop to check wether any checkbox is selected or not as in debugging it is showing that the item collection in the datagrid is empty.
Please give some suggestions...
Thanks in advance.
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: dt = (DataTable)Session["data"];
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
Problem is in above code.
You are rebinding DataGrid before fetching new values from textbox. This will over write all the previously entered text.
Try moving this code after you have read value from textbox
|
|
|
|
|
Why is the datagrid losing all the items. You may be doing something before reaching to this event.
Apurva Kaushal
|
|
|
|
|
sneha Choudhary wrote: DataGrid2.DataSource = dt;
DataGrid2.DataBind();
This will clear the values changed in the textbox. Why do you need to rebind the grid?
sneha Choudhary wrote: //if I will not bind then it will not go in foreach loop.
//as it will not find any items in the datagrid.
Which event are you using for binding the grid? Is viewstate enabled for this control?
|
|
|
|
|
Hi,
I got the problem.Actually It was regarding the postback.
Thanks a lot.
cheers,
sneha
|
|
|
|
|
Hello everybody..in my application i have to show a indication whether i am connected to internet or not..
|
|
|
|
|
meghamaharshi wrote: in my application i have to show a indication whether i am connected to internet or not..
You want to mean , that you need to show all the user list that are currently logged in into your application ?
|
|
|
|
|
Thanks for reply..
But i just want to show the status internet is on or not...
|
|
|
|
|
If it is a web application (not intranet) then obviously the user is connected to internet.
Apurva Kaushal
|
|
|
|
|
its web application which is being run on Lan making virtual directory..
|
|
|
|
|
do you really want this in your web application. Bcos we often need this for Windows Application.
For windows use:
System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged += new System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler(NetWorkChangedCallback);
Abhishek Sur
|
|
|
|
|
yes i want it for web application..
|
|
|
|
|
This has to be the dumbest thing I have ever heard.
If you're on a LAN and you want to know if an internet connection exists or not, just ping google or microsoft and if you get a reply or not, you'll know if you're online.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes Christian is Right.
For web application, just make an object of XMLHttpRequest and do an AJAX call to any page using SetInterval, so that this ajax call will occur after a certain time. And show the status message based on the reply from the server.
Thats all is possible in WEB...
Abhishek Sur
|
|
|
|