KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

GridView Sticky Discussion
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Wed Jan 12, 2005 9:17 pm    Post subject: Reply with quote

Quote:
Heres a grid I've been funn'n with:

[Grid]
RowCount=50
ColumnCount=8
...


this data looks like an .ini file.

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Wed Jan 12, 2005 9:23 pm    Post subject: Reply with quote

Shawn wrote:
Quote:
$GridView.Columns(0).Width = -1


Sweeeeet!

thanks

that trims the script down nicely.

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Jan 12, 2005 11:23 pm    Post subject: Reply with quote

It is an INI file ... I'm just saving grid files as INI files (with the .grd) extention ... so one can use ReadProfileString to restore a grid. ;0)
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Sat Jan 15, 2005 2:42 pm    Post subject: Reply with quote

This is a little off topic but is there a way to tell if the object I am trying to use is a gridview or a listview? Or another way of asking... How can I determine what type of object I am controlling?
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Jan 15, 2005 4:23 pm    Post subject: Reply with quote

There's an undocument property of every object called "Class". I use it internally in Kixforms ... give it a go.
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Sat Jan 15, 2005 11:10 pm    Post subject: Reply with quote

Thanks! The Class property helps.

Two questions.

How do I adjust the width of a column so that it will auto adjust to show all of the column header and the largest cell text. I can't see how to get that to work like I can for ListView.

How do I unselect all rows?

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Mon Jan 17, 2005 1:50 pm    Post subject: Reply with quote

*Note to myself --- .Class property, undocumented, useful Very Happy

Howdy Shawn,

is there a property for colums, rows, cells to not change the color when get marked?
Let me explain, in my current Gridview approach I got two columns as last ones; first is an empty/locked column where user can select a color for something, second is a combobox for the textcolor (black or white).
When the user clicks a cell in the color select column a Colordilaog pops up and if color is changed the cells backcolor property changes to selected, no problem there, but a bit of a pain is that the color of the cell changes to 'selected' (dark blue in my case) when a user clicks in it allthough it is .Locked and that is pretty annoying when there was a costum cell color before Mad.

Something like

$col.Locked = 1
$col.HighlightStyle = 0

would be cool.
Hope I have that explained understandable enough Rolling Eyes

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.


Last edited by Jochen on Wed Jan 19, 2005 9:04 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Mon Jan 17, 2005 2:08 pm    Post subject: Reply with quote

krabourn,
earlier in ths very same thread Shawn showed me the column width thing:

Code:
$GridView.Columns(0).Width = -1

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Mon Jan 17, 2005 3:00 pm    Post subject: Reply with quote

benny69,
You are correct, but I have found that that alone does not always work. For a ListView you need to do this for each column.
Code:
$ListView.Columns(0).Width = -1
$ListView.Columns(0).Width = -2

You see sometimes a colums header is longer and sometimes the text in the cells longer. I need a way that will always work. I figure the GridView has just a little bug for this.

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Mon Jan 17, 2005 3:23 pm    Post subject: Reply with quote

krabourn,

is the -1 for the column width in listview?
is the -2 for the column header in listview?

and does this already work for listview?

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Mon Jan 17, 2005 4:20 pm    Post subject: Reply with quote

benny69,

Yes, this works for the listview. I have been using it for quite some time.

I believe you are correct in your definition.

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Jan 17, 2005 4:36 pm    Post subject: Reply with quote

The dotnet gridview doesn't behave "exactly" like the listview does, but I added this "behavior" you guys just laid-out anyways, will be in the next build ... not sure when I can post the next build because I have the DLL open for MultiSelect support, when finished will advise.
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Mon Jan 24, 2005 4:14 pm    Post subject: Reply with quote

Other question:

What is the right event to utilize when cells (columns) with a CellType of 2 (ComboBox) have a change of SelectedIndex, and where do I define that: At gridview, column or cell level?

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Mon Jan 24, 2005 4:49 pm    Post subject: Reply with quote

I did not use SelectedIndex but I used:

Code:
$GridView.OnCellValueChanged = "CheckCombobox()"

Function CheckCombobox()
; * Location Options *
;   CurrentRow
;   CurrentRowIndex
;   CurrentColumn
;   CurrentColumnIndex
;   CurrentCell

   $Index = $GridView.CurrentRowIndex
   $ServiceName = $GridView.Cells($Index,1).Value
   $Status = $GridView.Cells($Index,2).Value
   If $Status = "Started"
      $Status = "Start"
   Else
      If $Status = "Stoped"
         $Status = "Stop"
      EndIf
   EndIf
   $sndtxt.text = $Status + "|" + $ServiceName
   send()
   GetManageableServices()
EndFunction

This may not be what you want but I got my direction from Shawn.

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Mon Jan 24, 2005 5:04 pm    Post subject: Reply with quote

nice,

so it's .OnCellValueChanged (which I already have found via typelibvwr) at GridView level.

Hmmm.
But that implies that the event is fired for each and every value change in the GridView and need to be catched inside the called function ... yeah, that's the implication, mkay

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group