|
hi
try this:
put this line in the dataGrid.CurrentCellChanged event
dataGrid.Select(grdUser.CurrentCell.RowNumber)
Tamimi - Code
|
|
|
|
|
yes man i did that
but the problem was that the current cell is selected too, what i need is to select only the row
u get it ?
|
|
|
|
|
hi
try this:
grid.Select(grid.CurrentCell.RowNumber)
Dim gc As New DataGridCell(grid.CurrentCell.RowNumber, -1)
grid.CurrentCell = gc
Tamimi - Code
|
|
|
|
|
this is the method i think but in this way the cell of the column 0 is selected not the -1 and if i made 2 the cell 1 is the selected cell
- ihave 2 columns : 0 and 1
but my friend
if u can answare this question the situation will be better :
how to make sorting when the user clicks on the header of a listview
i made a list view of many columns but i want to make sorting of the data by columns
when he clicks the header of column i - the data in the listview should be sorted by this column - i.
|
|
|
|
|
hi hasan
i don't think that i understode you last message !!!!!!!!!!
and i test the code in my last msg , and its work correctly , make sure that you are putting the code in the CurrentCellChanged
excuse me i never did sorting with a listview
Tamimi - Code
|
|
|
|
|
thanks man
i solved the problem
thanks alot
|
|
|
|
|
Hello
I am working in a project. I need to export the crytal reporst to excel format.The file is exported sucessfully but the problem is that it leaves some of the lines blank between the records. If every one have solution about it plz let me know.
Regards
Atif
|
|
|
|
|
just you have to attach that sections below line to the report fields to do not get blank line in exported excel file of your report
thanks and regards
|
|
|
|
|
hi...
i hav a problem to un-highlite the repeater/datagrid row after highlighting it...i used the onclick control
example :
<td align="center" class="t_row" id="r7">
<asp:Button id="btnFee" runat="server" Text="Fee" CssClass="btn" CommandName="fee" OnClick="Highlite"></asp:Button>
</td>
when the button is click; the row will be highlighted..but the problem is..the row will not un-highlight if i click another button in another row
could u please help me????
mada mada dane
|
|
|
|
|
I would like to dynamically create a checkboxlist (from db) which is fine but now i would like to only allow for one box to be selected, is this possible.
I can't use a Radiobutton list as the you MUST be able to unselect all options
I also know you can use checkboxes and group them but i would to create the list dynamically from the database
Anybody got any help on this?
Thanks in advance
|
|
|
|
|
A sub that will
1 - run every time an item is selected in the list,
2 - running through all list elements,
3 - unselecting (the previously selected) list item (if there is one)
That's some rough undetailed pseudo-pseudocode, but maybe it's the idea you needed?
Hope it helps
|
|
|
|
|
was hoping there was some easy way to do it but i feared there wouldn't be so yes thats a great idea thanks for that sir
|
|
|
|
|
is there a way of telling the index of the check box that was just selected now so i know not to deselect that one????
|
|
|
|
|
Hi Friends,
I am looking out for method through which i can store date in database using datecontrol and even retrieving it from the same database in another form. Suppose the date format is set LONG what should i take in consideration while desining a database in sql 2003. Windows form should be store and restore date from the database.
Please let me Know. Would be very greatful..
Bye..
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hello,
I Have a little trouble with the datagridview control
My code :
_Cmd.Connection = _DataConnectie
_Cmd.CommandText = Sql
_Adapt.SelectCommand = _Cmd
_DataTabel.Clear()
_Adapt.Fill(_DataTabel)
Grid.DataSource = _DataTabel
Grid.Refresh()
the datatable has 10 columns
Then I make an different Sql and want to display the result in the same grid, dut this time the result is 5 columns.
The Grid display's the 5 new columns but also the last 5 columns from the previous table
I have tried grid.columns.clear before filling the datatable en the binding but then de grid is empty
Can anyone help me
Thanks
|
|
|
|
|
Hi,
boss when u r trying to bind the resultset again to gridview, then u have to clear the data table or destroy the object of the table.
because it keeps previous queries results..
so u have to set null to datatable.
_DataTabel = null;
try it.
Abhishek Pareek
Software Engineer
Mumbai
|
|
|
|
|
Thanks
I Will try
But I already found that by setting _DataTabel = New Datatable it works !
|
|
|
|
|
Hi,
I have a created a user control (pagination for grid) in my application. It has four Imagebuttons. I need to trap the click event of these imagebutton outside of the user control and only in my aspx page. I am currently working on .Net 2.0.
Please show me the way,
Thanks,
|
|
|
|
|
You will have declare an event and raise it in the event which you want to capture e.g. if you have a button in your user control then you capture its click event as:
'Declare it in Declaration Section
Public Event MyButtonClicked()
'In the click event of button you will have to write this:
Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTest.Click
RaiseEvent MyButtonClicked()
End Sub
MyButtonClicked() event will be available in aspx form and you can handle it.
hope you will get it if you face any problem let me know.
take care
Javed
|
|
|
|
|
Hey everyone, does any one know how I can convert a long or integer to it's corresponding binary representation in VB6 ? ... I tried the index ... it didn't help me out ..
Luay Al-wesi
|
|
|
|
|
A little Google goes a long way. Results[^] for "vb6 convert integer to binary string". The first link is pretty good.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
{vb .net 2003}
I'd like to add controls (specifically labels) to a form when its resized, to have the most number of labels possible that fit on the screen. I haven't had much luck finding a tutorial or code snippet that does this. Controls would be created using a for or while loop, so i need some way to easily create lots of them. I have the resize event down fine, its the dynamic creation that I'd like help on.
Thanks in advance,
BAM
|
|
|
|
|
bamnet wrote: have the most number of labels possible that fit on the screen.
bamnet wrote: create lots of them
Personally, I think that's a bad idea. the more controls you have on a form the longer it'll take to show - consider users with lower-end machines.
The code you'd be needing would look something like this (out my head)
Dim MyLabel As Label 'declare at modular level
Private Sub CreateLabels()
'create a new instance of a label
MyLabel = New Label
'add formatting, positioning, event handlers, etc. here
Me.Controls.Add(MyLabel) 'add the label to the form.
End Sub
You'll probably have to write functions to return values of how many labels you'll need as well as where to position them.
|
|
|
|
|
I don't have to consider users with lower end machines very much. The application is going to be used on one or maybe 2 machines maximum. The idea is to create a few labels on a panel on the lefthand side based on the screen resolution. In my previous draft of this program everything was hardcoded and changing the resolution and size of the application meant rewriting it. The most labels would be 10 max.. not too bad I think.
I've tried that code an I can't get it to display the label, I know the spot on the form is clear and set visible to true.
|
|
|
|
|
You added the labels to the form. They're probably sitting behind your panel control. Add them to the Panel's Controls collection instead.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|