|
Thanks for ur answer Mr.Sylvester.
But i can not understand the above,Bcz i am using the report already generated in crystalreports.
"rptCharts" is the tablename and not report.
I am loading the report in my code(as per my precious message).
If is this only the solution give me correct idea please.
Thanks once againg
Regards,
Kissy
kissy
|
|
|
|
|
Hi,
Can anyone help,
I want that data in datagrid should be placed in single line. Can i somehow
set multiline property of datagrid to false, and i also do not want d width of
COLOUMN to increase if multiline property is set false ,instead can i hve a
TOOLTIP which will show d entire data if a particular row is selected in a
datagrid .
|
|
|
|
|
you can set the tool tip property of the control. by finding that control in the Item databound event and then assisgning that value as the tool tip.
I tried it for a hyperlink, textbox etc , however was not able to get it happwning for a drop down.
Can somebody give an idea as to how to make it happen
|
|
|
|
|
I have a Gridview and a Formview control in a web-page laid out in a master-detail fashion, with paging enabled for both the controls and sorting enabled for some columns in the Gridview. With only paging enabled for both controls, I am able to synchronize the two views, but as soon as sorting is requested, the two views go out of sync. I tried hooking into the sorting and sorted event of the gridview control, to manipulate the formview's sort order, without success.
can anyone help me out?
The test of the puddng is in eating it.
|
|
|
|
|
when i move the mouse on particular cell of the row i should get the content of the cell in some variable in code behind page .
thanks in advanc e
|
|
|
|
|
Write a Javascript function onmouseover for the particular cell. Then use AJAX to do further
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi,
Add an event RowDataBound for the GridView. (hope you know how to add this).
And you can add onmouseover event for each cell. Write javascript function as given below:
1. GridName: GridViewList
2. Event: GridViewList_RowDataBound
For example:
protected void GridViewList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Attributes.Add("OnMouseOver", "alert('here'); return false;");
//Change the column index as your wish
}
}
Place mouse hand on the first column, you will get popup message 'here'.
To call javascript function and also pass some value from the cell value, replace above single line as below
string StrJavascript = "";
StrJavascript = "return CallMethod(" + e.Row.Cells[0].Text.ToString() + ")";
e.Row.Cells[0].Attributes.Add("OnMouseOver", StrJavascript);
Hope this is clear.
- Harini
|
|
|
|
|
Great. Good you explained very well thru code
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
|
Is it possible to format the layout of a Formview control with a multiview control?
I am getting errors from VWD trying to do so.
Can anyone help me out
Thanks
The test of the pudding is in eating it.
|
|
|
|
|
I am new to Visual studio 2005. In previous versions of Visual Studio, whenever you build a web application in debug mode, automatically a dll of the application used to get added in bi\debug folder.
Now in 2005 how do we create this dll?
please let me know ASAP.
Nana
|
|
|
|
|
Build menu --> Publish web site.
Or
open visual command promt.and write
aspnet_compiler -p "c:/inetpub/wwwroot/applicationname" -v \ c:/appName
Pathan
|
|
|
|
|
But there is no dll?
Nana
|
|
|
|
|
Hi,
I'm working on a asp.net project with a datagrid. I want the user to be adding data into Sql database using the datagrid. So I'm using a ListBox to do this and edit update and delete. I placed listbox in EditItemTemplate and label in ItemTemplate. but when I try now to edit it does not bring the lisbox but i can read the grid with the sql content. my code actually looks like this:
public void Edit_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgid.EditItemIndex = e.Item.ItemIndex;
BindDataGrid();
}
public void Cancel_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgid.EditItemIndex = -1;
BindDataGrid();
}
public void Update_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
System.Web.UI.WebControls.ListBox st=new System.Web.UI.WebControls.ListBox();
st=(System.Web.UI.WebControls.ListBox)e.Item.Cells[5].FindControl("lbachobj");
System.Web.UI.WebControls.ListBox st1=new System.Web.UI.WebControls.ListBox();
st=(System.Web.UI.WebControls.ListBox)e.Item.Cells[4].FindControl("lbobj");
SqlCommand myCommand=new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="insert into Object,AchievedObject where @Object,@AchievedObject";
myCommand.Parameters.Add(new SqlParameter("@AchievedObject",SqlDbType.Text));
myCommand.Parameters["@AchievedObject"].Value=st.SelectedValue;
myCommand.Parameters.Add(new SqlParameter("@Object",SqlDbType.Text));
myCommand.Parameters["@Object"].Value=st1.SelectedValue;
con.Open();
myCommand.ExecuteNonQuery();
con.Close();
dgid.EditItemIndex=-1;
BindDataGrid();
}
Thanks.
|
|
|
|
|
Hello,
We have created user control using data grid in VB.Net. In this datagrid we are dispalying for each row edit and delete icon.
If user does not have access then we don't want to display edit & delete icon, but some blank space is coming in place of icons.
We don't want this blank space if user does not have access for edit & delete.
Can somebody give sample code how to remove that blank space.
Thanks & Regards,
Kumar
|
|
|
|
|
Hide the Datagrid column instead of hiding the icons,
Add the code below on Page_Load.
<br />
If IsUserHasAddDelEditAccess = False Then<br />
<br />
'Hide Columns for Add, Edit and Delete<br />
<br />
'Add Column<br />
DataGrid1.Columns(10).Visible = False<br />
<br />
'Edit Column<br />
DataGrid1.Columns(11).Visible = False<br />
<br />
'Delete Column<br />
DataGrid1.Columns(12).Visible = False<br />
<br />
End If<br />
Regards,
Mark
|
|
|
|
|
Another Option for you.
1. Add an image and imagebutton to your datagrid add column
2. Set the image visibility to false. this image will represent a user have no access.
3. Override the DataGrid ItemDataBound Event. for your reference see the code below.
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound<br />
<br />
<br />
If IsUserHasAddDelEditAccess = False Then<br />
<br />
Dim imgbAdd As ImageButton = CType(e.Item.Cells(0).FindControl("imgButtonAdd"), ImageButton)<br />
imgbAdd.Visible = False<br />
<br />
Dim imgAddGrey As WebControls.Image = CType(e.Item.Cells(0).FindControl("imgAddGrey"), WebControls.Image)<br />
imgAddGrey.Visible = True<br />
<br />
' Do the same thing with Edit and Delete<br />
<br />
End If<br />
<br />
<br />
End Sub<br />
<br />
<br />
Regards,
Mark
|
|
|
|
|
Thanks a lot. First one code is working for us.
Thanks & Regards,
Kumar
|
|
|
|
|
Respected Gurus
in frmShowRefForm.aspx
Public ReadOnly Property getRef_No() As String
Get
Return txtRefNo.Value
End Get
End Property
this property returns the value of txtRefNo.
This property works fine if i m using it on the same page.
But not from other page from where i want to access the value of txtRefNo.
in page_load event of other page
Dim obj As frmShowRefForm
obj = New frmShowRefForm
Dim ref_no As String
If obj.getRef_No <> "" Then
ref_no = obj.getRef_No
End If
Error"Object Reference not set to an instance of an object."
this error comes while returning the value of the textbox of frmShowRefForm.
I have tried to return a string variable from the property instead of the textbox value and it works fine..
Plz guide
|
|
|
|
|
You will need to do a Server.Transfer in order to maintain the other pages's values then you will need to do something with the Context.Objectsendingpage in order to access the pages in this way I believe.
Cleako
|
|
|
|
|
i have a datafield of date time but i want to display only the date.
how do we split this string .
thanks in advance
|
|
|
|
|
DateTime.Now.ToShortDateString().ToString();
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
date_datafield.ToString("MM/dd/yyyy");
Regards,
Mark
|
|
|
|
|
Hi
Date Time in any format.
Example:
System.Globalization.DateTimeFormatInfo DFI = new System.Globalization.DateTimeFormatInfo();
DFI.ShortDatePattern = "MM/dd/yyyy";
String StrDate = DateTime.Now.ToString("d", DFI);
Harini
|
|
|
|
|
I have created 2 forms then in first form I am creating object of second form
Then When Second form will be closed at that time i want to make changes in first
form then how can i do it?
I mean which events should be written?
Anita
|
|
|
|